็ฎไฝไธญๆ | English
๐ An enterprise-grade admin backend scaffold built on NestJS 11, TypeScript, Prisma, MySQL, and Redis, with built-in RBAC permissions, JWT authentication, Swagger/OpenAPI, Docker deployment, and AI-assisted development support โ ready to use as a Starter Template for enterprise backend projects.
- ๐ RBAC Permission System โ dynamic permission scanning, menu permissions, API permissions, and permission caching out of the box
- ๐ก๏ธ JWT Dual-Token Auth โ Access Token / Refresh Token, Passport, bcrypt password hashing
- โก Deep Redis Integration โ session management, online users, rate limiting, distributed locks, Pub/Sub, declarative caching
- ๐๏ธ NestJS 11 + TypeScript โ modular architecture, dependency injection, strict type checking
- ๐ Prisma 6 ORM โ type-safe queries, full support for migrations / seeds / transactions
- ๐ Swagger / OpenAPI โ auto-generated docs, online debugging with Bearer Token
- ๐ข Organization Structure โ complete system for users / roles / departments / positions
- ๐ Multi-Method Login โ username, email, phone number, User ID
- ๐ก๏ธ Security Hardening โ CORS, unified exception handling, parameter validation, log redaction, password hashing
- ๐ณ Docker First โ dev / test / production configurations with rolling updates
- ๐ค AI Ready โ built-in
CLAUDE.mdand modular knowledge base, works directly with Claude Code / Cursor / Copilot - ๐ฏ Standardized Engineering โ ESLint, Prettier, unified response format, complete seed data
NestJS 11 ยท Prisma 6 ยท TypeScript 5 ยท MySQL 8 ยท Redis 6 ยท Swagger ยท Docker
- Node.js >= 20
- pnpm >= 9 (built into Corepack, run
corepack enable) - MySQL >= 8.0
- Redis >= 6.0
- Docker (optional)
git clone https://github.com/gvray/gvray-admin.git && cd gvray-admin
pnpm install
cp .env.example .env
# Option 1: Start MySQL + Redis via Docker
docker compose -f docker-compose.dev.yml up -d mysql redis
# Option 2: Use an existing local MySQL + Redis, configure .env and skip the previous step
pnpm prisma migrate dev
pnpm prisma db seed
pnpm start:dev- App:
http://localhost:3000 - Swagger:
http://localhost:3000/api(click Authorize and enterBearer <accessToken>)
โ ๏ธ For local development only โ do not use in production.
| Role | Username | Password | |
|---|---|---|---|
| Super Admin | super_admin |
super@example.com |
123456 |
| Admin | admin |
admin@example.com |
123456 |
| Guest | guest |
guest@example.com |
123456 |
src/
โโโ core/ # Infrastructure (decorators / guards / interceptors / filters / pipes)
โโโ modules/ # Business modules (auth / system / dashboard / profile)
โโโ prisma/ # Prisma Module / PrismaService
โโโ redis/ # Redis infrastructure (cache / rate limiting / distributed locks)
โโโ shared/ # Shared layer (constants / DTOs / utils / BaseService)
โโโ main.ts
prisma/ # Schema + migrations + seed
docs/ # Project documentation
docker/ # Docker deployment config
.claude/ # AI knowledge base
Typical NestJS starters only give you a skeleton โ the parts an enterprise project actually needs, you still have to build yourself.
| Typical Starter | GVRAY Admin | |
|---|---|---|
| RBAC permissions + dynamic scanning | โ | โ |
| JWT dual-token + refresh | โ | โ |
| Redis rate limiting / distributed locks | โ | โ |
| Full org structure (departments/positions) | โ | โ |
| Swagger auto-docs | Basic | โ with online debugging |
| Docker three-environment setup | โ | โ |
| AI assistant context | โ | โ |
| Standardized structure + seed data | โ | โ |
- JWT dual-token authentication
- RBAC permission system + dynamic scanning
- Prisma ORM + complete seed
- Deep Redis integration
- Swagger / OpenAPI
- Docker three-environment deployment
- User / role / department / position management
- Menu management
- System configuration items
- Dictionary management
- Announcements & notifications
- Operation logs / login logs
- Online users
- System monitoring (server / cache)
- WebSocket real-time notifications
- Scheduled tasks
- File storage
- Multi-tenancy
- OpenTelemetry
- Kubernetes deployment
CLAUDE.mdโ Claude Code auto-loaded entry point.claude/project/โ on-demand knowledge base (architecture / DTO / permissions / response format)
| Document | Description |
|---|---|
| ๐ Feature List | Complete feature modules and progress |
| ๐ณ Docker Deployment Guide | Dev / test / production deployment, rolling updates |
| ๐ Unified Response Format | API response specification |
| โ๏ธ System Configuration | Frontend/backend config mapping |
| ๐๏ธ Project Structure Details | Directory structure and module descriptions |
| ๐งช API Testing Guide | Swagger debugging and auth flow |
- gvray-react โ React + Umi ยท Live Demo ยท GitHub Pages
- gvray-vue โ Vue 3 + Vite + Pinia + Element Plus ยท Live Demo ยท GitHub Pages
- gvray-vite โ React + Vite + Ant Design ยท Live Demo ยท GitHub Pages
- gvray-next (planning) โ Next.js
Issues, PRs, and feature suggestions are all welcome. If this project helps you, a โญ Star is the best support!
This project is open-sourced under the MIT License.

