๐ Build EmbedQA Backend: Professional API Testing Platform
Hey backend developers! ๐
Are you passionate about Java, Spring Boot, and building robust APIs? Want to contribute to an open-source project that helps developers worldwide test their APIs better? Join us in building EmbedQA - a modern, open-source API testing platform (think Postman alternative)!
๐ฏ What is EmbedQA?
EmbedQA is a full-stack API testing platform designed to give developers a powerful, free alternative to commercial API testing tools. The backend is the heart of this platform, handling everything from executing HTTP requests to managing collections, environments, and request history.
What We're Building:
- ๐ง HTTP request execution engine with full protocol support
- ๐ฆ Collections management for organizing API endpoints
- ๐ Environment variables system for different deployment stages
- ๐ Request history with analytics
- ๐ Multiple authentication mechanisms
- ๐ High-performance, scalable REST API
๐ ๏ธ Tech Stack
We're using industry-standard, modern Java technologies:
| Technology | Version | Purpose |
|---|---|---|
| Java | 21 | Latest LTS with modern features |
| Spring Boot | 3.5.7 | Robust, production-ready framework |
| Spring Data JPA | - | Simplified database operations |
| PostgreSQL | 16 | Reliable, powerful relational database |
| Apache HttpClient | 5.3 | HTTP request execution |
| Maven | 3.9+ | Dependency management |
| Docker | - | Easy database setup & deployment |
Why This Stack?
- Java 21: Modern syntax, Records, Pattern Matching, Virtual Threads
- Spring Boot 3.5: Production-proven, extensive ecosystem
- PostgreSQL: Advanced features, JSON support, excellent performance
- Apache HttpClient 5: Industry-standard HTTP client library
๐ฏ Project Goals
We're building EmbedQA backend to be:
- Robust: Handle edge cases, errors gracefully
- Scalable: Support thousands of concurrent requests
- Maintainable: Clean architecture, SOLID principles
- Testable: Comprehensive unit and integration tests
- Well-documented: Clear API docs with Swagger/OpenAPI
๐ Getting Started
Ready to contribute? Here's how to get the backend running locally:
Prerequisites
- Java 21 (JDK)
- Maven 3.9+
- PostgreSQL 16 (we recommend Docker)
- Your favorite IDE (IntelliJ IDEA, Eclipse, VS Code)
Quick Setup
# 1. Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/embedqa.git
cd embedqa
# 2. Start PostgreSQL with Docker (easiest way)
cd docker-compose/db
docker-compose up -d
cd ../..
# 3. Run the application
./mvnw spring-boot:run
The API will be available at http://localhost:8085 ๐
Database Setup (Alternative)
If you prefer installing PostgreSQL locally:
# Create database and user
psql postgres
CREATE DATABASE embedqa;
CREATE USER embedqa_user WITH ENCRYPTED PASSWORD 'embedqa_pass';
GRANT ALL PRIVILEGES ON DATABASE embedqa TO embedqa_user;
\c embedqa
GRANT ALL ON SCHEMA public TO embedqa_user;
\q
Verify Installation
# Check if the API is running
curl http://localhost:8085/api/v1/collections
# View API documentation
open http://localhost:8085/swagger-ui.html
๐ Project Architecture
We follow clean architecture principles with clear separation of concerns:
src/main/java/com/akash/embedqa/
โโโ EmbedqaApplication.java # Main application entry point
โโโ config/ # Configuration classes
โ โโโ HttpClientConfig.java # Apache HttpClient setup
โ โโโ WebConfig.java # CORS, interceptors
โโโ controller/ # REST API endpoints
โ โโโ ApiExecutorController.java # Execute HTTP requests
โ โโโ CollectionController.java # Collections CRUD
โ โโโ EnvironmentController.java # Environments CRUD
โ โโโ RequestController.java # Saved requests CRUD
โ โโโ HistoryController.java # Request history
โโโ service/ # Business logic layer
โ โโโ ApiExecutorService.java # HTTP execution logic
โ โโโ CollectionService.java # Collections management
โ โโโ EnvironmentService.java # Environment management
โ โโโ RequestService.java # Request management
โ โโโ HistoryService.java # History tracking
โโโ repository/ # Data access layer
โ โโโ ApiCollectionRepository.java
โ โโโ ApiRequestRepository.java
โ โโโ ApiResponseRepository.java
โ โโโ EnvironmentRepository.java
โ โโโ EnvironmentVariableRepository.java
โ โโโ RequestHistoryRepository.java
โโโ model/ # Domain models
โ โโโ entities/ # JPA entities
โ โ โโโ ApiCollection.java
โ โ โโโ ApiRequest.java
โ โ โโโ ApiResponse.java
โ โ โโโ Environment.java
โ โ โโโ EnvironmentVariable.java
โ โ โโโ RequestHistory.java
โ โโโ dtos/ # Data Transfer Objects
โ โโโ request/ # Request DTOs
โ โโโ response/ # Response DTOs
โโโ enums/ # Enumerations
โ โโโ HttpMethod.java # HTTP methods
โ โโโ BodyType.java # Request body types
โ โโโ AuthType.java # Authentication types
โโโ exception/ # Exception handling
โ โโโ GlobalExceptionHandler.java # Centralized error handling
โ โโโ ApiExecutionException.java
โ โโโ ResourceNotFoundException.java
โโโ converter/ # Type converters
โ โโโ AuthConfigConverter.java # JPA converters
โ โโโ EnvironmentVariablesConverter.java
โโโ utils/ # Utility classes
โโโ HashMapConverter.java
๐ Good First Issues
Perfect entry points for new contributors:
๐ข Beginner-Friendly
-
Add request timeout configuration
- Make HTTP request timeout configurable
- Skills needed: Java, Spring Boot configuration
-
Files:
ApiExecutorServiceImpl.java,application.yml
-
Improve error messages
- Return more descriptive error messages in API responses
- Skills needed: Java, exception handling
-
Files:
GlobalExceptionHandler.java
-
Add request/response size limits
- Implement size validation for large payloads
- Skills needed: Java, Spring Boot validation
-
Files:
ApiExecutorServiceImpl.java
๐ก Intermediate
-
Implement request history pagination
- Add pagination support for history endpoint
- Skills needed: Spring Data JPA, pagination
-
Files:
HistoryService.java,HistoryController.java
-
Add request statistics
- Track average response times, success rates
- Skills needed: JPA queries, aggregation
-
Files:
HistoryService.java, createStatisticsService.java
-
Support multipart file uploads
- Handle file uploads in request bodies
- Skills needed: Spring multipart handling
-
Files:
ApiExecutorServiceImpl.java
-
WebSocket support
- Add WebSocket testing capabilities
- Skills needed: Spring WebSocket
- Files: Create new WebSocket module
๐ด Advanced
-
GraphQL support
- Add GraphQL query execution
- Skills needed: GraphQL, HTTP clients
- Files: Create new GraphQL module
-
Request chaining engine
- Extract values from one response to use in next request
- Skills needed: Complex logic, JSON parsing
-
Files:
ApiExecutorService.java, create chaining logic
-
Mock server
- Built-in mock API server for testing
- Skills needed: Advanced Spring, dynamic routing
- Files: Create new mock server module
๐ค Contribution Guidelines
We make contributing easy and rewarding!
How to Contribute
- Browse issues and find one that interests you
- Comment to claim the issue (we'll assign it to you)
- Fork the repository
- Create a branch
git checkout -b feature/your-feature-name
- Make your changes with clear commits
- Write tests for your changes
- Run tests to ensure nothing breaks
./mvnw test
- Submit a PR with a detailed description
Code Style Guidelines
- Follow Java naming conventions (camelCase, PascalCase)
- Use meaningful variable/method names
- Write Javadoc for public methods
- Keep methods short and focused (< 30 lines ideally)
- Follow SOLID principles
- Use Spring best practices (constructor injection, etc.)
- Write unit tests for services, integration tests for controllers
Testing Requirements
// Example service test
@Test
void shouldExecuteGetRequest() {
// Given
ExecuteRequestDTO request = createTestRequest();
// When
ApiResponseDTO response = apiExecutorService.execute(request);
// Then
assertThat(response.getStatusCode()).isEqualTo(200);
assertThat(response.getBody()).isNotNull();
}
๐ API Endpoints Overview
Execute API Request
POST /api/v1/execute
Content-Type: application/json
{
"method": "GET",
"url": "https://api.example.com/users",
"headers": [
{"key": "Authorization", "value": "Bearer token", "enabled": true}
],
"queryParams": [
{"key": "page", "value": "1", "enabled": true}
],
"body": null,
"bodyType": "NONE",
"authType": "BEARER_TOKEN",
"authConfig": {
"token": "your-token-here"
}
}
Collections Management
GET /api/v1/collections # List all collections
GET /api/v1/collections/{id} # Get collection by ID
POST /api/v1/collections # Create collection
PUT /api/v1/collections/{id} # Update collection
DELETE /api/v1/collections/{id} # Delete collection
Environment Management
GET /api/v1/environments # List all environments
POST /api/v1/environments # Create environment
PUT /api/v1/environments/{id} # Update environment
DELETE /api/v1/environments/{id} # Delete environment
Request History
GET /api/v1/history # Get request history
GET /api/v1/history/{id} # Get history item details
DELETE /api/v1/history/{id} # Delete history item
GET /api/v1/history/stats # Get usage statistics
๐ Why Contribute to EmbedQA Backend?
For Your Career
- Build production-grade Spring Boot applications
- Learn clean architecture and best practices
- Work with modern Java 21 features
- Gain experience with real-world scenarios
For Learning
- Master Spring Boot 3.x ecosystem
- Practice RESTful API design
- Learn database optimization with JPA
- Understand HTTP protocol deeply
- Write professional-grade tests
For the Community
- Help developers worldwide test APIs efficiently
- Build a free alternative to expensive tools
- Contribute to open-source Java ecosystem
- Mentor other developers
๐งช Development Workflow
Running Tests
# Run all tests
./mvnw test
# Run specific test class
./mvnw test -Dtest=ApiExecutorServiceTest
# Run with coverage
./mvnw test jacoco:report
Database Migrations
We use Flyway for database migrations:
-- Example migration: V1__Create_collections_table.sql
CREATE TABLE collections (
id BIGSERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
description TEXT,
created_at TIMESTAMP NOT NULL,
updated_at TIMESTAMP
);
Configuration Profiles
# application-dev.yml (Development)
spring:
datasource:
url: jdbc:postgresql://localhost:5432/embedqa
username: embedqa_user
password: embedqa_pass
# application-prod.yml (Production)
spring:
datasource:
url: ${DATABASE_URL}
username: ${DATABASE_USERNAME}
password: ${DATABASE_PASSWORD}
๐ Resources
Need to brush up on skills?
- Spring Boot Documentation
- Spring Data JPA Guide
- PostgreSQL Tutorial
- Apache HttpClient Documentation
- Our Contributing Guide
๐ฌ Join the Community
Questions or ideas? Let's talk!
- ๐ Issues: GitHub Issues
- ๐ก Discussions: GitHub Discussions
- ๐ง Frontend: embedqa-ui repository
๐ What We've Built So Far
- โ HTTP request execution engine (all methods)
- โ Authentication support (Bearer, Basic, API Key)
- โ Collections CRUD operations
- โ Environment management
- โ Request history tracking
- โ PostgreSQL database schema
- โ Comprehensive error handling
- โ Docker development environment
Coming Soon:
- ๐ Request chaining
- ๐ WebSocket support
- ๐ GraphQL support
- ๐ Mock server
- ๐ Advanced analytics
๐ Ready to Start?
- โญ Star the repository
- ๐ด Fork it
- ๐ Read our Contributing Guide
- ๐ Check Good First Issues
- ๐ฌ Introduce yourself in Discussions
๐จโ๐ป About the Maintainer
Akash Bhuiyan - Creator and maintainer of EmbedQA
- GitHub: @AkashBhuiyan
Let's build the future of API testing together! Whether you're a Java veteran or learning Spring Boot, there's a place for you on the EmbedQA team. We value every contribution, from documentation improvements to major features. ๐
Have questions? Drop a comment below or open a discussion on GitHub!
๐ Tags
#java #springboot #opensource #backend #postgresql #rest #api #hacktoberfest

Top comments (0)