A modern enterprise management platform built with Spring Boot 4.0.0-M3 and Angular 20, featuring reactive architecture, comprehensive user management, role-based access control, and advanced security features.
- Features
- Quick Start
- Prerequisites
- Installation
- Configuration
- API Reference
- Testing
- Deployment
- Technology Stack
- Contributing
- License
- Acknowledgements
- Multi-tenant Architecture: Full tenant isolation with dedicated resources and configurations
- User Management: Complete user lifecycle management with roles, permissions, and profile customization
- Group Management: Hierarchical group structures with member management
- Role-Based Access Control (RBAC): Granular permission system with inheritance and constraints
- Menu Management: Dynamic menu configuration with conditional visibility and access control
- Audit Logging: Comprehensive system activity tracking with search and analytics
- OAuth2 Integration: Support for GitHub and other OAuth2 providers
- Captcha Verification: Enhanced security with captcha protection for authentication
- Reactive Architecture: Built with Spring WebFlux for high performance and scalability
- R2DBC Database Access: Reactive database connectivity with PostgreSQL
- Redis Integration: Distributed caching and session management
- HTTP/2 Support: Modern protocol for improved performance
- Server-Side Rendering: Angular SSR for improved SEO and initial load times
- Progressive Web App: PWA capabilities with service worker support
- GraalVM Native Image: Support for native compilation with GraalVM
- Flyway Migrations: Automated database schema management
- JWT Authentication: Stateless authentication with secure token management
- CSRF Protection: Advanced cross-site request forgery protection
- Session Management: Redis-based distributed session storage
- Captcha Protection: Visual verification for login security
- OAuth2 Client: External authentication provider integration
- Security Headers: Comprehensive security headers configuration
- Audit Trail: Detailed security event logging and monitoring
- Java: OpenJDK 25 or later (required for Spring Boot 4.0.0-M3)
- Database: PostgreSQL 17+ with SSL support
- Cache: Redis 7.0+ for session storage, caching, and pub/sub
- Build Tool: Gradle 8.14+ with Kotlin DSL
- Note: Spring Boot 4.0.0-M3 requires Java 21+ and includes breaking changes from Spring Boot 3.x
- Node.js: 22.0+ (LTS recommended)
- Package Manager: npm 9.0+ or yarn 1.22+ or pnpm 8.0+
- Browser Support: Modern browsers (Chrome 90+, Firefox 88+, Safari 14+, Edge 90+)
- Container: Docker 24+ and Docker Compose v2
- CI/CD: GitHub Actions or Jenkins
- Monitoring: Prometheus and Grafana (optional)
-
Install Java 25
# Ubuntu/Debian sudo apt install openjdk-25-jdk # macOS brew install openjdk@25 # Windows # Download from https://adoptium.net/
-
Install PostgreSQL
# Ubuntu/Debian sudo apt install postgresql postgresql-contrib # macOS brew install postgresql # Start PostgreSQL sudo systemctl start postgresql
-
Install Redis
# Ubuntu/Debian sudo apt install redis-server # macOS brew install redis # Start Redis sudo systemctl start redis
-
Install Node.js 22+
# Using nvm (recommended) curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash nvm install 22 nvm use 22 # Windows (using nvm-windows) # Download from https://github.com/coreybutler/nvm-windows/releases nvm install 22.0.0 nvm use 22.0.0
-
Clone and Setup
git clone https://github.com/vnobo/plate.git cd plate -
Database Configuration
# Create database sudo -u postgres psql CREATE DATABASE plate; CREATE USER farmer WITH PASSWORD '123456'; GRANT ALL PRIVILEGES ON DATABASE plate TO farmer; \q
-
SSL Certificate Setup (Optional)
# Generate SSL certificate for HTTPS keytool -genkeypair -alias plate -keyalg RSA -keysize 2048 -validity 365 \ -keystore plate.jks -storetype JKS -storepass 123456 -keypass 123456 \ -dname "CN=localhost, OU=PlateUnit, O=PlateOrg, L=Xi'an, ST=Shaanxi, C=CN" keytool -importkeystore -srckeystore plate.jks -srcstoretype JKS -srcstorepass 123456 \ -destkeystore plate.p12 -deststoretype PKCS12 -deststorepass 123456 # Copy to resources cp plate.p12 boot/platform/src/main/resources/
-
Build and Run
# Build the application ./gradlew build # Run with default profile ./gradlew bootRun # Run with local profile ./gradlew bootRun --args='--spring.profiles.active=local' # Run tests ./gradlew test # Build native image (requires GraalVM) ./gradlew nativeCompile
-
Access the Application
- HTTP: http://localhost:8080
- HTTPS: https://localhost:8443 (with SSL)
- Note: Spring Boot 4.0.0-M3 includes enhanced reactive capabilities and improved native image support
-
Install Dependencies
# Navigate to frontend directory cd ui/web # Install dependencies (Angular 20 compatible) npm install # Alternative package managers (optional) # npm install -g pnpm && pnpm install # npm install -g yarn && yarn install
-
Development Server
# Start development server (Angular 20) npm run start # Build for production npm run build # Build for production with SSR npm run build:ssr # Serve SSR application npm run serve:ssr:web # Run tests npm run test # Run tests with coverage npm run test -- --code-coverage
-
Access the Frontend
- Development: http://localhost:4200
- Production (SSR): http://localhost:4000 (after running
npm run serve:ssr:web) - Production: http://localhost:8080 (served by Spring Boot)
- Note: Angular 20 includes improved SSR performance and enhanced developer experience
plate/
βββ boot/ # Backend modules
β βββ platform/ # Core platform module
β β βββ src/main/java/com/plate/boot/
β β β βββ BootApplication.java # Main application class
β β β βββ config/ # Configuration classes
β β β βββ security/ # Security components (OAuth2, captcha, user/group management)
β β β βββ relational/ # Business logic (menus, logging)
β β β βββ commons/ # Common utilities (query fragments, caching, exceptions)
β β βββ src/main/resources/
β β β βββ application.yml # Main configuration
β β β βββ application-local.yml # Local development config
β β β βββ db/migration/ # Flyway database migrations
β β βββ build.gradle # Gradle build configuration
βββ ui/ # Frontend modules
β βββ web/ # Angular 20 frontend with SSR
β βββ src/
β β βββ app/ # Main application
β β β βββ core/ # Core services (HTTP interceptor, token, theme)
β β β βββ pages/ # Page components (dashboard, home, passport)
β β β βββ layout/ # Layout components
β β β βββ plugins/ # UI plugins (modals, alerts, toasts)
β β βββ assets/ # Static assets (images, icons)
β β βββ envs/ # Environment configurations
β βββ angular.json # Angular CLI configuration
β βββ package.json # NPM dependencies
β βββ proxy.conf.json # Development proxy configuration
βββ LICENSE # Apache 2.0 License
spring:
r2dbc:
url: r2dbc:postgres://127.0.0.1:5432/plate
username: farmer
password: 123456
properties:
timeZone: "GMT+8"
applicationName: plate
flyway:
url: jdbc:postgresql://127.0.0.1:5432/plate
user: farmer
password: 123456
data.redis.host: 127.0.0.1- OAuth2: GitHub OAuth2 client configuration
- Session Management: Redis-based with 8-hour timeout
- Captcha: Visual verification for authentication
- CORS: Configured for development environments
// env.dev.ts
export const env = {
production: false,
apiUrl: "http://localhost:8080"
};
// env.ts (production)
export const env = {
production: true,
apiUrl: "http://localhost:8080"
};{
"/sec": {
"target": "http://localhost:8080",
"secure": false
},
"/rel": {
"target": "http://localhost:8080",
"secure": false
}
}-
Build Docker Images
# Build backend (Spring Boot 4.0.0-M3) docker build -t plate-backend ./boot/platform # Build frontend (Angular 20) docker build -t plate-frontend ./ui/web
-
Docker Compose
version: "3.8" services: postgres: image: postgres:17 environment: POSTGRES_DB: plate POSTGRES_USER: farmer POSTGRES_PASSWORD: 123456 ports: - "5432:5432" redis: image: redis:7-alpine ports: - "6379:6379" plate-backend: image: plate-backend ports: - "8080:8080" - "8443:8443" environment: - SPRING_PROFILES_ACTIVE=docker depends_on: - postgres - redis
-
Run with Docker Compose
docker-compose up -d
-
Native Image Deployment (Optional)
# Build native image ./gradlew nativeCompile # Run native executable ./build/native/nativeCompile/plate-platform
# Run all tests
./gradlew test
# Run integration tests
./gradlew integrationTest
# Run with coverage
./gradlew jacocoTestReport
# Run native tests (requires GraalVM)
./gradlew nativeTest# Run unit tests
npm run test
# Run tests with coverage
npm run test -- --code-coverage
# Run end-to-end tests (if configured)
npm run e2eThe Plate Platform provides RESTful APIs with reactive endpoints. API documentation is available through the application's built-in endpoints.
- Security APIs:
/sec/*- User, group, tenant management and authentication - Relational APIs:
/rel/*- Business data and logging operations
POST /oauth2/login- User authenticationPOST /oauth2/logout- User logoutPOST /captcha/code- Generate captcha for verificationGET /sec/users- List users with paginationPOST /sec/users- Create new userPUT /sec/users/{id}- Update user informationDELETE /sec/users/{id}- Delete user
GET /sec/groups- List groupsPOST /sec/groups- Create new groupPUT /sec/groups/{id}- Update groupDELETE /sec/groups/{id}- Delete groupGET /sec/groups/{id}/members- List group membersPOST /sec/groups/{id}/members- Add member to groupDELETE /sec/groups/{id}/members/{userId}- Remove member from group
GET /sec/tenants- List tenantsPOST /sec/tenants- Create tenantPUT /sec/tenants/{id}- Update tenantGET /sec/tenants/{id}/members- List tenant members
GET /rel/menus- Get available menusPOST /rel/menus- Create menu itemPUT /rel/menus/{id}- Update menuDELETE /rel/menus/{id}- Delete menu
GET /rel/loggers- View system logsPOST /rel/loggers- Create log entry
- Spring Boot 4.0.0-M3 - Main application framework (latest milestone release)
- Spring Security - Authentication and authorization
- Spring WebFlux - Reactive web framework
- Spring Data R2DBC - Reactive database access
- Spring Session - Distributed session management
- PostgreSQL - Primary relational database
- Redis - Cache and session storage
- Flyway 11.13.2 - Database migration tool
- GraalVM Native Image - Native compilation support
- Log4j2 - Logging framework
- R2DBC PostgreSQL 1.1.0 - Reactive database driver
- Angular 20 - Main frontend framework
- Angular Material - UI component library
- Angular SSR - Server-side rendering
- RxJS 7.8.0 - Reactive programming library
- TypeScript 5.8.2 - Programming language
- Tabler Icons - Icon library
- Tabler Core - UI component framework
- Express.js 5.1.0 - Server for SSR
- Gradle - Build tool with Kotlin DSL
- Docker - Containerization
- GitHub Actions - CI/CD pipeline
- JUnit 5 - Testing framework
- TestContainers - Integration testing
- Karma - Frontend test runner
- Jasmine - Frontend testing framework
We welcome contributions to the Plate Platform! Here's how you can help:
- Fork the Repository: Create your own fork of the project
- Create a Feature Branch:
git checkout -b feature/amazing-feature - Commit Changes:
git commit -m 'Add some amazing feature' - Push to Branch:
git push origin feature/amazing-feature - Open a Pull Request: Submit your changes for review
- Backend: Follow Google Java Style Guide
- Frontend: Follow Angular Style Guide
- Use meaningful variable and function names
- Write comprehensive comments and documentation
- Include appropriate tests for new features
- Update documentation when making changes
- Clear description of changes
- Reference to related issues
- Passing tests
- Updated documentation if needed
- Follows the project's coding standards
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
The Apache License 2.0 is a permissive free software license that allows users to freely use, modify, and distribute the software, including for commercial purposes, under certain conditions.
This project has been upgraded to Spring Boot 4.0.0-M3, which includes several important changes:
- Java 25 Requirement: Spring Boot 4.x requires Java 21 or later
- Enhanced Reactive Support: Improved WebFlux and R2DBC integration
- Native Image Improvements: Better GraalVM native compilation support
- Breaking Changes: Some configuration properties and APIs may have changed from Spring Boot 3.x
The frontend has been upgraded to Angular 20, featuring:
- Improved SSR Performance: Enhanced server-side rendering capabilities
- Modern Development Experience: Updated tooling and build optimizations
- Enhanced TypeScript Support: Better type checking and developer experience
Plate Platform is under active development with the latest technology stack and core features implemented.
Current version: 0.0.1 (Development)
Technology Stack:
- β Backend: Spring Boot 4.0.0-M3 with Java 25
- β Frontend: Angular 20 with SSR support
- β Database: PostgreSQL 17+ with R2DBC reactive driver
- β Cache: Redis 7.0+ for distributed sessions
Implemented Features:
- β Multi-tenant architecture with user/group management
- β Reactive backend with Spring WebFlux and R2DBC
- β Angular 20 frontend with SSR support
- β OAuth2 authentication with GitHub integration
- β Role-based access control (RBAC)
- β Menu and permission management
- β Audit logging system
- β Captcha verification for security
Roadmap:
- Enhanced workflow engine
- Advanced reporting and analytics
- Mobile application support
- Additional OAuth2 providers
- Performance optimizations
- Spring Team for the comprehensive Spring Boot framework and reactive stack
- Angular Team for the powerful Angular framework and SSR capabilities
- PostgreSQL Team for the robust and scalable database
- Redis Team for the high-performance caching and session storage
- Tabler Team for the beautiful UI components and icons
- Flyway Team for the reliable database migration tool