GSSOC'26 contributors read this first
Leet Journal is a Spring Boot microservices project for tracking LeetCode progress, managing problem metadata, authenticating users, sending mail, and experimenting with AI-assisted problem solving.
The repository is organized as a set of independently runnable services:
authhandles authentication and authorization server concerns.gatewayis the public entry point and forwards requests to backend services.problems-serviceserves problem data and execution endpoints.batch-serviceis responsible for batch ingestion and scheduled-style processing.mail-servicesends MIME email notifications.ai-servicestreams AI responses for DSA help.
The system follows a gateway-first microservice layout.
flowchart LR
U[User / Frontend] --> G[Gateway :9000]
G --> P[Problems Service :8001]
G --> M[Mail Service :8002]
G --> A[AI Service :8003]
P --> DB[(PostgreSQL)]
B[Batch Service] --> DB
AU[Auth Service :8000] --> DB2[(PostgreSQL auth DB)]
P -. JWT validation .-> AU
G -. OAuth2 login .-> AU
M --> SMTP[(SMTP / Gmail)]
A --> GENAI[(Google Gemini)]
- The client talks to
gatewayon port9000. gatewayrelays authenticated requests to the downstream services./problems/**and/code/**are forwarded toproblems-serviceon port8001./mail/**is forwarded tomail-serviceon port8002./ai/**is forwarded toai-serviceon port8003.authruns on port8000and issues tokens consumed by the other services.
authprovides the OAuth2 authorization server and persists identity data in PostgreSQL.problems-serviceexposes endpoints for listing problems, fetching a problem by id, checking the current authenticated user, and running code locally.batch-serviceloads problem data from CSV and stores it in the database.mail-servicesends email notifications using SMTP.ai-servicewraps the Google GenAI client and streams chat-style responses.
Each service is a standalone Maven project:
auth/gateway/problems-service/batch-service/mail-service/ai-service/
The services are intentionally separate so they can be developed, tested, and deployed independently.
- Java 25
- Maven Wrapper or Maven
- PostgreSQL
- SMTP credentials for mail delivery
- Google GenAI API key for the AI service
The current repository version is tracked in the root VERSION file.
Common local defaults are defined in each service’s application.yml or application.yaml file.
Environment variables used by the project include:
GMAIL_MAIL_USERNAMEGMAIL_MAIL_PASSWORDGOOGLE_GENAI_API_KEYAUTH_SERVER_URIfor overriding the auth server location used by the gateway
PostgreSQL connection defaults used by the services point to jdbc:postgresql://localhost:5432/db with the username user and password pass.
You will need a PostgreSQL database running for the application. Best way to do this is to run a container using Docker / Podman and configuring your environment variables. By default the application expects the container on port 5432 with the following config: Database name -> db Username -> user Password -> pass
Start the services in this order (to prevent unnecessary errors):
- PostgreSQL Database (container or locally)
authproblems-servicemail-serviceai-servicegatewaybatch-service- only if you want to import data or run batch jobs
Use the Maven Wrapper from each service directory, for example:
cd auth
./mvnw spring-boot:runRepeat the same pattern for the other services.
GET http://localhost:9000/problems/allGET http://localhost:9000/problems/find/{id}GET http://localhost:9000/code/runGET http://localhost:9000/mail/mime?to=...&subject=...&text=...GET http://localhost:9000/ai/chat?prompt=...
This project is under active development and is intended to grow as an open source learning platform for LeetCode practice and DSA tooling. Contributions are welcome. If you are planning a larger change, open an issue first so the approach can be aligned before implementation.
- Small, reviewable pull requests.
- Clear commit messages and PR descriptions.
- Tests for new behavior when practical.
- Documentation (future implementation) updates when behavior or setup changes.
- The Spring Documentation.
- Dan Vega's youtube tutorials.
- Follow the existing Spring Boot structure in each service.
- Keep controllers thin and push business logic into services.
- Prefer explicit configuration in the service
application.ymlfiles. - Avoid introducing unnecessary dependencies unless they materially improve the codebase.
This project is under active development and is intended to grow as an open source learning platform for LeetCode practice and DSA tooling.