Forum API is a RESTful API developed using Java, Spring Boot, Lombok, Jakarta, MySQL, and JWT. It allows users to manage posts, responses to the posts, and user authentication.
- Create, Read, Update, and Delete (CRUD) operations for posts and responses.
- User authentication with JWT and BCrypt for secure access.
- Two types of delete operations: normal delete and boolean delete.
- Flyway integration for database schema management.
-
Clone the repository.
-
Install the required dependencies.
-
Run the application.
- Make HTTP requests to the API endpoints to manage posts, responses, and users.
- Ensure you have the necessary authentication token (JWT) to access secure endpoints.
-
GET /topics: Get all topics.
-
GET /topics/{topicId}: Get a specific topic by ID.
-
POST /topics: Create a new topic.
-
PUT /topics/{topicId}: Update an existing topic.
-
DELETE /topics/admin/{topicId}: Delete a topic (normal delete).
-
DELETE /topics/{topicId}: Soft delete a topic (boolean delete).
-
GET /responds: Get all responses.
-
POST /responds: Create a new response.
-
DELETE /responses/{responseId}: Soft delete a response (boolean delete).
-
POST /login: User login to get JWT token.
-
POST /register: Register a new user.
- For secure endpoints, include the JWT token in the Authorization header with the Bearer scheme. I used Auth0.
Contributions are welcome! Please feel free to open issues and pull requests.
💙 Emerson González