Implementing Trébol API v1.5.0.
Please take a look at the CHANGELOG.md
file to review the latest changes and additions.
- Uses Project Lombok
- You should have the correct plugin in your IDE to integrate with it.
- Here's a list of compatible software with their installation guides
- Exposes a RESTful API
- Supports all operations as described by the document
- Filtering, sorting and pagination of data are implemented through query params
- Login, registration and guest accounts
- Checking out with user or guest accounts
- Uses Spring Data JPA
- Annotated entity classes; including constraints and indexes where they are most needed at scale
- Bundles drivers for H2 and MariaDB, but can virtually connect to any JDBC-compatible database with the correct driver
- Annotated entity classes; including constraints and indexes where they are most needed at scale
- Uses Spring Security
- Implements stateless session authentication/autorization through JSON Web Tokens with aid from the JJWT library
- Paired with
users
,roles
, andpermissions
database tables (see/src/main/resources/data.sql
for an example setup with 4 roles and users) - Do note that Authorities required in some controllers are hard-coded. These must match entries in the
permissions
table
- Paired with
- Passwords are encoded using BCrypt
- Implements stateless session authentication/autorization through JSON Web Tokens with aid from the JJWT library
- Integrates payments with Webpay Plus by Transbank (Java SDK repo)
- On due time, it may be possible to integrate more popular payment services such as Paypal and Stripe
- Integrates mail notifications with Mailgun (an account and API key are required)
- Self-evident properties files for configuring mission-critical parameters such as
- CORS mappings
- JWT secret key and duration
- BCrypt algorithm strength
- Webpay integration endpoints
- Mailgun & general mail properties
This schema was designed in a couple minutes using Azimutt, a MIT-licensed, handy navigation and diagram visualization tool for Entity-Relationship models.
- JDK 11+
- Apache Maven 3.6.0
After cloning the repository, run mvn verify
, grab a drink and wait a little.
That command will:
- Download & install dependencies
- Compile the project
- Generate the WAR package file
- Install it to your local maven repo
- Run unit tests
- Check code coverage
The important step here is to compile the project first, because some classes (QueryDSL types such as QUser
, QProduct
and so on) are unversioned.
Instead, these classes are generated through a Maven plugin included within the project dependencies.
If for any reason you fail to compile, please run mvn clean generate-sources
and try it again.
Also don't forget to install any Project Lombok plugin for your IDE if you don't have it already.
You can quickly run the application over an embedded server by executing mvn spring-boot:run
Mailgun integration will only be available if the mailgun
profile is active. Please read the application-mailgun.empty.properties
file and this bit of the Spring Boot documentation to know how to proceed with that.
The default configuration profile, which is located at /src/main/resources/application.properties
contains sane default settings and brief summaries of what everything does.
You can run the application out-of-the-box with these, though you should have a look at it.
Also remember, that Spring Boot does support using more than one profile at once. This and this section of the Spring Boot guide can help you understand these mechanisms.
Please review the contributing guidelines before proceeding.
Thanks goes to these wonderful people (emoji key):
Amigoscode 🤔 |
bglamadrid 💻 🎨 |
Trang Nguyen 💻 |
Parundeep Singh 💻 |
Markus Mutas 💻 |
vaishakhvh 💻 |
Rod Fetalvero 💻 |
mepox 💻 🚧 🤔 👀 |
angelmr 💻 |
Shivam Purohit 💻 |
Ujwal Kumar 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!