π 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)