Despensa-app is an app that allows you to manage those products that you often buy.
This project provides with the needed resources for web project.
Features
- View/Create/Update/Delete lists
- Public lists
- Lists by user (private)
- Add products to the list
- Filter products
- View product information
- Tick off products on a list
- Create a user
- Authentication
- JWT Authorization
- Management (Pending)
- Java 21
- MySQL 8
- Maven 3.9.7 (Optional)
- Create the
despensa_app
schema. - Set the password for the
root
user in thespring.datasource.password
property of the application.properties file. - Manually execute the following scripts:
Open a terminal in the root of the project and run the following commands:
.\mvnw clean install
.\mvnw spring-boot:run
With this option, we won't need to install MySQL. The scripts (schema.sql
and data.sql
) will always run at
startup, as the application will start with the dockerdev profile.
Start Docker Hub image
docker compose -f compose.despensa-rest-api.yaml up -d
Create image and start
docker compose up --build -d
- Community Edition
- Clone project
- Set local Maven path
- Run configurations
- Enable EditorConfig
- Set save options
- spring-boot-devtools
The following instructions are for the Ultimate version, although most of them work with the Community Edition as well.
You can find a demo of local deployment with the Community Edition available in the discussions section of this repository.
File > New > Project from Version Control
(Not necessary if you intend to use mvnw
)
File > Settings > Build, Execution, Deployment > Build Tools > Maven
- maven home path
Run > Run...
[clean,install]
: Compile the project without test.[clean,install] Tests
: Compile running the test.[spring-boot:run]
: Start the project.App
: Start the project. (IDEA Ultimate version)docker compose
: Create an image and start the project.docker compose (despensa-rest-api)
: Start the docker hub image.
EditorConfig support needs to be enabled:
Settings > Editor > Code Style
- Enable Editor Config Support
I recommend enabling the save actions: Reformat code and Optimize imports.
Settings > Tools > Actions on save
EditorConfig needs to be enabled.
Enable automatic project compilation:
Settings > Build, Execution, Development > Compiler
- Build project automatically
When starting the application, we can access the following URL and test the available resources:
As an alternative to Swagger, you can fork or view the application's resource collection at the following link:
Any contribution you make will be greatly appreciated.
Before you start coding, please read the contribution guidelines.
Thanks to JetBrains for providing a license for IntelliJ IDEA to develop this project.
JetBrains | IntelliJ IDEA |
---|---|