A professional Spring Boot application for searching GitHub repositories and storing them for further analysis.
- GitHub Search API Integration: Fetches repositories based on query, language, and sort criteria.
- Local Persistence: Stores fetched data in PostgreSQL with high-performance JPA batching.
- RESTful API: Clean endpoints for searching and retrieving stored data with pagination.
- Production Ready:
- Secure configuration using environment variables.
- Comprehensive Swagger/OpenAPI documentation.
- Robust error handling and validation.
- Java 17
- Spring Boot 4.0+
- Spring Data JPA (PostgreSQL)
- MapStruct (Entity-DTO mapping)
- Lombok
- SpringDoc OpenAPI (Swagger)
- JUnit 5 & Mockito (Testing)
- JDK 17 or higher
- PostgreSQL (or Supabase)
- Maven (included via
./mvnw)
The application uses an .env file for sensitive configuration. Create a .env file in the root directory:
DB_URL=jdbc:postgresql://your-db-host:5432/postgres
DB_USERNAME=your-username
DB_PASSWORD=your-password./mvnw spring-boot:runThe application will be available at http://localhost:8080.
- Swagger UI:
http://localhost:8080/swagger-ui.html - OpenAPI Specs:
http://localhost:8080/api-docs - Health Check:
http://localhost:8080/actuator/health
./mvnw test