Lightweight Jakarta–based framework designed with Clean Architecture principles. Focused on performance, security, and a clear structure for modern backend applications.
- Custom framework built from scratch using Servlets, CDI, and annotation-based controllers and routing.
- Advanced security: JWT with refresh/rotate tokens, CSRF protection, and structured auditing.
- Multi-layer caching: Hibernate L1/L2 + Ehcache.
- Rate limiting using the Leaky Bucket algorithm.
- Messaging with JMS/ActiveMQ (Artemis) for asynchronous events.
- JSR-303 validation with custom annotations and composite validators.
- Observability: correlation-ID logging, metrics, and health checks.
- DTO mapping powered by MapStruct.
- Java 21, Jakarta
- Weld CDI, Hibernate, Ehcache
- JJWT, Jackson, SLF4J/Logback
- JUnit 5 + Mockito
- PostgreSQL, OkHttp
- Maven 3.6+
- Java -> 11 -> 17 -> 21
- Javax -> Jakarta
- Tomcat 9 -> 10
- Hibernate 5 -> 6
Built the following Clean Architecture guidelines:
- Domain: entities, value objects, and business rules
- Application: use cases and orchestration
- Web: controllers, routing, and HTTP adapters
- Infrastructure: persistence, messaging, and external integrations
- Adapters: Class implementations for interfaces defined in other layers
Each layer remains strictly independent — infrastructure never leaks into the domain.
The framework includes its own lightweight MVC layer: annotation scanning, reflection-based routing, a middleware pipeline, and a central dispatcher to manage request flow.
The demo application includes a modern UI.
Click here to see more.
First, load the default environment variables and customize the .env file as needed:
cp .env.example .envPull the demo docker-compose file and start the services:
curl -O https://raw.githubusercontent.com/m-feliciano/javaee-framework/refs/heads/master/docker-compose.demo.yml
docker compose -f docker-compose.demo.yml up -d Note: You may provide your own .env file to override default settings if you want to use functionality like email
sending.
Run with Docker Compose:
docker-compose -f docker-compose.demo.yml up -dRead the docker-compose file at docker-compose.yml to set up the PostgreSQL and ActiveMQ services.
The application exposes some endpoints. Here are examples:
POST /api/v1/auth/login- Authenticate with username/passwordGET /api/v1/product/list- List productsGET /api/v1/health/live- Liveness probeGET /api/v1/user/{id}- Get user details
The base URL is http://localhost:8080 by default (local).
Example of a complete url to list products: http://localhost:8080/api/v1/product/list
If you want to see all available endpoints, check the Docs tab in the demo application UI or refer to the source code.
MIT — see the LICENSE file.
Contributions are welcome. See CONTRIBUTING.md for guidelines.