create-tigra 1.0.0
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.
- package/LICENSE +21 -0
- package/README.md +87 -0
- package/bin/create-tigra.js +292 -0
- package/package.json +41 -0
- package/template/.agent/rules/client/01-project-structure.md +326 -0
- package/template/.agent/rules/client/02-component-patterns.md +249 -0
- package/template/.agent/rules/client/03-typescript-rules.md +226 -0
- package/template/.agent/rules/client/04-state-management.md +474 -0
- package/template/.agent/rules/client/05-api-integration.md +129 -0
- package/template/.agent/rules/client/06-forms-validation.md +129 -0
- package/template/.agent/rules/client/07-common-patterns.md +150 -0
- package/template/.agent/rules/client/08-color-system.md +93 -0
- package/template/.agent/rules/client/09-security-rules.md +97 -0
- package/template/.agent/rules/client/10-testing-strategy.md +370 -0
- package/template/.agent/rules/global/ai-edit-safety.md +38 -0
- package/template/.agent/rules/server/01-db-and-migrations.md +242 -0
- package/template/.agent/rules/server/02-general-rules.md +111 -0
- package/template/.agent/rules/server/03-migrations.md +20 -0
- package/template/.agent/rules/server/04-pagination.md +130 -0
- package/template/.agent/rules/server/05-project-conventions.md +71 -0
- package/template/.agent/rules/server/06-response-handling.md +173 -0
- package/template/.agent/rules/server/07-testing-strategy.md +506 -0
- package/template/.agent/rules/server/08-observability.md +180 -0
- package/template/.agent/rules/server/09-api-documentation-v2.md +168 -0
- package/template/.agent/rules/server/10-background-jobs-v2.md +185 -0
- package/template/.agent/rules/server/11-rate-limiting-v2.md +210 -0
- package/template/.agent/rules/server/12-performance-optimization.md +567 -0
- package/template/.claude/rules/client-01-project-structure.md +327 -0
- package/template/.claude/rules/client-02-component-patterns.md +250 -0
- package/template/.claude/rules/client-03-typescript-rules.md +227 -0
- package/template/.claude/rules/client-04-state-management.md +475 -0
- package/template/.claude/rules/client-05-api-integration.md +130 -0
- package/template/.claude/rules/client-06-forms-validation.md +130 -0
- package/template/.claude/rules/client-07-common-patterns.md +151 -0
- package/template/.claude/rules/client-08-color-system.md +94 -0
- package/template/.claude/rules/client-09-security-rules.md +98 -0
- package/template/.claude/rules/client-10-testing-strategy.md +371 -0
- package/template/.claude/rules/global-ai-edit-safety.md +39 -0
- package/template/.claude/rules/server-01-db-and-migrations.md +243 -0
- package/template/.claude/rules/server-02-general-rules.md +112 -0
- package/template/.claude/rules/server-03-migrations.md +21 -0
- package/template/.claude/rules/server-04-pagination.md +131 -0
- package/template/.claude/rules/server-05-project-conventions.md +72 -0
- package/template/.claude/rules/server-06-response-handling.md +174 -0
- package/template/.claude/rules/server-07-testing-strategy.md +507 -0
- package/template/.claude/rules/server-08-observability.md +181 -0
- package/template/.claude/rules/server-09-api-documentation-v2.md +169 -0
- package/template/.claude/rules/server-10-background-jobs-v2.md +186 -0
- package/template/.claude/rules/server-11-rate-limiting-v2.md +211 -0
- package/template/.claude/rules/server-12-performance-optimization.md +568 -0
- package/template/.cursor/rules/client-01-project-structure.mdc +327 -0
- package/template/.cursor/rules/client-02-component-patterns.mdc +250 -0
- package/template/.cursor/rules/client-03-typescript-rules.mdc +227 -0
- package/template/.cursor/rules/client-04-state-management.mdc +475 -0
- package/template/.cursor/rules/client-05-api-integration.mdc +130 -0
- package/template/.cursor/rules/client-06-forms-validation.mdc +130 -0
- package/template/.cursor/rules/client-07-common-patterns.mdc +151 -0
- package/template/.cursor/rules/client-08-color-system.mdc +94 -0
- package/template/.cursor/rules/client-09-security-rules.mdc +98 -0
- package/template/.cursor/rules/client-10-testing-strategy.mdc +371 -0
- package/template/.cursor/rules/global-ai-edit-safety.mdc +39 -0
- package/template/.cursor/rules/server-01-db-and-migrations.mdc +243 -0
- package/template/.cursor/rules/server-02-general-rules.mdc +112 -0
- package/template/.cursor/rules/server-03-migrations.mdc +21 -0
- package/template/.cursor/rules/server-04-pagination.mdc +131 -0
- package/template/.cursor/rules/server-05-project-conventions.mdc +72 -0
- package/template/.cursor/rules/server-06-response-handling.mdc +174 -0
- package/template/.cursor/rules/server-07-testing-strategy.mdc +507 -0
- package/template/.cursor/rules/server-08-observability.mdc +181 -0
- package/template/.cursor/rules/server-09-api-documentation-v2.mdc +169 -0
- package/template/.cursor/rules/server-10-background-jobs-v2.mdc +186 -0
- package/template/.cursor/rules/server-11-rate-limiting-v2.mdc +211 -0
- package/template/.cursor/rules/server-12-performance-optimization.mdc +568 -0
- package/template/CLAUDE.md +207 -0
- package/template/server/.env.example +148 -0
- package/template/server/.tsc-aliasrc.json +12 -0
- package/template/server/README.md +175 -0
- package/template/server/SECURITY.md +190 -0
- package/template/server/biome.json +42 -0
- package/template/server/docker-compose.yml +111 -0
- package/template/server/package.json +83 -0
- package/template/server/postman_collection.json +733 -0
- package/template/server/prisma/schema.prisma +92 -0
- package/template/server/prisma/seed.ts +142 -0
- package/template/server/scripts/wait-for-db.js +60 -0
- package/template/server/src/app.ts +74 -0
- package/template/server/src/config/env.ts +101 -0
- package/template/server/src/hooks/request-timing.hook.ts +26 -0
- package/template/server/src/libs/auth/authenticate.middleware.ts +22 -0
- package/template/server/src/libs/auth/rbac.middleware.test.ts +134 -0
- package/template/server/src/libs/auth/rbac.middleware.ts +147 -0
- package/template/server/src/libs/db.ts +76 -0
- package/template/server/src/libs/error-handler.ts +89 -0
- package/template/server/src/libs/logger.ts +60 -0
- package/template/server/src/libs/queue.ts +79 -0
- package/template/server/src/libs/redis.ts +79 -0
- package/template/server/src/libs/swagger-schemas.ts +16 -0
- package/template/server/src/modules/admin/admin.controller.ts +122 -0
- package/template/server/src/modules/admin/admin.routes.ts +100 -0
- package/template/server/src/modules/admin/admin.schemas.ts +35 -0
- package/template/server/src/modules/admin/admin.service.ts +167 -0
- package/template/server/src/modules/auth/auth.controller.ts +141 -0
- package/template/server/src/modules/auth/auth.integration.test.ts +150 -0
- package/template/server/src/modules/auth/auth.repo.ts +218 -0
- package/template/server/src/modules/auth/auth.routes.ts +204 -0
- package/template/server/src/modules/auth/auth.schemas.ts +137 -0
- package/template/server/src/modules/auth/auth.service.test.ts +119 -0
- package/template/server/src/modules/auth/auth.service.ts +329 -0
- package/template/server/src/modules/auth/auth.types.ts +97 -0
- package/template/server/src/modules/resources/resources.controller.ts +218 -0
- package/template/server/src/modules/resources/resources.repo.ts +253 -0
- package/template/server/src/modules/resources/resources.routes.ts +355 -0
- package/template/server/src/modules/resources/resources.schemas.ts +146 -0
- package/template/server/src/modules/resources/resources.service.ts +218 -0
- package/template/server/src/modules/resources/resources.types.ts +73 -0
- package/template/server/src/plugins/rate-limit.plugin.ts +21 -0
- package/template/server/src/plugins/security.plugin.ts +21 -0
- package/template/server/src/plugins/swagger.plugin.ts +41 -0
- package/template/server/src/routes/health.routes.ts +31 -0
- package/template/server/src/server.ts +142 -0
- package/template/server/src/test/setup.ts +38 -0
- package/template/server/src/types/fastify.d.ts +36 -0
- package/template/server/src/utils/errors.ts +108 -0
- package/template/server/src/utils/pagination.ts +120 -0
- package/template/server/src/utils/response.ts +110 -0
- package/template/server/src/workers/file.worker.ts +106 -0
- package/template/server/tsconfig.build.json +30 -0
- package/template/server/tsconfig.build.tsbuildinfo +1 -0
- package/template/server/tsconfig.json +89 -0
- package/template/server/tsconfig.test.json +22 -0
- package/template/server/vitest.config.ts +98 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# Security Considerations
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This document outlines known security considerations for this project. We take security seriously and regularly audit our dependencies for vulnerabilities.
|
|
6
|
+
|
|
7
|
+
**Last Security Audit**: January 10, 2026
|
|
8
|
+
**Next Scheduled Audit**: February 10, 2026
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Current Security Status
|
|
13
|
+
|
|
14
|
+
**Production Dependencies**: 100% Secure (0 vulnerabilities)
|
|
15
|
+
**Development Dependencies**: 100% Secure (0 vulnerabilities)
|
|
16
|
+
**Overall Security Score**: 100/100
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Known Issues
|
|
21
|
+
|
|
22
|
+
**None** - All dependencies are currently secure with no known vulnerabilities.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Security Best Practices
|
|
27
|
+
|
|
28
|
+
### Dependency Management
|
|
29
|
+
|
|
30
|
+
1. **Monthly Security Audits**
|
|
31
|
+
```bash
|
|
32
|
+
npm audit
|
|
33
|
+
npm outdated
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
2. **Automated Monitoring**
|
|
37
|
+
- Enable GitHub Dependabot
|
|
38
|
+
- Subscribe to security advisories
|
|
39
|
+
- Monitor npm security feeds
|
|
40
|
+
|
|
41
|
+
3. **Update Strategy**
|
|
42
|
+
- Patch versions: Update immediately
|
|
43
|
+
- Minor versions: Update monthly
|
|
44
|
+
- Major versions: Review and test before updating
|
|
45
|
+
|
|
46
|
+
### Environment Variables
|
|
47
|
+
|
|
48
|
+
1. **Never Commit Secrets**
|
|
49
|
+
- Use `.env` files (gitignored)
|
|
50
|
+
- Use environment-specific configurations
|
|
51
|
+
- Rotate secrets regularly
|
|
52
|
+
|
|
53
|
+
2. **Required Environment Variables**
|
|
54
|
+
```bash
|
|
55
|
+
# See .env.example for full list
|
|
56
|
+
DATABASE_URL=mysql://...
|
|
57
|
+
JWT_SECRET=<minimum-32-characters>
|
|
58
|
+
REDIS_HOST=localhost
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
3. **Validation**
|
|
62
|
+
- All environment variables are validated at startup
|
|
63
|
+
- See `src/config/env.ts` for schema
|
|
64
|
+
|
|
65
|
+
### Authentication & Authorization
|
|
66
|
+
|
|
67
|
+
1. **JWT Security**
|
|
68
|
+
- Tokens include issuer validation
|
|
69
|
+
- Access tokens expire in 15 minutes
|
|
70
|
+
- Refresh tokens expire in 7 days
|
|
71
|
+
- Secure secret (minimum 32 characters)
|
|
72
|
+
|
|
73
|
+
2. **Password Security**
|
|
74
|
+
- bcrypt with 10 rounds
|
|
75
|
+
- Minimum password requirements enforced
|
|
76
|
+
- No password storage in logs
|
|
77
|
+
|
|
78
|
+
3. **Role-Based Access Control (RBAC)**
|
|
79
|
+
- Implemented via middleware
|
|
80
|
+
- Three roles: USER, ORGANIZATION, ADMIN
|
|
81
|
+
- Route-level permission checks
|
|
82
|
+
|
|
83
|
+
### API Security
|
|
84
|
+
|
|
85
|
+
1. **Rate Limiting**
|
|
86
|
+
- Global: 100 requests per 15 minutes
|
|
87
|
+
- Login: 5 requests per 15 minutes
|
|
88
|
+
- Configurable per route
|
|
89
|
+
|
|
90
|
+
2. **Input Validation**
|
|
91
|
+
- All inputs validated with Zod schemas
|
|
92
|
+
- Type-safe validation
|
|
93
|
+
- Automatic error responses
|
|
94
|
+
|
|
95
|
+
3. **Security Headers**
|
|
96
|
+
- Helmet.js for security headers
|
|
97
|
+
- CORS properly configured
|
|
98
|
+
- CSP enabled in production
|
|
99
|
+
|
|
100
|
+
### Database Security
|
|
101
|
+
|
|
102
|
+
1. **SQL Injection Prevention**
|
|
103
|
+
- Prisma ORM (parameterized queries)
|
|
104
|
+
- No raw SQL with user input
|
|
105
|
+
- Type-safe database access
|
|
106
|
+
|
|
107
|
+
2. **Connection Security**
|
|
108
|
+
- Encrypted connections (SSL/TLS)
|
|
109
|
+
- Connection pooling
|
|
110
|
+
- Credential rotation
|
|
111
|
+
|
|
112
|
+
### Monitoring & Logging
|
|
113
|
+
|
|
114
|
+
1. **Structured Logging**
|
|
115
|
+
- Pino for high-performance logging
|
|
116
|
+
- Sensitive data redaction
|
|
117
|
+
- Request ID tracking
|
|
118
|
+
|
|
119
|
+
2. **Error Handling**
|
|
120
|
+
- No stack traces in production responses
|
|
121
|
+
- Internal errors logged securely
|
|
122
|
+
- User-friendly error messages
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Reporting Security Issues
|
|
127
|
+
|
|
128
|
+
If you discover a security vulnerability, please follow responsible disclosure:
|
|
129
|
+
|
|
130
|
+
1. **Do NOT** open a public GitHub issue
|
|
131
|
+
2. Email security concerns to: [itorn9777@gmail.com]
|
|
132
|
+
3. Include:
|
|
133
|
+
- Description of the vulnerability
|
|
134
|
+
- Steps to reproduce
|
|
135
|
+
- Potential impact
|
|
136
|
+
- Suggested fix (if any)
|
|
137
|
+
|
|
138
|
+
We will respond within 48 hours and work with you to address the issue.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Security Audit History
|
|
143
|
+
|
|
144
|
+
### January 10, 2026
|
|
145
|
+
- **Action**: Comprehensive dependency update
|
|
146
|
+
- **Vulnerabilities Fixed**: 8 out of 8 (100%)
|
|
147
|
+
- **Status**: All dependencies 100% secure
|
|
148
|
+
- **Remaining**: None
|
|
149
|
+
- **Next Review**: February 10, 2026
|
|
150
|
+
|
|
151
|
+
### Previous Audits
|
|
152
|
+
- Initial security setup and configuration
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Compliance & Standards
|
|
157
|
+
|
|
158
|
+
This project follows security best practices including:
|
|
159
|
+
|
|
160
|
+
- OWASP Top 10 guidelines
|
|
161
|
+
- Secure coding standards
|
|
162
|
+
- Regular dependency audits
|
|
163
|
+
- Input validation and sanitization
|
|
164
|
+
- Secure authentication and authorization
|
|
165
|
+
- Encrypted data transmission
|
|
166
|
+
- Comprehensive logging and monitoring
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Additional Resources
|
|
171
|
+
|
|
172
|
+
**Security Tools:**
|
|
173
|
+
- npm audit: Built-in vulnerability scanner
|
|
174
|
+
- Snyk: https://snyk.io/
|
|
175
|
+
- GitHub Dependabot: Automated dependency updates
|
|
176
|
+
|
|
177
|
+
**Security Guides:**
|
|
178
|
+
- OWASP: https://owasp.org/
|
|
179
|
+
- Node.js Security Best Practices: https://nodejs.org/en/docs/guides/security/
|
|
180
|
+
- Fastify Security: https://www.fastify.io/docs/latest/Guides/Security/
|
|
181
|
+
|
|
182
|
+
**Monitoring:**
|
|
183
|
+
- npm Security Advisories: https://github.com/advisories
|
|
184
|
+
- Node.js Security Releases: https://nodejs.org/en/blog/vulnerability/
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
**Last Updated**: January 10, 2026
|
|
189
|
+
**Maintained By**: Development Team
|
|
190
|
+
**Review Schedule**: Monthly
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
|
|
3
|
+
"organizeImports": {
|
|
4
|
+
"enabled": true
|
|
5
|
+
},
|
|
6
|
+
"linter": {
|
|
7
|
+
"enabled": true,
|
|
8
|
+
"rules": {
|
|
9
|
+
"recommended": true,
|
|
10
|
+
"complexity": {
|
|
11
|
+
"noForEach": "off"
|
|
12
|
+
},
|
|
13
|
+
"suspicious": {
|
|
14
|
+
"noExplicitAny": "warn"
|
|
15
|
+
},
|
|
16
|
+
"style": {
|
|
17
|
+
"noNonNullAssertion": "off"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"formatter": {
|
|
22
|
+
"enabled": true,
|
|
23
|
+
"indentStyle": "space",
|
|
24
|
+
"indentWidth": 4,
|
|
25
|
+
"lineWidth": 100
|
|
26
|
+
},
|
|
27
|
+
"javascript": {
|
|
28
|
+
"formatter": {
|
|
29
|
+
"quoteStyle": "single",
|
|
30
|
+
"trailingCommas": "es5",
|
|
31
|
+
"semicolons": "always"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"files": {
|
|
35
|
+
"ignore": [
|
|
36
|
+
"node_modules",
|
|
37
|
+
"dist",
|
|
38
|
+
"coverage",
|
|
39
|
+
"*.json"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
version: '3.8'
|
|
2
|
+
name: {{PROJECT_NAME}}
|
|
3
|
+
|
|
4
|
+
services:
|
|
5
|
+
# ==============================================
|
|
6
|
+
# MySQL Database Service
|
|
7
|
+
# ==============================================
|
|
8
|
+
mysql:
|
|
9
|
+
image: mysql:8.0
|
|
10
|
+
container_name: {{PROJECT_NAME}}-mysql
|
|
11
|
+
restart: unless-stopped
|
|
12
|
+
ports:
|
|
13
|
+
- '3306:3306'
|
|
14
|
+
environment:
|
|
15
|
+
MYSQL_ROOT_PASSWORD: {{DATABASE_PASSWORD}}
|
|
16
|
+
MYSQL_DATABASE: {{DATABASE_NAME}}
|
|
17
|
+
# Performance tuning
|
|
18
|
+
MYSQL_INNODB_BUFFER_POOL_SIZE: 256M
|
|
19
|
+
MYSQL_MAX_CONNECTIONS: 100
|
|
20
|
+
volumes:
|
|
21
|
+
# Persist MySQL data
|
|
22
|
+
- {{PROJECT_NAME}}_mysql_data:/var/lib/mysql
|
|
23
|
+
# Custom MySQL configuration (optional)
|
|
24
|
+
# - ./docker/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
|
|
25
|
+
networks:
|
|
26
|
+
- {{PROJECT_NAME}}-network
|
|
27
|
+
healthcheck:
|
|
28
|
+
test: [ 'CMD', 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', '-p{{DATABASE_PASSWORD}}' ]
|
|
29
|
+
interval: 10s
|
|
30
|
+
timeout: 5s
|
|
31
|
+
retries: 5
|
|
32
|
+
start_period: 30s
|
|
33
|
+
command:
|
|
34
|
+
- --character-set-server=utf8mb4
|
|
35
|
+
- --collation-server=utf8mb4_unicode_ci
|
|
36
|
+
- --default-authentication-plugin=mysql_native_password
|
|
37
|
+
|
|
38
|
+
# ==============================================
|
|
39
|
+
# Redis Cache Service
|
|
40
|
+
# ==============================================
|
|
41
|
+
redis:
|
|
42
|
+
image: redis:7-alpine
|
|
43
|
+
container_name: {{PROJECT_NAME}}-redis
|
|
44
|
+
restart: unless-stopped
|
|
45
|
+
ports:
|
|
46
|
+
- '6379:6379'
|
|
47
|
+
volumes:
|
|
48
|
+
# Persist Redis data
|
|
49
|
+
- {{PROJECT_NAME}}_redis_data:/data
|
|
50
|
+
# Custom Redis configuration (optional)
|
|
51
|
+
# - ./docker/redis/redis.conf:/usr/local/etc/redis/redis.conf
|
|
52
|
+
networks:
|
|
53
|
+
- {{PROJECT_NAME}}-network
|
|
54
|
+
healthcheck:
|
|
55
|
+
test: [ 'CMD', 'redis-cli', 'ping' ]
|
|
56
|
+
interval: 10s
|
|
57
|
+
timeout: 3s
|
|
58
|
+
retries: 5
|
|
59
|
+
start_period: 10s
|
|
60
|
+
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy noeviction
|
|
61
|
+
# ==============================================
|
|
62
|
+
# phpMyAdmin (Database Management UI)
|
|
63
|
+
# ==============================================
|
|
64
|
+
# Access at: http://localhost:8080
|
|
65
|
+
phpmyadmin:
|
|
66
|
+
image: phpmyadmin/phpmyadmin:latest
|
|
67
|
+
container_name: {{PROJECT_NAME}}-phpmyadmin
|
|
68
|
+
restart: unless-stopped
|
|
69
|
+
ports:
|
|
70
|
+
- '8080:80'
|
|
71
|
+
environment:
|
|
72
|
+
PMA_HOST: mysql
|
|
73
|
+
PMA_ARBITRARY: 1
|
|
74
|
+
# PMA_USER: root <-- Removed to allow manual login
|
|
75
|
+
# PMA_PASSWORD: password <-- Removed to allow manual login
|
|
76
|
+
networks:
|
|
77
|
+
- {{PROJECT_NAME}}-network
|
|
78
|
+
depends_on:
|
|
79
|
+
- mysql
|
|
80
|
+
|
|
81
|
+
# ==============================================
|
|
82
|
+
# Redis Commander (Redis Management UI)
|
|
83
|
+
# ==============================================
|
|
84
|
+
# Access at: http://localhost:8081
|
|
85
|
+
redis-commander:
|
|
86
|
+
image: rediscommander/redis-commander:latest
|
|
87
|
+
container_name: {{PROJECT_NAME}}-redis-commander
|
|
88
|
+
restart: unless-stopped
|
|
89
|
+
ports:
|
|
90
|
+
- '8081:8081'
|
|
91
|
+
environment:
|
|
92
|
+
REDIS_HOSTS: local:redis:6379
|
|
93
|
+
networks:
|
|
94
|
+
- {{PROJECT_NAME}}-network
|
|
95
|
+
depends_on:
|
|
96
|
+
- redis
|
|
97
|
+
# ==============================================
|
|
98
|
+
# Named Volumes for Data Persistence
|
|
99
|
+
# ==============================================
|
|
100
|
+
volumes:
|
|
101
|
+
{{PROJECT_NAME}}_mysql_data:
|
|
102
|
+
driver: local
|
|
103
|
+
{{PROJECT_NAME}}_redis_data:
|
|
104
|
+
driver: local
|
|
105
|
+
|
|
106
|
+
# ==============================================
|
|
107
|
+
# Network Configuration
|
|
108
|
+
# ==============================================
|
|
109
|
+
networks:
|
|
110
|
+
{{PROJECT_NAME}}-network:
|
|
111
|
+
driver: bridge
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{PROJECT_NAME}}",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "{{PROJECT_DESCRIPTION}}",
|
|
5
|
+
"main": "dist/server.js",
|
|
6
|
+
"type": "commonjs",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=20.0.0"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "tsx watch src/server.ts",
|
|
12
|
+
"build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
13
|
+
"build:debug": "tsc -p tsconfig.build.json --listFiles",
|
|
14
|
+
"start": "node dist/server.js",
|
|
15
|
+
"start:prod": "NODE_ENV=production node dist/server.js",
|
|
16
|
+
"lint": "biome check src",
|
|
17
|
+
"lint:fix": "biome check --write src",
|
|
18
|
+
"test": "vitest run",
|
|
19
|
+
"test:watch": "vitest",
|
|
20
|
+
"test:coverage": "vitest run --coverage",
|
|
21
|
+
"test:e2e": "vitest run --config vitest.e2e.config.ts",
|
|
22
|
+
"db:wait": "node scripts/wait-for-db.js",
|
|
23
|
+
"db:init": "npm run db:wait && npx prisma migrate dev --name init",
|
|
24
|
+
"prisma:generate": "prisma generate",
|
|
25
|
+
"prisma:migrate": "prisma migrate dev",
|
|
26
|
+
"prisma:migrate:deploy": "prisma migrate deploy",
|
|
27
|
+
"prisma:studio": "prisma studio",
|
|
28
|
+
"prisma:reset": "prisma migrate reset",
|
|
29
|
+
"prisma:seed": "tsx prisma/seed.ts",
|
|
30
|
+
"db:push": "prisma db push",
|
|
31
|
+
"format": "biome format --write src",
|
|
32
|
+
"format:check": "biome format src"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"fastify",
|
|
36
|
+
"typescript",
|
|
37
|
+
"prisma",
|
|
38
|
+
"api",
|
|
39
|
+
"rest",
|
|
40
|
+
"mysql",
|
|
41
|
+
"redis"
|
|
42
|
+
],
|
|
43
|
+
"author": "{{AUTHOR_NAME}}",
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@fastify/compress": "^8.0.0",
|
|
47
|
+
"@fastify/cors": "^10.0.0",
|
|
48
|
+
"@fastify/helmet": "^13.0.0",
|
|
49
|
+
"@fastify/multipart": "^9.0.0",
|
|
50
|
+
"@fastify/rate-limit": "^10.2.0",
|
|
51
|
+
"@fastify/swagger": "^9.4.0",
|
|
52
|
+
"@fastify/swagger-ui": "^5.2.0",
|
|
53
|
+
"@prisma/client": "^6.2.0",
|
|
54
|
+
"bcryptjs": "^2.4.3",
|
|
55
|
+
"bullmq": "^5.34.0",
|
|
56
|
+
"dotenv": "^16.4.7",
|
|
57
|
+
"fastify": "^5.2.0",
|
|
58
|
+
"ioredis": "^5.4.2",
|
|
59
|
+
"jsonwebtoken": "^9.0.2",
|
|
60
|
+
"mysql2": "^3.11.5",
|
|
61
|
+
"pino": "^9.6.0",
|
|
62
|
+
"zod": "^3.24.0",
|
|
63
|
+
"zod-to-json-schema": "^3.24.0"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@biomejs/biome": "^1.9.0",
|
|
67
|
+
"@types/bcryptjs": "^2.4.6",
|
|
68
|
+
"@types/jsonwebtoken": "^9.0.5",
|
|
69
|
+
"@types/node": "^22.10.0",
|
|
70
|
+
"@types/supertest": "^6.0.2",
|
|
71
|
+
"pino-pretty": "^13.0.0",
|
|
72
|
+
"prisma": "^6.2.0",
|
|
73
|
+
"@vitest/coverage-v8": "^3.0.0",
|
|
74
|
+
"supertest": "^7.1.0",
|
|
75
|
+
"tsc-alias": "^1.8.16",
|
|
76
|
+
"tsx": "^4.19.0",
|
|
77
|
+
"typescript": "^5.7.0",
|
|
78
|
+
"vitest": "^3.0.0"
|
|
79
|
+
},
|
|
80
|
+
"prisma": {
|
|
81
|
+
"seed": "tsx prisma/seed.ts"
|
|
82
|
+
}
|
|
83
|
+
}
|