A simple Spring Boot app which displays a list of beers, information about them and allows the user to rate them. Supports user registration, authentication, search and rate functionality.
- Clone the repository to your local machine. Ensure you have Java 17, Maven, MySQL & Redis installed.
- To run locally:
- Update the database credentials in
application.yml
. - Start MySQL
- Start Redis (If you're using Windows, for easiness, run Redis using docker like so:
docker run --name redis-dev -p 6379:6379 -d redis
) - Run the app using maven with
mvn spring-boot:run
or using your preferred IDE.
- Update the database credentials in
- Alternatively, use Docker:
docker run -p 8080:8080 --name spring-app my-spring-app
docker-compose up --build
- While the app is running, you can:
- Access the app's endpoints via browser,
cURL
, or any API client of your choice.
A list of available endpoints (as JSON) can be found here. - Explore the interactive API documentation via Swagger for more info.
- Check the application's health status using the Actuator health check endpoint
- Access the app's endpoints via browser,
- View all beers
- View a beer's details
- Sign up
- Log in
- View all user's ratings
- Add/Edit rating to beer
- Delete rating of beer
- View account info
- Beers:
- Add a new beer
- Edit an existing beer's info
- Delete a beer
- Users:
- View all users
- Delete a user
- Countries:
- Get all countries
- Add a country
- Delete a country
- Used JWT for authentication
- Used Redis for country management (since they're only stored as a
String
, this was a simple and effective solution, more light-weight than adding another SQL table.) - Used OpenAPI for documentation
- Used Bruno for testing
- Used JUnit & Mockito for testing
- Introduce docker
- Send verification emails to users upon sign up / add verification logic
- Implement FE
- Implement recommendation system
For comments, ideas, issues or general talks about this project, feel free to open an issue.