- 1. Project Description
- 2. Technologies
- 3. Setup
- 4. Application Configuration
- 5. API Spec
- 6. Unit tests
- 7. Postman Collection
This project provides a REST API endpoint that allows clients to retrieve a subset of publicly available GitHub user data by supplying a GitHub username.
The service integrates with the official GitHub REST API, aggregates the required information, and returns a simplified and structured JSON response as shown in the example below:
{
user_name: "octocat",
display_name: "The Octocat",
avatar: "https://avatars.githubusercontent.com/u/583231?v=4",
geo_location: "San Francisco",
email: null,
url: "https://api.github.com/users/octocat",
created_at: "Tue, 25 Jan 2011 18:44:36 GMT",
repos: [{
name: "boysenberry-repo-1",
url: "https://api.github.com/repos/octocat/boysenberry-repo-1
}, ...
]
}
The technologies used to develop this system which it depends on were:
- Java 21
- SpringBoot 3.3.2
- Maven 3.6.3_1
The application can be started using Maven.
To start the Application go to the root directory of the project and run:
mvn spring-boot:run
To stop the application from the terminal where it's running:
ctrl+c
The configuration file is available in the src/main/resources folder.
The API specification can be found at the following locations:
- Swagger API Spec: http://localhost:8081/swagger-ui/index.html
To run the unit tests, execute the following command from the root directory of the project:
mvn test
A Postman collection is included in the src/main/resources directory to simplify manual testing of the API endpoints.
This collection contains pre-configured requests that allow you to quickly test the service without manually constructing HTTP requests.
How to use:
- Open Postman
- Click Import
- Select the collection file located in: src/main/resources/github-integration.postman_collection.json
- Run the requests and provide the desired GitHub username as a parameter
This allows you to easily validate the endpoint behavior and test different scenarios.
