
๐ API Key Management & Rate Limiting Service
A production-style backend service built with Java & Spring Boot that enables developers to generate API keys and securely access protected APIs with rate limiting, usage quotas, and authentication.
This project demonstrates real-world backend engineering practices including API security, request throttling, concurrency handling, containerization, CI/CD, and cloud deployment.
๐ Key Features
๐ User Authentication โ Secure user registration and login using JWT
๐ API Key Management โ Generate and revoke API keys for controlled access
โฑ Rate Limiting โ Fixed-window algorithm to prevent API abuse
๐ Usage Tracking โ Monitor API usage with request logging
๐
Monthly Quotas โ Limit total requests per API key
โก Concurrency Protection โ Optimistic locking prevents race conditions
๐ฆ Containerized Deployment โ Docker & Docker Compose setup
โ๏ธ Cloud Deployment โ Hosted on AWS EC2
๐ Structured API Responses โ Standardized response and error format
๐ CI/CD Automation โ Deployment pipeline using GitHub Actions
๐ API Documentation โ Swagger / OpenAPI integration
๐ System Architecture
Client โ โผ Spring Boot API โ โโโ JWT Authentication โโโ API Key Validation โโโ Rate Limiting Engine โโโ Usage Logging โ โผ PostgreSQL Database
๐งฐ Tech Stack
Backend
Java 17
Spring Boot
Spring Security
Spring Data JPA (Hibernate)
Authentication & Security
JWT (JSON Web Tokens)
BCrypt Password Hashing
API Key Hashing (SHA-256)
Database
PostgreSQL
DevOps & Deployment
Docker
Docker Compose
GitHub Actions CI/CD
AWS EC2
๐ Project Structure
src/main/java/com/hdev/apikeymanager โโโ controller โโโ service โโโ repository โโโ entity โโโ dto โโโ security โโโ exception โโโ config
โ๏ธ Running the Project Locally
1๏ธโฃ Clone Repository
git clone https://github.com/<your-username>/apikeymanager.git cd apikeymanager
2๏ธโฃ Build Project
mvn clean package
3๏ธโฃ Run with Docker
docker-compose up --build
Application runs at:
Swagger API docs:
โ๏ธ Cloud Deployment (AWS EC2)
Deployment steps used:
Launch EC2 instance (Ubuntu 22.04)
Install Docker & Docker Compose
Clone repository
Start containers
docker-compose up --build -d
API accessible at:
http://<EC2_PUBLIC_IP>:8081
๐ Example API Flow
Register User
POST /api/auth/register
Login
POST /api/auth/login
Create API Key
POST /api/keys
Access Protected API
GET /api/data Header: X-API-KEY: <your-api-key>
๐ Backend Concepts Demonstrated
Fixed-window rate limiting
API key hashing (SHA-256)
Optimistic locking for concurrency control
Centralized exception handling
Structured API responses
Containerized backend deployment
CI/CD automation
๐จโ๐ป Author
Umme Hani
Backend Developer | Java | Spring Boot
GitHub: https://github.com/Ummehani18
๐ License
MIT License
About
No description, website, or topics provided.
Resources
Readme
Stars
1 star
Watchers
0 watching
Forks
Releases 1 (1)
API Key Manager v1.0Latest
Mar 11, 2026
Contributors 2 (2)


Languages
0 likes ยท 9 views ยท Aug 10, 2026
Production-style Java/Spring Boot backend to generate and manage API keys with authentication, rate limiting, quotas, logging, and containerized deployment.