REST API backend for the EmbedQA API testing platform.
π Frontend Repository: embedqa-ui
| Technology | Version |
|---|---|
| Java | 21 |
| Spring Boot | 3.5.7 |
| PostgreSQL | 16 |
| Apache HttpClient | 5.x |
- Java 21
- Maven 3.9+
- PostgreSQL 16 (Docker or local installation
cd docker-compose/db
docker-compose up -dThis creates:
- Database:
embedqa - User:
embedqa_user - Password:
embedqa_pass - Port:
5432
To stop the database:
docker-compose downTo stop and remove data:
docker-compose down -vor
docker run -d \
--name embedqa-postgres \
-e POSTGRES_DB=embedqa \
-e POSTGRES_USER=embedqa_user \
-e POSTGRES_PASSWORD=embedqa_pass \
-p 5432:5432 \
postgres:16
# Install PostgreSQL
sudo apt update
sudo apt install postgresql postgresql-contrib
# Start PostgreSQL service
sudo systemctl start postgresql
sudo systemctl enable postgresql
# Create database and user
sudo -u postgres psqlCREATE 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# Using Homebrew
brew install postgresql@16
brew services start postgresql@16
# Create database and user
psql postgresCREATE 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- Download PostgreSQL from postgresql.org
- Run the installer and set password for
postgresuser - Open pgAdmin or psql and run:
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;
The backend will start at `http://localhost:8085`src/main/java/com/akash/embedqa/
βββ EmbedqaApplication.java
βββ config/
β βββ HttpClientConfig.java
β βββ WebConfig.java
βββ controller/
β βββ ApiExecutorController.java
β βββ CollectionController.java
β βββ EnvironmentController.java
β βββ RequestController.java
βββ service/
β βββ ApiExecutorService.java
β βββ CollectionService.java
β βββ EnvironmentService.java
β βββ RequestService.java
βββ repository/
β βββ ApiCollectionRepository.java
β βββ ApiRequestRepository.java
β βββ ApiResponseRepository.java
β βββ EnvironmentRepository.java
β βββ EnvironmentVariableRepository.java
βββ model/
β βββ dtos/
β β βββ request/
β β βββ response/
β βββ entities/
βββ enums/
β βββ HttpMethod.java
β βββ BodyType.java
β βββ AuthType.java
βββ exception/
β βββ GlobalExceptionHandler.java
β βββ ApiExecutionException.java
β βββ ResourceNotFoundException.java
βββ converter/
β βββ AuthConfigConverter.java
β βββ EnvironmentVariablesConverter.java
βββ utils/
βββ HashMapConverter.java
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/execute |
Execute HTTP request |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/collections |
Get all collections |
| GET | /api/v1/collections/{id} |
Get collection by ID |
| POST | /api/v1/collections |
Create collection |
| PUT | /api/v1/collections/{id} |
Update collection |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/environments |
Get all environments |
| GET | /api/v1/environments/{id} |
Get environment by ID |
| POST | /api/v1/environments |
Create environment |
| PUT | /api/v1/environments/{id} |
Update environment |
| DELETE | /api/v1/environments/{id} |
Delete environment |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/requests |
Get all requests (paginated) |
| GET | /api/v1/requests/{id} |
Get request by ID |
| POST | /api/v1/requests |
Save request |
| PUT | /api/v1/requests/{id} |
Update request |
| DELETE | /api/v1/requests/{id} |
Delete request |
| Profile | Database | Description |
|---|---|---|
dev |
PostgreSQL | Development configuration |
prod |
PostgreSQL | Production configuration |
test |
PostgreSQL | Testing configuration |
# Database Configuration (Production)
DATABASE_URL=jdbc:postgresql://localhost:5432/embedqa
DATABASE_USERNAME=embedqa_user
DATABASE_PASSWORD=embedqa_passSwagger UI is available at: http://localhost:8085/swagger-ui.html
OpenAPI spec: http://localhost:8085/api-docs
We welcome contributions! Here's how you can help:
-
Fork the repository
-
Clone your fork
git clone https://github.com/YOUR_USERNAME/embedqa.git cd embedqa -
Create a branch
git checkout -b feature/your-feature-name
-
Set up the development environment
# Start database cd docker-compose/db docker-compose up -d cd ../.. # Run application ./mvnw spring-boot:run
- WebSocket support
- GraphQL support
- Automated test runner
- Test assertions builder
- Request chaining
- Mock server
- Team collaboration
- Request documentation generator
Akash - GitHub
Made with β€οΈ for developers who need API testing tool