Documentation of micro-magic
- Understand Spring Fundamental, Main Framework. Java Framework
- Understand The SOLID Principle and KISS Principle for better write the code.
- Understand Microservice Architecture, Clean Architecture, and/or Hexagonal Architecture.
- Understand Repository Design Pattern or Data Access Object Design Pattern.
- Understanding [Docker][ref-docker].
Describes which version.
- Easy to maintenance
- Stateless authentication and authorization
- Repository Design Pattern or Data Access Layer Design Pattern
- Adopt SOLID and KISS principle
- Support for Microservice Architecture, Clean Architecture
- Spring 3
- Authentication (
Access Token
) - Multi-tenant with MongoDB
- MongoDB
- Multi Database (MongoDB)
- Can use SQL
-###-
-###-
- Support Docker installation
- Support CI/CD (eg: Gitlab pipeline)
-###-
Before start, we need to install some packages and tools. The recommended version is the LTS version for every tool and package.
Make sure to check that the tools have been installed successfully.
- [Java][ref-java]
- [Maven][ref-maven]
- [Git][ref-git]
Clone the project with git.
git clone https://gitlab.com/Magictruks/micro-magic.git
This project needs some dependencies. Let's go install it.
mvn clean package
If you want to use Docker, follow this steps
cp .env.docker.example .env.docker
Modify env file as you need, and build your images
docker build .
Run your containers
docker compose up --force-recreate
You need to create Database. Login to your MySQL Container
mysql -h 127.0.0.1 -P 3306 -u root -p
Create your database
CREATE DATATABLE db_name
Restart your container
docker compose up
mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec 2>/dev/null