This project is a Spring MVC application designed for creating REST APIs with the following key features:
- Spring MVC Architecture for REST API Creation
- JWT Authentication
- Swagger for API Documentation
- AWS Deployment using Beanstalk Service
- MySQL for Data Storage
The project encompasses various entities and relationships:
- Category Table: Stores category details with a one-to-many relationship with posts.
- User Entity: Manages user information.
- Post Entity: Contains post content and title, with a one-to-many relationship with comments.
- Comment Entity: Stores comment information, associated with posts.
- Role Entity: Holds role information.
- Role_User Entity: Tracks role assignments to users.
Each entity has its own REST controller API supporting CRUD operations. Additionally, the project includes APIs for user login, token generation, and user registration. JWT authentication secures these APIs by generating tokens used for authentication during access of the api's.
pagination, sorting, searching is implemented for the post api.
API documentation is facilitated through Swagger, providing clarity and ease of use for developers.
Finally, the project is deployed and hosted on AWS using the Beanstalk service for scalability and reliability.
To run the project locally, follow these steps:
- Clone the repository from GitHub.
- Configure the MySQL database and update the application.properties file with the database credentials.
- Build the project using Maven.
- Run the application using your preferred IDE or command line.
- Access the APIs using the provided endpoints.
/api/categories
: CRUD operations for categories./api/users
: CRUD operations for users./api/posts
: CRUD operations for posts./api/comments
: CRUD operations for comments./api/roles
: CRUD operations for roles./api/auth/login
: Endpoint for user login and token generation./api/auth/register
: Endpoint for user registration.
API documentation is available via Swagger. Access the Swagger UI by navigating to /swagger-ui.html
after running the application.
The application is hosted on AWS using the Beanstalk service. Access the deployed application using the provided URL.
- Spring Boot
- Spring MVC
- MySQL (Database)
- Swagger
- AWS Beanstalk
- Suman Saurabh - Developer
Feel free to contribute to the project by opening issues or pull requests.
This project is licensed under the MIT License.