Skip to content

xutongxue233/tiny-platform

Repository files navigation

Tiny Platform

A Modular Backend Management System

License JDK Version Spring Boot React Ant Design

简体中文 | English


Introduction

Tiny Platform is a modular backend management system built with Spring Boot 3 + MyBatis Plus + Sa-Token + React + Ant Design Pro. It features a multi-module architecture designed for easy maintenance and extensibility, with dedicated security and storage modules for enterprise-level functionality.

Star History

Star History Chart

Tech Stack

Backend

Technology Version Description
Spring Boot 3.2.0 Core framework
JDK 21 Java version
MyBatis Plus 3.5.15 ORM framework
Sa-Token 1.37.0 Authentication & Authorization
MySQL 8.0 Database
Redis 6.0+ Cache & Session
Knife4j 4.4.0 API documentation
Hutool 5.8.23 Utility library
Druid 1.2.27 Database connection pool

Frontend

Technology Version Description
React 19 UI framework
Ant Design 5 UI component library
Ant Design Pro - Enterprise UI solution
UmiJS Max - React framework
TypeScript - Type-safe JavaScript
TailwindCSS - CSS framework

Features

Authentication & Authorization

  • Token-based authentication with Sa-Token
  • 24-hour token validity
  • Multi-device login support
  • RBAC permission control
  • Annotation-based authorization

System Management

  • User Management (CRUD, status control, password reset)
  • User Registration (configurable registration, captcha verification)
  • Role Management (role assignment, permission configuration)
  • Menu Management (tree structure, routing, button permissions)
  • Department Management (tree structure, data permission)
  • Data Dictionary (dictionary type and item management, cache support)
  • System Configuration (global parameters, cache refresh)

Message Center

  • In-app Messages (system messages, personal messages)
  • WebSocket Real-time Push
  • Message List Management (pagination, batch delete)
  • Unread Message Count with Real-time Updates

Logging System

  • Operation Logs (auto-record via AOP, annotation-based)
  • Login Logs (login/logout tracking, IP geolocation)
  • Online User Management

Data Features

  • Logical deletion
  • Auto-fill (create time, update time)
  • Pagination support
  • Data permission control

File Storage

  • Multi-storage backend support (Local, MinIO, Aliyun OSS, AWS S3)
  • Storage configuration management
  • File upload/download with record tracking
  • Unified storage abstraction layer

Development Tools

  • Code Generator (table import, code preview, batch generation)
  • Customizable code templates (Entity, Mapper, Service, Controller, DTO, VO)
  • Frontend code generation (React pages, API services)
  • Generator configuration management

Data Export

  • Async export task management
  • Multiple export formats (Excel, CSV)
  • Export task progress tracking
  • Export history and download management

Project Structure

tiny-platform/
├── tiny-common/          # Common module (annotations, constants, base entity)
│   ├── core/             # Core classes (BaseEntity, PageDTO)
│   ├── constant/         # Constants
│   └── annotation/       # Custom annotations
├── tiny-core/            # Core module (web infrastructure)
│   ├── config/           # MyBatis Plus, WebMvc config
│   ├── exception/        # Global exception handler
│   └── web/              # ResponseResult, WebUtil, TraceInterceptor
├── tiny-security/        # Security module (authentication & authorization)
│   ├── config/           # Sa-Token config
│   ├── aspect/           # Operation log aspect, Data scope aspect
│   ├── datascope/        # Data permission interceptor
│   └── context/          # Login user context
├── tiny-storage/         # Storage module (file management)
│   ├── service/storage/  # Storage implementations (Local, MinIO, OSS, S3)
│   ├── factory/          # Storage factory
│   └── controller/       # File upload/download APIs
├── tiny-system/          # System management module
│   ├── entity/           # Entities (User, Role, Menu, Dept, Dict, etc.)
│   ├── mapper/           # Data access layer
│   ├── service/          # Business logic layer
│   ├── controller/       # Controllers
│   ├── dto/              # Data transfer objects
│   └── vo/               # View objects
├── tiny-generator/       # Code generator module
│   ├── core/             # Generator core (template engine, rules, writer)
│   ├── entity/           # Generator entities (GenTable, GenTableColumn)
│   ├── service/          # Generator services
│   └── controller/       # Generator APIs
├── tiny-message/         # Message module
│   ├── entity/           # Message entities
│   ├── service/          # Message services
│   └── controller/       # Message APIs
├── tiny-websocket/       # WebSocket module
│   ├── config/           # WebSocket configuration
│   ├── handler/          # Message handlers
│   └── service/          # WebSocket services
├── tiny-export/          # Export module
│   ├── entity/           # Export task entities
│   ├── service/          # Export services
│   └── controller/       # Export APIs
├── tiny-admin/           # Main startup module
│   ├── TinyAdminApplication
│   └── application.yml
├── tiny-ui/              # Frontend project
│   ├── src/              # Source code
│   ├── config/           # Configuration
│   └── mock/             # Mock data
└── docs/                 # Documentation
    └── sql/              # Database scripts (modular)

Module Dependencies: tiny-admin -> tiny-system -> tiny-export -> tiny-message -> tiny-websocket -> tiny-generator -> tiny-storage -> tiny-security -> tiny-core -> tiny-common

Quick Start

Prerequisites

  • JDK 21+
  • Maven 3.8+
  • MySQL 8.0+
  • Redis 6.0+
  • Node.js 20+

Backend Setup

  1. Create database and execute init script
mysql -u root -p < docs/sql/modules/install-all.sql
  1. Modify configuration in tiny-admin/src/main/resources/application.yml
spring:
  datasource:
    url: jdbc:mysql://localhost:3306/tiny_admin
    username: your_username
    password: your_password
  data:
    redis:
      host: localhost
      port: 6379
  1. Build the project
mvn clean install
  1. Run the application
cd tiny-admin
mvn spring-boot:run

Frontend Setup

  1. Navigate to frontend directory
cd tiny-ui
  1. Install dependencies
npm install
  1. Start development server
npm run dev

Default Credentials

  • Username: admin
  • Password: admin123

API Endpoints

Authentication

Method Endpoint Description
POST /auth/login User login
POST /auth/logout User logout
POST /auth/register User registration
GET /auth/getUserInfo Get current user info
GET /auth/captcha Get captcha image

System Management

Method Endpoint Description
GET /sys/user/page User pagination
GET /sys/role/page Role pagination
GET /sys/menu/tree Menu tree
GET /sys/dept/tree Department tree

Logging

Method Endpoint Description
GET /sys/operationLog/page Operation logs
GET /sys/loginLog/page Login logs

File Storage

Method Endpoint Description
POST /storage/file/upload Upload file
GET /storage/file/download/{id} Download file
GET /storage/config/page Storage config list
POST /storage/config Create storage config

Data Dictionary

Method Endpoint Description
GET /sys/dictType/page Dictionary type pagination
GET /sys/dictType/list Dictionary type list
GET /sys/dictItem/list Dictionary item list by type
POST /sys/dictType Create dictionary type
POST /sys/dictItem Create dictionary item

Code Generator

Method Endpoint Description
GET /gen/table/page Generator table pagination
GET /gen/table/db/list Database table list
POST /gen/table/import Import database tables
GET /gen/table/preview/{tableId} Preview generated code
GET /gen/table/download/{tableId} Download generated code
POST /gen/table/batchGenerate Batch generate code

System Configuration

Method Endpoint Description
GET /sys/config/page Config pagination
GET /sys/config/{configId} Get config by ID
GET /sys/config/key/{configKey} Get config by key
POST /sys/config Create config
PUT /sys/config Update config
DELETE /sys/config/{configId} Delete config
DELETE /sys/config/refreshCache Refresh config cache

Message Center

Method Endpoint Description
GET /msg/message/page Message pagination
GET /msg/message/{messageId} Get message detail
POST /msg/message Send message
PUT /msg/message/read/{messageId} Mark message as read
PUT /msg/message/read-all Mark all as read
DELETE /msg/message/{messageId} Delete message
DELETE /msg/message/batch Batch delete messages
GET /msg/message/unread-count Get unread message count

Export Tasks

Method Endpoint Description
GET /export/task/page Export task pagination
POST /export/task Create export task
GET /export/task/download/{taskId} Download export file
DELETE /export/task/{taskId} Delete export task

Extension Guide

The system uses modular design for easy extension:

  1. Add module declaration in parent POM
  2. Create new module with dependencies
  3. Implement business logic
  4. Import the module in tiny-admin

Technical Highlights

  1. Modular Design - Clear module separation for maintainability
  2. Modern Stack - Latest versions of Spring Boot 3, JDK 21, React 19
  3. Security First - BCrypt password encryption, Redis token storage, data permission control
  4. Developer Friendly - Comprehensive API docs, utility libraries, parameter validation
  5. Production Ready - Logging, monitoring, distributed deployment support
  6. Flexible Storage - Pluggable storage backends with factory pattern
  7. Async Export - Background export tasks with progress tracking

Roadmap

  • Message Center Module
  • Export Task Module
  • Scheduled Tasks Module
  • Workflow Engine

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A modular enterprise admin system built with Spring Boot 3 + MyBatis Plus + Sa-Token + React 19 + Ant Design 5. Features include user management, role-based access control (RBAC), menu management, and modular architecture for easy extension.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors