# nestjs-starter-pro-frontend
**Repository Path**: d-killy/nestjs-starter-pro-frontend
## Basic Information
- **Project Name**: nestjs-starter-pro-frontend
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2026-02-12
- **Last Updated**: 2026-02-12
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# NestJS Starter Pro Web
> Frontend for NestJS Starter Pro - A lightweight, production-ready admin dashboard.
> Modern management interface built with React 18 + TypeScript 5 + Ant Design 5.
[](LICENSE)
[](https://reactjs.org/)
[](https://www.typescriptlang.org/)
[](https://vitejs.dev/)
[](https://ant.design/)
[English](#english) | [ไธญๆ](#ไธญๆ)
---
## ๐ฏ Overview
This is the frontend dashboard for **NestJS Starter Pro** - a lightweight backend management framework. Built with modern React ecosystem for optimal developer experience and production performance.
**Perfect for**:
- ๐ผ Freelancers building admin dashboards quickly
- ๐ Startups creating MVP products
- ๐ Learners studying React best practices
- ๐ ๏ธ Side projects that need professional UI
---
## โจ Core Features
- ๐ฏ **Feature-First Architecture** - Code organized by business modules, not file types
- ๐ **Complete RBAC System** - Permission guards, role-based access control
- ๐ **Smart State Management** - Zustand (client state) + TanStack Query (server state)
- ๐จ **Modern UI** - Ant Design 5 + Tailwind CSS + Dark Mode support
- ๐ **Blazing Fast** - Vite 6 + HMR + TypeScript
- ๐ฑ **Responsive Design** - PC-first, tablet-friendly
- ๐งช **Complete Testing** - Vitest (unit) + Playwright (E2E)
- ๐ **Dark Mode** - Beautiful dark theme with smooth transitions
---
## ๐ ๏ธ Tech Stack
### Core Framework
- **React 18.3** - UI framework
- **TypeScript 5.8** - Type safety
- **Vite 6** - Build tool
### UI & Styling
- **Ant Design 5** - Component library
- **Tailwind CSS 4** - Utility-first CSS
- **@ant-design/icons** - Icon library
### State Management
- **Zustand 5** - Client state (theme, sidebar, etc.)
- **TanStack Query 5** - Server state (API data caching)
### Routing & Forms
- **React Router 7** - Routing
- **React Hook Form 7** - Forms
### Tools
- **Axios 1** - HTTP client
- **dayjs** - Date/time handling
- **lodash-es** - Utilities
### Dev Tools
- **ESLint 9** - Linting
- **Prettier 3** - Code formatting
- **Vitest 3** - Unit testing
- **Playwright 1** - E2E testing
---
## ๐ฆ Quick Start
### Prerequisites
- Node.js >= 20.x
- npm >= 10.x
- Backend service running at `http://localhost:3000` (see [nestjs-starter-pro](../home-admin))
### Installation
```bash
# Install dependencies
npm install
# Start dev server
npm run dev
```
**Access**: http://localhost:3001
**Default credentials** (after backend migration):
```
Username: admin
Password: admin123
```
### Build for Production
```bash
# Build
npm run build
# Preview production build
npm run preview
```
### Code Quality
```bash
# ESLint check
npm run lint
# Type check
npm run type-check
# Format code
npm run format
```
### Testing
```bash
# Unit tests
npm run test
# E2E tests
npm run test:e2e
# Test coverage
npm run test:coverage
```
---
## ๐ Project Structure
```
nestjs-starter-pro-web/
โโโ public/ # Static assets
โโโ src/
โ โโโ app/ # App layer
โ โ โโโ App.tsx # Root component
โ โ โโโ router.tsx # Route configuration
โ โ โโโ providers.tsx # Global providers
โ โโโ features/ # Business modules (Feature-First)
โ โ โโโ auth/ # Authentication
โ โ โ โโโ components/
โ โ โ โโโ hooks/
โ โ โ โโโ pages/
โ โ โ โโโ services/
โ โ โ โโโ stores/
โ โ โ โโโ types/
โ โ โโโ dashboard/ # Dashboard
โ โ โโโ rbac/ # RBAC (User/Role/Permission)
โ โ โ โโโ user/
โ โ โ โโโ role/
โ โ โ โโโ permission/
โ โ โ โโโ menu/
โ โ โโโ file/ # File management
โ โ โโโ task/ # Task scheduling
โ โ โโโ notification/ # Notifications
โ โ โโโ dict/ # Data dictionary
โ โ โโโ config/ # System config
โ โ โโโ api-auth/ # API Key management
โ โโโ shared/ # Shared modules
โ โ โโโ components/ # Common components
โ โ โ โโโ layouts/ # Layout components
โ โ โ โโโ auth/ # Auth components
โ โ โ โโโ common/ # Reusable UI
โ โ โโโ config/ # Configuration
โ โ โโโ hooks/ # Common hooks
โ โ โโโ types/ # Global types
โ โ โโโ utils/ # Utilities
โ โโโ assets/ # Assets
โ โ โโโ styles/ # Global styles
โ โโโ main.tsx # Entry point
โโโ .env.development # Dev environment
โโโ .env.production # Prod environment
โโโ tailwind.config.ts # Tailwind config
โโโ vite.config.ts # Vite config
โโโ tsconfig.json # TypeScript config
โโโ package.json
```
---
## ๐ Environment Variables
### Development (.env.development)
```bash
VITE_API_URL=http://localhost:3000/api/v1
VITE_APP_TITLE=NestJS Starter Pro
VITE_ENABLE_MOCK=false
```
### Production (.env.production)
```bash
VITE_API_URL=https://api.example.com/api/v1
VITE_APP_TITLE=NestJS Starter Pro
VITE_ENABLE_MOCK=false
```
---
## ๐ Code Standards
### File Naming
- Components: `PascalCase` (e.g., `UserList.tsx`)
- Hooks: `use + camelCase` (e.g., `useUsers.ts`)
- Utils: `camelCase` (e.g., `request.ts`)
- Types: `camelCase` (e.g., `user.types.ts`)
### Component Design
- โ
Use function components (no class components)
- โ
Use named exports (no default exports)
- โ
Props must have interface
- โ
Components should be < 200 lines
### State Management
- โ
Client state โ Zustand (theme, sidebar, user preferences)
- โ
Server state โ TanStack Query (API data)
- โ
Components should NOT call APIs directly
- โ
All API calls must be in Services
---
## ๐ Authentication & Authorization
### Login Flow
1. User enters username/password
2. Call `/auth/login` endpoint
3. Get `accessToken` and `refreshToken`
4. Store in Zustand + localStorage
5. Subsequent requests auto-attach token
### Permission Control
#### Component-level
```typescript
import { PermissionGuard } from '@/shared/components/auth/PermissionGuard';
```
#### Hook-level
```typescript
import { usePermission } from '@/shared/hooks/usePermission';
function UserActions() {
const { hasPermission } = usePermission();
return (
<>
{hasPermission(['user:create']) && }
{hasPermission(['user:delete']) && }
>
);
}
```
#### Route-level
```typescript
// router.tsx
{
path: 'users',
element: ,
children: [
{
index: true,
element: ,
},
],
}
```
---
## ๐งช Testing
### Unit Tests (Vitest)
```bash
# Run all tests
npm run test
# Watch mode
npm run test:watch
# Coverage report
npm run test:coverage
```
### E2E Tests (Playwright)
```bash
# Run E2E tests
npm run test:e2e
# UI mode
npm run test:e2e:ui
# Debug mode
npm run test:e2e:debug
```
---
## ๐ Documentation
- **[CLAUDE.md](./CLAUDE.md)**: AI development guide (for Claude/ChatGPT)
- **[Backend README](../home-admin/README.md)**: Backend documentation
- **[Architecture Decisions](../docs/ADR.md)**: Why we built it this way
- **[Framework Comparison](../docs/COMPARISON.md)**: vs other frameworks
---
## ๐ Deployment
### Docker
```bash
# Build image
docker build -t nestjs-starter-pro-web .
# Run container
docker run -p 3001:80 nestjs-starter-pro-web
```
### Nginx
```nginx
server {
listen 80;
server_name example.com;
root /var/www/nestjs-starter-pro-web;
location / {
try_files $uri $uri/ /index.html;
}
location /api {
proxy_pass http://backend:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
```
---
## ๐ค Contributing
1. Fork the repo
2. Create feature branch (`git checkout -b feature/amazing-feature`)
3. Commit changes (`git commit -m 'Add amazing feature'`)
4. Push to branch (`git push origin feature/amazing-feature`)
5. Open Pull Request
---
## ๐ License
MIT License - see [LICENSE](LICENSE) for details.
---
## ๐ฌ Community
- ๐ก **GitHub Discussions**: Ask questions, share ideas
- ๐ **GitHub Issues**: Report bugs, request features
- โญ **Star this repo**: If you find it useful!
---
**Built with โค๏ธ by developers who got tired of over-engineered frontends.**
**Philosophy**: Keep it simple, keep it clean, make it work.
---
## ไธญๆ
> NestJS Starter Pro ็ๅ็ซฏ็ฎก็็้ขใ
> ๅบไบ React 18 + TypeScript 5 + Ant Design 5 ็็ฐไปฃๅ็ฎก็ๅๅฐใ
---
## ๐ฏ ้กน็ฎ็ฎไป
่ฟๆฏ **NestJS Starter Pro** ็ๅ็ซฏ็ฎก็็้ข - ไธไธช่ฝป้็บง็ๅๅฐ็ฎก็ๆกๆถใไฝฟ็จ็ฐไปฃ React ็ๆ็ณป็ปๆๅปบ๏ผๆไพๆไฝณ็ๅผๅไฝ้ชๅ็ไบงๆง่ฝใ
**้ๅ**๏ผ
- ๐ผ ๆฅ็งๆดปๅฟซ้ๆญๅปบ็ฎก็ๅๅฐ
- ๐ ๅๅๅ
ฌๅธๆๅปบ MVP ไบงๅ
- ๐ ๅญฆไน React ๆไฝณๅฎ่ทต
- ๐ ๏ธ ไธชไบบ้กน็ฎ้่ฆไธไธ UI
---
## โจ ๆ ธๅฟ็นๆง
- ๐ฏ **Feature-First ๆถๆ** - ๆไธๅกๆจกๅ็ป็ปไปฃ็
- ๐ **ๅฎๆด RBAC ็ณป็ป** - ๆ้ๅฎๅซใๅบไบ่ง่ฒ็่ฎฟ้ฎๆงๅถ
- ๐ **ๆบ่ฝ็ถๆ็ฎก็** - Zustand๏ผๅฎขๆท็ซฏ๏ผ+ TanStack Query๏ผๆๅก็ซฏ๏ผ
- ๐จ **็ฐไปฃๅ UI** - Ant Design 5 + Tailwind CSS + ๆทฑ่ฒๆจกๅผ
- ๐ **ๆ้ๅผๅ** - Vite 6 + HMR + TypeScript
- ๐ฑ **ๅๅบๅผ่ฎพ่ฎก** - PC ไผๅ
๏ผๅ
ผ้กพๅนณๆฟ
- ๐งช **ๅฎๆดๆต่ฏ** - Vitest๏ผๅๅ
ๆต่ฏ๏ผ+ Playwright๏ผE2E ๆต่ฏ๏ผ
- ๐ **ๆทฑ่ฒๆจกๅผ** - ็ฒพ็พ็ๆทฑ่ฒไธป้ข๏ผๅนณๆป่ฟๆธก
---
## ๐ฆ ๅฟซ้ๅผๅง
```bash
# ๅฎ่ฃ
ไพ่ต
npm install
# ๅฏๅจๅผๅๆๅกๅจ
npm run dev
```
่ฎฟ้ฎ๏ผhttp://localhost:3001
้ป่ฎค่ดฆๅท๏ผ`admin` / `admin123`๏ผ่ฟ่กๅ็ซฏ migration ๅ๏ผ
---
## ๐ ๆๆกฃ
- **[CLAUDE.md](./CLAUDE.md)**๏ผAI ่พ
ๅฉๅผๅๆๅ
- **[ๅ็ซฏ README](../home-admin/README.md)**๏ผๅ็ซฏๆๆกฃ
- **[ๆถๆๅณ็ญ](../docs/ADR.md)**๏ผไธบไปไน่ฟๆ ท่ฎพ่ฎก
- **[ๆกๆถๅฏนๆฏ](../docs/COMPARISON.md)**๏ผไธๅ
ถไปๆกๆถๅฏนๆฏ
---
## ๐ค ่ดก็ฎ
ๆฌข่ฟ่ดก็ฎไปฃ็ ๏ผ่ฏทๆฅ็ [CONTRIBUTING.md](CONTRIBUTING.md) ไบ่งฃ่ฏฆๆ
ใ
---
## ๐ ่ฎธๅฏ่ฏ
MIT License - ่ฏฆ่ง [LICENSE](LICENSE) ๆไปถใ
---
**็ฑๅๅฆไบ่ฟๅบฆ่ฎพ่ฎกๅ็ซฏ็ๅผๅ่
็จ โค๏ธ ๆๅปบใ**
**็ๅฟต**๏ผไฟๆ็ฎๅ๏ผไฟๆๅนฒๅ๏ผ่ฎฉๅฎๅทฅไฝใ