Live on : http://18.223.31.27:8765/api/v1/swagger-ui/index.html#/
BlogFreak API is a comprehensive backend service designed to manage blog content, user authentication, and more. Built with Spring Boot, it provides a robust, scalable RESTful API, leveraging AWS services for deployment and database management.
User Authentication & Authorization: Secure JWT-based authentication and authorization.
Blog Management: Full CRUD operations for managing blogs, likes, and users.
Rate Limiting: Implemented with bucket4j and Guava.
Custom Exception Handling: Graceful handling of errors with meaningful messages.
Role-Based Access Control: Fine-grained control over user roles and permissions.
Swagger/OpenAPI Integration: Comprehensive API documentation for easy exploration.
βββ src
β βββ main
β β βββ java
β β β βββ com.blogfreak
β β βββ resources
β β βββ application.properties
βββ .env
βββ pom.xml
βββ README.md
Before you start, ensure you have:
Java 17 installed
Maven 3.8+ installed
AWS EC2 instance for deployment (for Production Deployment)
AWS RDS for database management (configured in application.properties) (for localhost - MySQL)
git clone https://github.com/manu-karenite/blogfreak-api.git
cd blogfreak-api
Install Dependencies:
mvn clean install
Run the Application:
mvn spring-boot:run
Explore and test the API endpoints via the Swagger UI:
Swagger UI: http://localhost:8765/api/v1/swagger-ui/index.html
The application.properties file in src/main/resources/ contains all the configuration settings, including database connections, JWT settings, and other necessary configurations.
Security is managed using Spring Security with JWT tokens. You can customize security settings in src/main/java/com/blogfreak/config/SecurityConfig.java.
Rate limiting is implemented globally across all endpoints using bucket4j and Guava. Customize these settings in the RateLimitingFilter class.
Environment variables are loaded from a .env file using the spring-dotenv library. Ensure your AWS RDS credentials and other sensitive data are correctly set up here.
To deploy the BlogFreak API on AWS EC2:
Contributions are welcome! Here's how you can get started:
This project is licensed under the MIT License - see the LICENSE file for details.