feat: Khởi tạo Prisma client, bổ sung các bài kiểm tra đơn vị và tích hợp, đồng thời điều chỉnh cấu hình dịch vụ.
This commit is contained in:
28
.agent/rules/architecture.md
Normal file
28
.agent/rules/architecture.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Architecture Rules
|
||||
|
||||
## Monorepo Structure
|
||||
- **Apps**: Next.js (web) + Flutter (mobile)
|
||||
- **Services**: Node.js/TypeScript microservices (Express)
|
||||
- **Packages**: Shared libraries (logger, types, http-client, auth-sdk, tracing)
|
||||
- **Infrastructure**: Traefik (API Gateway), Redis, Neon PostgreSQL, Observability
|
||||
- **Deployments**: Local (Docker Compose), Staging/Production (Kubernetes)
|
||||
|
||||
## Template Location
|
||||
- `services/_template/`: Always use this as the starting point for creating new services.
|
||||
|
||||
## Technology Stack
|
||||
### Frontend
|
||||
- Next.js 14+ (App Router), TypeScript, Tailwind CSS, Zustand
|
||||
- Flutter 3.x with Provider pattern
|
||||
- Prefer `@goodgo/types` and `@goodgo/http-client`
|
||||
|
||||
### Backend
|
||||
- Node.js 20+, TypeScript 5+, Express
|
||||
- Prisma ORM + Neon PostgreSQL
|
||||
- Zod for validation
|
||||
- Standard packages: `@goodgo/logger`, `@goodgo/tracing`, `@goodgo/auth-sdk`
|
||||
|
||||
### Infrastructure
|
||||
- Traefik: Path-based routing
|
||||
- Redis: Caching
|
||||
- Monitoring: Prometheus, Grafana, Loki
|
||||
19
.agent/rules/naming-conventions.md
Normal file
19
.agent/rules/naming-conventions.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Naming Conventions
|
||||
|
||||
## General Rules
|
||||
- **Services/Packages**: `kebab-case` (e.g., `auth-service`, `http-client`)
|
||||
- **Files**: `kebab-case.type.ts` (e.g., `user.controller.ts`, `auth.middleware.ts`)
|
||||
- **Components**:
|
||||
- React/Next.js: `PascalCase.tsx`
|
||||
- Flutter: `snake_case.dart`
|
||||
- **Classes**: `PascalCase`
|
||||
- **Functions**: `camelCase`
|
||||
- **Constants**: `UPPER_SNAKE_CASE`
|
||||
- **Package Names**: `@goodgo/package-name`
|
||||
|
||||
## Specific Examples
|
||||
- Controller: `user.controller.ts`
|
||||
- Service: `user.service.ts`
|
||||
- Repository: `user.repository.ts`
|
||||
- Middleware: `auth.middleware.ts`
|
||||
- DTO: `create-user.dto.ts`
|
||||
Reference in New Issue
Block a user