Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/otf31/foro_hub
Alura Challenge (Foro Hub)
https://github.com/otf31/foro_hub
flyway-migrations jpa-hibernate kotlin postgresql spring-boot spring-starter-web
Last synced: 14 days ago
JSON representation
Alura Challenge (Foro Hub)
- Host: GitHub
- URL: https://github.com/otf31/foro_hub
- Owner: otf31
- Created: 2024-11-05T03:42:19.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-21T20:26:56.000Z (about 2 months ago)
- Last Synced: 2024-11-21T21:26:57.763Z (about 2 months ago)
- Topics: flyway-migrations, jpa-hibernate, kotlin, postgresql, spring-boot, spring-starter-web
- Language: Kotlin
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Foro Hub
This project is a REST API to manage topics in a forum.This is a challenge project.
## How to run
1. Clone the repository.
2. Create a PostgreSQL database.
3. Set the database connection in the `application.properties` file.
4. Install the project dependencies with the command `mvn install`.
5. Run the project with the command `mvn spring-boot:run`.
6. The API documentation will be available at `http://localhost:8080/swagger-ui.html`.## Available endpoints
### Users
- `POST /auth/login`: Login with a user.At this moment, there is no endpoint to create a user. The users are created directly in the database.
### Topics
- `GET /topics`: Get all topics with pagination.
- `GET /topics/{id}`: Get a topic by id.
- `POST /topics`: Create a new topic.
- `PUT /topics/{id}`: Update a topic by id.
- `DELETE /topics/{id}`: Delete a topic by id.
- `GET /ten-most-recent`: Get the ten most recent topics.## Authentication
The API uses JWT to authenticate the users. To access the endpoints, you need to pass the token in the header of the request.## Database
The database is created with Flyway. The migration files are in the `resources/db.migration` folder.## Tests
The tests are in the `src/test` folder. The project has unit tests for the services and controllers.## Improvements
- Create an endpoint to create a user.
- Add integration tests.
- Add more validations.
- Add more error handling.
- Add more documentation.
- Add more security configurations.## Technologies
- Kotlin: Main programming language.
- Spring Boot: Framework to create the REST API.
- PostgreSQL: Database to store the data.
- Maven: Dependency management.## Author
- [LinkedIn](https://www.linkedin.com/in/denis-omar-cuyo-ttito-421a02334)
- [GitHub](https://github.com/OTF31)