Skip to content

Commit aa9b436

Browse files
misc: readme update
1 parent b4ba0f4 commit aa9b436

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# GitHub Organization Analytics & Leaderboard Platform
1+
# GitHub Organization Leaderboard Platform
22

33
[![Java](https://img.shields.io/badge/Java-21-blue.svg)](https://www.java.com)
44
[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-3.2.0-brightgreen.svg)](https://spring.io/projects/spring-boot)
@@ -8,17 +8,18 @@
88
[![JWT](https://img.shields.io/badge/JWT-Auth-black.svg)](https://jwt.io/)
99
[![Gradle](https://img.shields.io/badge/Gradle-8.5-blue.svg)](https://gradle.org/)
1010

11-
A robust backend platform designed to provide insightful analytics and a competitive leaderboard for GitHub organizations. This application empowers users to track contributor activity, identify top performers, and gain a deeper understanding of their open-source or private projects.
11+
A robust springboot based backend platform designed to provide insightful analytics and a competitive leaderboard for GitHub organizations. This application empowers users to track contributor activity, identify top performers, and gain a deeper understanding of their open-source or private projects.
1212

1313
## Key Features
1414

15-
* **Secure User Authentication:** Implements JWT-based authentication with Spring Security for secure access to the platform.
16-
* **GitHub Organization Integration:** Seamlessly connects with the GitHub API to fetch data about organizations, repositories, and contributors.
17-
* **Contributor Leaderboard:** A core feature that ranks contributors based on their commits, providing a clear view of top performers across an organization's repositories.
18-
* **RESTful API:** A well-documented and easy-to-use RESTful API for all platform functionalities.
19-
* **Scalable & Containerized:** The entire application is containerized using Docker and managed with Docker Compose, ensuring easy deployment, scalability, and environment consistency.
20-
* **Database Migrations:** Utilizes Flyway for version-controlled database schema management, making it easy to track and apply database changes.
21-
* **Caching Layer:** Leverages Redis for caching frequently accessed data, significantly improving response times and reducing the load on the database and GitHub API.
15+
- **Enterprise grade:** Uses all conventions utilized by springboot to separate data layer from business logic from controllers.
16+
- **Secure User Authentication:** Implements JWT-based authentication with Spring Security for secure access to the platform.
17+
- **GitHub Organization Integration:** Seamlessly connects with the GitHub API to fetch data about organizations, repositories, and contributors.
18+
- **Contributor Leaderboard:** A core feature that ranks contributors based on their commits, providing a clear view of top performers across an organization's repositories.
19+
- **RESTful API:** A well-documented and easy-to-use RESTful API for all platform functionalities.
20+
- **Scalable & Containerized:** The entire application is containerized using Docker and managed with Docker Compose, ensuring easy deployment, scalability, and environment consistency.
21+
- **Database Migrations:** Utilizes Flyway for version-controlled database schema management, making it easy to track and apply database changes.
22+
- **Redis Lock & Distributed Locking:** Leverages Redisson to implement Redis-based distributed locks that safely serialize access to the heavy-duty /leaderboard/refresh route, preventing simultaneous leaderboard creation requests and ensuring data consistency during concurrent operations.
2223

2324
## Architecture & Workflow
2425

@@ -29,6 +30,7 @@ The application follows a modern, containerized architecture. The core is a Spri
2930
## Technologies Used
3031

3132
### Backend
33+
3234
- **Java 21**
3335
- **Spring Boot 3.2.0**
3436
- Spring Web
@@ -42,19 +44,22 @@ The application follows a modern, containerized architecture. The core is a Spri
4244
- **Lombok:** To reduce boilerplate code.
4345

4446
### DevOps & Tooling
47+
4548
- **Docker & Docker Compose:** For containerization and orchestration.
4649
- **Gradle:** Dependency management and build automation.
4750
- **Git:** Version control.
4851

4952
## Getting Started
5053

5154
### Prerequisites
55+
5256
- Docker and Docker Compose installed on your machine.
5357
- A `.env` file in the project root.
5458

5559
### Installation & Setup
5660

5761
1. **Clone the repository:**
62+
5863
```bash
5964
git clone https://github.com/abhitrueprogrammer/gh-org-tools.git
6065
cd gh-org-tools
@@ -74,7 +79,5 @@ The application will be accessible at `http://localhost:8080`.
7479

7580
As outlined in the `roadmap.md`, the future vision for this project includes:
7681

77-
* **Enhanced Security:** Encrypting sensitive data like GitHub tokens before storing them in the database.
78-
* **Improved Scalability:** Implementing a message queue (e.g., RabbitMQ, Kafka) for asynchronous processing of leaderboard generation jobs.
79-
* **Distributed Locking:** Using Redis-based distributed locks to prevent race conditions and ensure data consistency during concurrent operations.
80-
* **GitHub Token Management:** Allowing users to update their GitHub tokens through the API.
82+
- **Improved Scalability:** Implementing a message queue (e.g., RabbitMQ, Kafka) for asynchronous processing of leaderboard generation jobs.
83+
- **GitHub Token Management:** Allowing users to update their GitHub tokens through the API.

flow.png

-93.7 KB
Loading

roadmap.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
1. change github token
2-
2. Redis-based distributed lock with expiry to store midway
3-
3. encrypt github token
4-
4. Instead of synchronous processing, use a queue (e.g. RabbitMQ, Kafka) to asynchronously process leaderboard jobs.
1+
1. Instead of synchronous processing, use a queue (e.g. RabbitMQ, Kafka) to asynchronously process leaderboard jobs.
52

src/main/java/com/uni/ghorgtool/controllers/Leaderboard.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ public ResponseEntity<LeaderboardResponse> leaderBoardGet(
6868

6969
List<com.uni.ghorgtool.models.Leaderboard> leaderboard = leaderboardService.getTopContributorsByOrgId(orgId,
7070
limit);
71-
71+
if(leaderboard.isEmpty()){
72+
throw new LeaderboardException("Leaderboard data not found. Please refresh the leaderboard first.");
73+
}
7274
List<LeaderboardResponse.ContributorCommits> contributorList = leaderboard.stream()
7375
.map(entry -> new LeaderboardResponse.ContributorCommits(entry.getUsername(), entry.getCommits()))
7476
.collect(Collectors.toList());

0 commit comments

Comments
 (0)