lapeh 2.6.17 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/.env.example +1 -6
  2. package/README.md +19 -85
  3. package/bin/index.js +84 -180
  4. package/dist/lib/bootstrap.d.ts.map +1 -1
  5. package/dist/lib/bootstrap.js +17 -16
  6. package/dist/lib/core/store.d.ts +55 -0
  7. package/dist/lib/core/store.d.ts.map +1 -0
  8. package/dist/lib/core/store.js +66 -0
  9. package/dist/lib/middleware/error.d.ts.map +1 -1
  10. package/dist/lib/middleware/error.js +1 -20
  11. package/dist/lib/utils/validator.d.ts.map +1 -1
  12. package/dist/lib/utils/validator.js +3 -32
  13. package/dist/src/modules/Auth/auth.controller.d.ts.map +1 -1
  14. package/dist/src/modules/Auth/auth.controller.js +118 -105
  15. package/dist/src/modules/Rbac/rbac.controller.d.ts.map +1 -1
  16. package/dist/src/modules/Rbac/rbac.controller.js +141 -140
  17. package/dist/src/routes/index.d.ts.map +1 -1
  18. package/dist/src/routes/index.js +0 -5
  19. package/doc/en/CHEATSHEET.md +3 -7
  20. package/doc/en/CLI.md +16 -41
  21. package/doc/en/DEPLOYMENT.md +171 -245
  22. package/doc/en/GETTING_STARTED.md +1 -25
  23. package/doc/en/PACKAGES.md +2 -3
  24. package/doc/en/STRUCTURE.md +1 -11
  25. package/doc/en/TUTORIAL.md +61 -119
  26. package/doc/id/CHANGELOG.md +16 -0
  27. package/doc/id/CHEATSHEET.md +0 -4
  28. package/doc/id/CLI.md +19 -54
  29. package/doc/id/DEPLOYMENT.md +171 -245
  30. package/doc/id/GETTING_STARTED.md +91 -115
  31. package/doc/id/PACKAGES.md +0 -1
  32. package/doc/id/STRUCTURE.md +1 -11
  33. package/doc/id/TUTORIAL.md +51 -109
  34. package/gitignore.template +0 -10
  35. package/lib/bootstrap.ts +39 -38
  36. package/lib/core/store.ts +116 -0
  37. package/lib/middleware/error.ts +1 -21
  38. package/lib/utils/validator.ts +3 -39
  39. package/package.json +4 -18
  40. package/scripts/init-project.js +2 -108
  41. package/scripts/make-module.js +1 -12
  42. package/scripts/seed-json.js +158 -0
  43. package/src/modules/Auth/auth.controller.ts +156 -106
  44. package/src/modules/Rbac/rbac.controller.ts +193 -138
  45. package/src/routes/index.ts +0 -3
  46. package/src/routes/rbac.ts +42 -42
  47. package/storage/logs/.0337f5062fe676994d1dc340156e089444e3d6e0-audit.json +5 -10
  48. package/storage/logs/lapeh-2025-12-30.log +1093 -0
  49. package/tsconfig.build.json +1 -3
  50. package/tsconfig.json +0 -1
  51. package/lib/core/database.ts +0 -5
  52. package/prisma/base.prisma.template +0 -8
  53. package/prisma/migrations/20251225163737_init/migration.sql +0 -236
  54. package/prisma/migrations/20251226000329_create_pets_table/migration.sql +0 -11
  55. package/prisma/migrations/20251226001249_create_pets_table/migration.sql +0 -82
  56. package/prisma/migrations/20251226001717_restore_core_models/migration.sql +0 -236
  57. package/prisma/migrations/migration_lock.toml +0 -3
  58. package/prisma/schema.prisma +0 -197
  59. package/prisma/seed.ts +0 -411
  60. package/scripts/compile-schema.js +0 -64
  61. package/src/modules/Auth/auth.prisma +0 -106
  62. package/src/modules/Pets/pets.controller.ts +0 -238
  63. package/src/modules/Pets/pets.prisma +0 -9
  64. package/src/modules/Rbac/rbac.prisma +0 -68
  65. package/src/routes/pets.ts +0 -13
  66. package/storage/logs/lapeh-2025-12-26.log +0 -88
  67. package/storage/logs/lapeh-2025-12-27.log +0 -217
@@ -1,245 +1,171 @@
1
- # Deployment Guide
2
-
3
- Panduan ini akan membantu Anda membawa aplikasi Lapeh dari `localhost` ke Server Production (VPS/Cloud).
4
-
5
- ## Persiapan Pra-Deploy
6
-
7
- Sebelum deploy, pastikan:
8
-
9
- 1. **Environment Variables**: Siapkan nilai `.env` untuk production (DB URL asli, JWT Secret yang kuat).
10
- 2. **Build**: TypeScript harus dikompilasi ke JavaScript.
11
-
12
- ## Strategi 1: VPS (Ubuntu/Debian) dengan PM2
13
-
14
- Ini adalah cara paling umum dan hemat biaya.
15
-
16
- ### 1. Setup Server
17
-
18
- Pastikan Node.js, NPM, dan Database (PostgreSQL/MySQL) sudah terinstall di server.
19
-
20
- ### 2. Clone & Install
21
-
22
- ```bash
23
- git clone https://github.com/username/repo-anda.git
24
- cd repo-anda
25
- npm install --production=false # Install devDependencies juga untuk build
26
- ```
27
-
28
- ### 3. Build Aplikasi
29
-
30
- ```bash
31
- npm run build
32
- ```
33
-
34
- Ini akan menghasilkan folder `dist/`.
35
-
36
- ### 4. Setup Database Production
37
-
38
- ```bash
39
- # Setup .env dulu
40
- cp .env.example .env
41
- nano .env # Isi dengan config production
42
-
43
- # Jalankan migrasi (Hanya deploy schema, jangan reset!)
44
- npm run prisma:deploy
45
- ```
46
-
47
- ### 5. Jalankan dengan PM2
48
-
49
- Lapeh kini menyertakan konfigurasi otomatis PM2 (`ecosystem.config.js`).
50
-
51
- 1. **Install PM2 Global**:
52
-
53
- ```bash
54
- npm install -g pm2
55
- ```
56
-
57
- 2. **Jalankan Aplikasi**:
58
-
59
- ```bash
60
- pm2 start ecosystem.config.js
61
- ```
62
-
63
- Perintah ini akan:
64
-
65
- - Menjalankan aplikasi dalam mode **Cluster** (menggunakan semua core CPU yang tersedia).
66
- - Mengatur `NODE_ENV` ke `production`.
67
- - Mengaktifkan auto-restart jika aplikasi crash atau penggunaan memori melebihi 1GB.
68
-
69
- 3. **Cek Status**:
70
-
71
- ```bash
72
- pm2 status
73
- pm2 logs
74
- ```
75
-
76
- 4. **Simpan Config Startup (Agar jalan saat server reboot)**:
77
- ```bash
78
- pm2 save
79
- pm2 startup
80
- ```
81
-
82
- ### FAQ: Mengapa Aplikasi Saya Muncul Ganda di PM2?
83
-
84
- Jika Anda menjalankan `pm2 list` dan melihat nama aplikasi Anda muncul lebih dari satu kali (misal: `my-app` ada 2 atau 4 baris), **JANGAN KHAWATIR**. Ini adalah fitur, bukan bug.
85
-
86
- - **Penyebab**: Konfigurasi `instances: "max"` dan `exec_mode: "cluster"` di `ecosystem.config.js`.
87
- - **Fungsi**: PM2 mendeteksi jumlah inti CPU (Core) di VPS Anda dan membuat 1 proses worker untuk setiap core.
88
- - Jika VPS punya 2 vCPU -> Muncul 2 proses.
89
- - Jika VPS punya 4 vCPU -> Muncul 4 proses.
90
- - **Keuntungan**: Aplikasi Anda menjadi **Multi-Threaded**. Request yang masuk akan dibagi rata ke semua proses, meningkatkan performa 2x-4x lipat dibanding mode biasa.
91
-
92
- **Cara mengubah ke Single Instance (Hemat RAM):**
93
- Jika RAM server Anda terbatas (misal 512MB/1GB) dan ingin menghemat resource, ubah `ecosystem.config.js`:
94
-
95
- ```javascript
96
- module.exports = {
97
- apps: [
98
- {
99
- name: "my-app",
100
- // ...
101
- instances: 1, // Ubah "max" menjadi 1
102
- // ...
103
- },
104
- ],
105
- };
106
- ```
107
-
108
- Lalu jalankan `pm2 reload ecosystem.config.js`.
109
-
110
- ### 7. Advanced: Menjalankan Beberapa Aplikasi (Multi-App)
111
-
112
- Jika Anda memiliki beberapa aplikasi Node.js dalam satu VPS (misalnya: Backend API, Frontend React SSR, dan API Lapeh), Anda bisa menggabungkannya dalam satu file `ecosystem.config.js`.
113
-
114
- Berikut adalah contoh konfigurasi **Real World** untuk menjalankan 3 aplikasi sekaligus:
115
-
116
- ```javascript
117
- module.exports = {
118
- apps: [
119
- // 1. APLIKASI LAIN (Contoh: Backend MERN)
120
- {
121
- name: "api-mern-news",
122
- cwd: "/var/www/html/node/api-mern-news",
123
- script: "dist/src/index.js",
124
- env: {
125
- NODE_ENV: "production",
126
- PORT: 4000,
127
- },
128
- },
129
-
130
- // 2. APLIKASI LAIN (Contoh: Frontend React/Next.js)
131
- {
132
- name: "web-mern-news",
133
- cwd: "/var/www/html/node/web-mern-news",
134
- script: "npm",
135
- args: "start", // Menjalankan 'npm start'
136
- env: {
137
- NODE_ENV: "production",
138
- PORT: 3001,
139
- },
140
- },
141
-
142
- // 3. APLIKASI LAPEH FRAMEWORK
143
- {
144
- name: "api-lapeh-project",
145
- cwd: "/var/www/html/node/my-lapeh-project",
146
-
147
- // PENTING: Gunakan binary Lapeh dari node_modules lokal
148
- script: "./node_modules/lapeh/bin/index.js",
149
-
150
- // Argument 'start' untuk mode produksi
151
- args: "start",
152
-
153
- // Mode Cluster (Gunakan semua Core CPU)
154
- instances: "max",
155
- exec_mode: "cluster",
156
-
157
- // Restart jika memori bocor > 1GB
158
- max_memory_restart: "1G",
159
-
160
- // Matikan watch di production
161
- watch: false,
162
-
163
- env: {
164
- NODE_ENV: "production",
165
- PORT: 8001,
166
- },
167
- },
168
- ],
169
- };
170
- ```
171
-
172
- **Tips:**
173
-
174
- 1. Sesuaikan `cwd` (Current Working Directory) dengan lokasi folder proyek Anda di VPS.
175
- 2. Pastikan port tidak bentrok antar aplikasi (contoh di atas: 4000, 3001, 8001).
176
- 3. Simpan file ini di root folder proyek utama atau di folder khusus konfigurasi server Anda.
177
- 4. Jalankan semua aplikasi sekaligus dengan: `pm2 start ecosystem.config.js`.
178
-
179
- ### 8. Reverse Proxy (Nginx)
180
-
181
- Jangan expose port 4000 langsung. Gunakan Nginx di depannya.
182
- Config Nginx block:
183
-
184
- ```nginx
185
- server {
186
- server_name api.domain-anda.com;
187
- location / {
188
- proxy_pass http://localhost:4000;
189
- proxy_http_version 1.1;
190
- proxy_set_header Upgrade $http_upgrade;
191
- proxy_set_header Connection 'upgrade';
192
- proxy_set_header Host $host;
193
- proxy_cache_bypass $http_upgrade;
194
- }
195
- }
196
- ```
197
-
198
- ## Strategi 2: Docker (Container)
199
-
200
- Lapeh sudah menyertakan `Dockerfile` (jika belum, buat sederhana saja).
201
-
202
- **Dockerfile Minimal:**
203
-
204
- ```dockerfile
205
- FROM node:18-alpine
206
-
207
- WORKDIR /app
208
-
209
- COPY package*.json ./
210
- RUN npm install
211
-
212
- COPY . .
213
- RUN npm run build
214
-
215
- EXPOSE 4000
216
- CMD ["npm", "run", "start:prod"]
217
- ```
218
-
219
- **Deploy:**
220
-
221
- ```bash
222
- docker build -t my-lapeh-app .
223
- docker run -p 4000:4000 --env-file .env my-lapeh-app
224
- ```
225
-
226
- ## Strategi 3: PaaS (Railway / Render / Vercel)
227
-
228
- Platform seperti Railway.app sangat mudah karena mendeteksi `package.json`.
229
-
230
- 1. Push kode ke GitHub.
231
- 2. Connect repo di Railway/Render.
232
- 3. Set Environment Variables di dashboard mereka.
233
- 4. Set **Build Command**: `npm run build`.
234
- 5. Set **Start Command**: `npm run start:prod`.
235
-
236
- **Catatan Khusus Vercel (Serverless):**
237
- Lapeh didesain sebagai _Long-Running Server_ (Express). Deploy ke Vercel dimungkinkan tapi butuh wrapper serverless (seperti `vercel-express`). Untuk performa terbaik, disarankan menggunakan VPS atau Container (Railway/Fly.io).
238
-
239
- ## Checklist Keamanan Production
240
-
241
- - [ ] `NODE_ENV=production` harus diset.
242
- - [ ] `JWT_SECRET` harus panjang dan acak.
243
- - [ ] Database tidak boleh terekspos ke publik (gunakan private network atau firewall).
244
- - [ ] Rate Limiting aktif (default Lapeh sudah aktif).
245
- - [ ] Gunakan HTTPS (SSL) via Nginx atau Cloudflare.
1
+ # Deployment Guide
2
+
3
+ This guide will help you deploy your Lapeh application from `localhost` to a Production Server (VPS/Cloud).
4
+
5
+ ## Pre-Deployment Preparation
6
+
7
+ Before deploying, ensure:
8
+
9
+ 1. **Environment Variables**: Prepare `.env` values for production (Strong JWT Secret, etc.).
10
+ 2. **Build**: TypeScript must be compiled to JavaScript.
11
+
12
+ ## Strategy 1: VPS (Ubuntu/Debian) with PM2
13
+
14
+ This is the most common and cost-effective way.
15
+
16
+ ### 1. Setup Server
17
+
18
+ Ensure Node.js and NPM are installed on the server.
19
+
20
+ ### 2. Clone & Install
21
+
22
+ ```bash
23
+ git clone https://github.com/username/your-repo.git
24
+ cd your-repo
25
+ npm install --production=false # Install devDependencies for build
26
+ ```
27
+
28
+ ### 3. Build Application
29
+
30
+ ```bash
31
+ npm run build
32
+ ```
33
+
34
+ This will generate a `dist/` folder.
35
+
36
+ ### 4. Setup Production Config
37
+
38
+ ```bash
39
+ cp .env.example .env
40
+ nano .env # Fill with production config
41
+ ```
42
+
43
+ ### 5. Run with PM2
44
+
45
+ Lapeh includes an automatic PM2 configuration (`ecosystem.config.js`).
46
+
47
+ 1. **Install PM2 Global**:
48
+
49
+ ```bash
50
+ npm install -g pm2
51
+ ```
52
+
53
+ 2. **Run Application**:
54
+
55
+ ```bash
56
+ pm2 start ecosystem.config.js
57
+ ```
58
+
59
+ This command will:
60
+
61
+ - Run the application in **Cluster** mode (using all available CPU cores).
62
+ - Set `NODE_ENV` to `production`.
63
+ - Enable auto-restart if the app crashes or memory usage exceeds 1GB.
64
+
65
+ 3. **Check Status**:
66
+
67
+ ```bash
68
+ pm2 status
69
+ pm2 logs
70
+ ```
71
+
72
+ 4. **Save Startup Config (To run on reboot)**:
73
+ ```bash
74
+ pm2 save
75
+ pm2 startup
76
+ ```
77
+
78
+ ### ❓ FAQ: Why Does My App Appear Multiple Times in PM2?
79
+
80
+ If you run `pm2 list` and see your app name appear multiple times, **DON'T WORRY**. This is a feature, not a bug.
81
+
82
+ - **Cause**: `instances: "max"` and `exec_mode: "cluster"` configuration in `ecosystem.config.js`.
83
+ - **Function**: PM2 detects the number of CPU cores on your VPS and creates 1 worker process for each core.
84
+ - **Benefit**: Your application becomes **Multi-Threaded**. Requests are distributed evenly across all processes, improving performance.
85
+
86
+ **How to change to Single Instance (Save RAM):**
87
+ If your server RAM is limited (e.g., 512MB/1GB), modify `ecosystem.config.js`:
88
+
89
+ ```javascript
90
+ module.exports = {
91
+ apps: [
92
+ {
93
+ name: "my-app",
94
+ // ...
95
+ instances: 1, // Change "max" to 1
96
+ // ...
97
+ },
98
+ ],
99
+ };
100
+ ```
101
+
102
+ Then run `pm2 reload ecosystem.config.js`.
103
+
104
+ ### 7. Advanced: Running Multiple Apps (Multi-App)
105
+
106
+ You can combine multiple Node.js apps in one `ecosystem.config.js`.
107
+
108
+ ### 8. Reverse Proxy (Nginx)
109
+
110
+ Do not expose port 4000 directly. Use Nginx in front of it.
111
+ Nginx block config:
112
+
113
+ ```nginx
114
+ server {
115
+ server_name api.your-domain.com;
116
+ location / {
117
+ proxy_pass http://localhost:4000;
118
+ proxy_http_version 1.1;
119
+ proxy_set_header Upgrade $http_upgrade;
120
+ proxy_set_header Connection 'upgrade';
121
+ proxy_set_header Host $host;
122
+ proxy_cache_bypass $http_upgrade;
123
+ }
124
+ }
125
+ ```
126
+
127
+ ## Strategy 2: Docker (Container)
128
+
129
+ Lapeh includes a `Dockerfile`.
130
+
131
+ **Minimal Dockerfile:**
132
+
133
+ ```dockerfile
134
+ FROM node:18-alpine
135
+
136
+ WORKDIR /app
137
+
138
+ COPY package*.json ./
139
+ RUN npm install
140
+
141
+ COPY . .
142
+ RUN npm run build
143
+
144
+ EXPOSE 4000
145
+ CMD ["npm", "run", "start:prod"]
146
+ ```
147
+
148
+ **Deploy:**
149
+
150
+ ```bash
151
+ docker build -t my-lapeh-app .
152
+ docker run -p 4000:4000 --env-file .env my-lapeh-app
153
+ ```
154
+
155
+ ## Strategy 3: PaaS (Railway / Render / Vercel)
156
+
157
+ Platforms like Railway.app are very easy as they detect `package.json`.
158
+
159
+ 1. Push code to GitHub.
160
+ 2. Connect repo on Railway/Render.
161
+ 3. Set Environment Variables in their dashboard.
162
+ 4. Set **Build Command**: `npm run build`.
163
+ 5. Set **Start Command**: `npm run start:prod`.
164
+
165
+ ## Production Security Checklist
166
+
167
+ - [ ] `NODE_ENV=production` must be set.
168
+ - [ ] `JWT_SECRET` must be long and random.
169
+ - [ ] Database credentials (if used) must be secure.
170
+ - [ ] Rate Limiting active (Lapeh default is active).
171
+ - [ ] Use HTTPS (SSL) via Nginx or Cloudflare.
@@ -7,7 +7,6 @@ Welcome to the official documentation for **Lapeh Framework**. This guide will h
7
7
  Before you begin, ensure your system meets the following requirements:
8
8
 
9
9
  - **Node.js**: Version 18.x or newer.
10
- - **Database**: PostgreSQL (Recommended) or MySQL/MariaDB.
11
10
  - **Package Manager**: NPM (bundled with Node.js).
12
11
 
13
12
  ## Installation
@@ -23,18 +22,6 @@ Run the following command in your terminal:
23
22
  npx lapeh@latest init your-project-name
24
23
  ```
25
24
 
26
- **Alternative Quick Setup Flags:**
27
-
28
- - **Full Setup** (Includes dummy data, recommended for learning):
29
- ```bash
30
- npx lapeh@latest init your-project-name --full
31
- ```
32
-
33
- - **Default Setup** (Skips questions, uses PostgreSQL):
34
- ```bash
35
- npx lapeh@latest init your-project-name --y
36
- ```
37
-
38
25
  ### 2. Initial Setup
39
26
 
40
27
  Once the project is created, navigate into the project directory and run the setup wizard:
@@ -49,8 +36,6 @@ This script will automatically perform the following:
49
36
  1. Copy `.env.example` to `.env`.
50
37
  2. Install all dependencies (`npm install`).
51
38
  3. Generate a secure **JWT Secret**.
52
- 4. Run database migrations (create tables).
53
- 5. Run the seeder (populate initial data).
54
39
 
55
40
  ### 3. Run Development Server
56
41
 
@@ -68,17 +53,11 @@ Here is the standard folder structure of Lapeh Framework:
68
53
  my-app/
69
54
  ├── bin/ # CLI scripts for npx
70
55
  ├── doc/ # Project documentation
71
- ├── prisma/ # Database Configuration & Schema
72
- │ ├── migrations/ # Database migration history files
73
- │ ├── base.prisma.template # Database configuration template
74
- │ ├── schema.prisma # Combined schema file (Auto-generated)
75
- │ └── seed.ts # Script for populating initial data
76
56
  ├── scripts/ # Utility scripts (Generator, Compiler)
77
57
  ├── src/ # Main application source code
78
58
  │ ├── controllers/ # Business logic (Request handlers)
79
- │ ├── core/ # Core configuration (DB, Redis, Server)
59
+ │ ├── core/ # Core configuration (Redis, Server)
80
60
  │ ├── middleware/ # Express Middleware (Auth, RateLimit)
81
- │ ├── models/ # Prisma Schema definitions per feature
82
61
  │ ├── routes/ # API routing definitions
83
62
  │ ├── utils/ # Helper functions (Response, Validator)
84
63
  │ └── index.ts # Application entry point
@@ -96,9 +75,6 @@ The `.env` file stores important configurations. Here are the key variables:
96
75
  PORT=4000
97
76
  NODE_ENV=development
98
77
 
99
- # Database (Change according to your credentials)
100
- DATABASE_URL="postgresql://user:password@localhost:5432/mydb?schema=public"
101
-
102
78
  # Security
103
79
  JWT_SECRET="super-long-and-random-secret"
104
80
  ACCESS_TOKEN_EXPIRES_IN=3600 # 1 hour
@@ -57,9 +57,8 @@ Package ini hanya dipakai saat koding, tidak ikut terinstall di server productio
57
57
  | **`typescript`** | Compiler TS. | Mengubah kode `.ts` menjadi `.js`. |
58
58
  | **`nodemon`** | Auto-restarter. | Restart server otomatis setiap kita save file. |
59
59
  | **`eslint`** | Linter (Polisi Kode). | Mencari potensi error dan variabel yang tidak terpakai. |
60
- | **`@types/*`** | Definisi Tipe. | Memberikan intellisense (saran kode) untuk library JavaScript biasa. |
61
- | **`prisma`** | Prisma CLI. | Alat untuk migrasi database (`prisma migrate`) dan generate client. |
62
- | **`tsc-alias`** | Path resolver. | Mengubah alias `@/core` menjadi path relatif `../core` saat build production. |
60
+ | **`@types/*`** | Type Definitions. | Provides intellisense (code suggestions) for plain JavaScript libraries. |
61
+ | **`tsc-alias`** | Path resolver. | Resolves `@/core` aliases to relative `../core` paths during production build. |
63
62
 
64
63
  ---
65
64
 
@@ -9,7 +9,6 @@ To fully understand Lapeh Framework, you need to know what each file and folder
9
9
  | `bin/` | Contains execution scripts for CLI (`npx lapeh`). You rarely touch this. |
10
10
  | `doc/` | Project documentation resides here. |
11
11
  | `lib/` | **Framework Core**. Internal parts of the framework you rarely touch. |
12
- | `prisma/` | The heart of Database configuration. |
13
12
  | `scripts/` | Collection of Node.js utility scripts (generators, schema compilers, etc). |
14
13
  | `src/` | **Main Source Code**. 99% of your coding happens here. |
15
14
  | `.env` | Secret variables (Database URL, API Keys). **Do not commit this file to Git!** |
@@ -29,7 +28,6 @@ Lapeh uses a **Modular** approach. Each feature is grouped into a single module
29
28
  Example `Auth` module structure:
30
29
 
31
30
  - `Auth/auth.controller.ts`: Application logic (Controller).
32
- - `Auth/auth.prisma`: Database table definition (Model).
33
31
 
34
32
  ### `src/routes/`
35
33
 
@@ -54,7 +52,6 @@ This part is similar to `node_modules` or the `.next` folder in Next.js. This is
54
52
  The "Engine" part of the framework.
55
53
 
56
54
  - `server.ts`: Express App setup.
57
- - `database.ts`: Prisma Client instance.
58
55
  - `redis.ts`: Redis connection.
59
56
  - `serializer.ts`: JSON Schema caching logic.
60
57
 
@@ -74,18 +71,11 @@ Built-in Helper functions.
74
71
  - `response.ts`: Standard JSON response format (`sendFastSuccess`, `sendError`).
75
72
  - `logger.ts`: Logging system (Winston).
76
73
 
77
- ## `prisma/` Folder
78
-
79
- - `migrations/`: Database change history (SQL files). Do not edit manually.
80
- - `base.prisma.template`: Header of the database schema (contains db datasource config).
81
- - `seed.ts`: Script for populating initial data (Data Seeding).
82
-
83
74
  ## `scripts/` Folder
84
75
 
85
76
  "Magic" scripts executed by `npm run`.
86
77
 
87
- - `make-module.js`: New module generator (Controller + Prisma Model).
88
- - `compile-schema.js`: Merges `.prisma` files from each module into a single `schema.prisma`.
78
+ - `make-module.js`: New module generator (Controller).
89
79
  - `init-project.js`: Initial setup wizard.
90
80
  - `generate-jwt-secret.js`: Automatic JWT secret key generator.
91
81