Skip to content

Latest commit

ย 

History

History
142 lines (98 loc) ยท 4.6 KB

File metadata and controls

142 lines (98 loc) ยท 4.6 KB

MIT License logo.png

Please select your favorite engineering paradigm

Build RESTful, stateless, cloud-native, three-tier Docker-based architectural applications around type-safe, reusable, Debug-enabled SQL with databases as first-class citizens.

Build RESTful, stateless, cloud-native, Docker-based, domain-driven applications with models, domains, and modules as first-class citizens around the revolutionary modern ORM.

Database First

Mjga is a completely redesigned, modern Java Web scaffolding built on a cloud-native philosophy with the following features:

  • Containerized applications
  • Components that can be loaded and unloaded
  • Reputable unit testing
  • Customizable meta-information

๐Ÿฅ Template Selection

stack_dbfirst_en.png

๐Ÿ… Component Configuration

stack_en.png

๐Ÿน Custom Metadata

meta_en.png

Containerization and Cloud-Native

  1. Manage the entire lifecycle and configuration of the application via docker-compose.yml.
  2. Customize all configurations through the .env file.
  3. Deliver the entire application and its ecosystem components via docker-compose.yml.

Out-of-the-Box

  1. Integrates common basic business functionalities such as authentication, permission management, and cache abstraction.
  2. Code Check & Format, CI/CD Plugin, Docker Integration are all ready to use out of the box.
  3. Comprehensive, design-driven, and environment-isolated unit testing.

Modernization

  1. Modern: Technology choices align with the latest trends in the open-source community.
  2. Configurable: Supports component selection on the web.
  3. Best Practices: Every variable, function, module, and component is designed with best practices in mind.
  4. Focused Boundaries: Stays within its functional boundaries, avoiding an "All In One" approach.

Quick Start

Confirm Environment Variables and Execution Permissions

# confirm .env and make sure process can use it
vim ${projectRoot}/.env
# confirm gradlew executable (unix-like OS)
chmod 755 ${projectRoot}/gradlew

Install Docker and Start Containers

cd ${projectRoot}
docker compose up -d database
docker compose build web
docker compose up -d web

(Optional) Start Locally

# confirm .env and gradle.properties make sure process can use it
vim ${projectRoot}/.env
docker compose up -d database
./gradlew jooqCodegen
${projectRoot}/gradlew bootRun

Common Tools

Compile the Project and Generate Table Mapping Objects and Data Access Layer Based on Database Schema

# generate schema mapping codes
./gradlew jooqCodegen
# output ->
# projectRootDir/build/generated-sources
# โ””โ”€โ”€ org.jooq.generated
#    โ””โ”€โ”€ tables # table mapping
#       โ”œโ”€โ”€ daos # Data Access Layer
#       โ”œโ”€โ”€ pojos # mapping dto
#       โ””โ”€โ”€ records # jooq query record

Global Code Formatting

./gradlew spotlessApply

Global Code Inspection

./gradlew pmdMain

Unit Testing

# will automatically generate jacocoTestReport
./gradlew test

ๆ›ดๅคšๆ–‡ๆกฃ่ฏท็‚นๅ‡ป...

๐Ÿ“ Test Report

summary

๐ŸŸ Miscellaneous

  1. This repository is primarily for code display and issue collection. The code may lag behind the version available for download from the product's official website.
  2. Please submit any feedback, discussions, or bugs to the issue tracker, and I will handle them seriously.
  3. I also welcome any ideas from other communities and will actively participate in the replies.
  4. More new video tutorials are being recorded, please stay tuned.
  5. Promote Mjga to your colleagues and friends, and let Java be great again.

๐Ÿ”ฎ User Community

Static Badge Static Badge Static Badge Static Badge