Skip to content

Spring Boot application that searches GitHub repositories via the GitHub Search API, stores them in PostgreSQL, and exposes RESTful endpoints with OpenAPI documentation.

Notifications You must be signed in to change notification settings

ChrisDc777/gitsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Repository Searcher

A professional Spring Boot application for searching GitHub repositories and storing them for further analysis.

🚀 Features

  • 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.

🛠️ Technology Stack

  • Java 17
  • Spring Boot 4.0+
  • Spring Data JPA (PostgreSQL)
  • MapStruct (Entity-DTO mapping)
  • Lombok
  • SpringDoc OpenAPI (Swagger)
  • JUnit 5 & Mockito (Testing)

📋 Prerequisites

  • JDK 17 or higher
  • PostgreSQL (or Supabase)
  • Maven (included via ./mvnw)

⚙️ Configuration

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

🏃 Running the Application

./mvnw spring-boot:run

The application will be available at http://localhost:8080.

📖 API Documentation

  • Swagger UI: http://localhost:8080/swagger-ui.html
  • OpenAPI Specs: http://localhost:8080/api-docs
  • Health Check: http://localhost:8080/actuator/health

🧪 Testing

./mvnw test

About

Spring Boot application that searches GitHub repositories via the GitHub Search API, stores them in PostgreSQL, and exposes RESTful endpoints with OpenAPI documentation.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages