Backend stack: - Fastify v5 with JWT auth, CORS, cookies, rate limiting - PostgreSQL via Drizzle ORM with full schema: users, presets, game_progress, shared_patches, likes, refresh_tokens - Argon2 password hashing, httpOnly refresh cookie rotation API endpoints: - POST /api/v1/auth/register|login|refresh|logout - GET|PATCH /api/v1/users/me (profile) - GET /api/v1/admin/stats (dashboard KPIs) - GET|PATCH /api/v1/admin/users (list, role change, ban) - GET|PATCH /api/v1/admin/patches (moderation) - GET /api/health Infrastructure: - Vite proxy /api → localhost:3001 for dev - .env.example with all config vars - Dockerfile updated: installs server deps, serves SPA + API - npm run dev:server for backend hot-reload - npm run db:push for schema sync Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
30 lines
704 B
JSON
30 lines
704 B
JSON
{
|
|
"name": "@reaktor/server",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"start": "node src/index.js",
|
|
"dev": "node --watch src/index.js",
|
|
"db:generate": "drizzle-kit generate",
|
|
"db:push": "drizzle-kit push"
|
|
},
|
|
"dependencies": {
|
|
"@fastify/cookie": "^11.0.2",
|
|
"@fastify/cors": "^11.2.0",
|
|
"@fastify/jwt": "^10.0.0",
|
|
"@fastify/multipart": "^9.4.0",
|
|
"@fastify/rate-limit": "^10.3.0",
|
|
"@fastify/static": "^9.0.0",
|
|
"argon2": "^0.44.0",
|
|
"dotenv": "^17.3.1",
|
|
"drizzle-orm": "^0.45.1",
|
|
"fastify": "^5.8.2",
|
|
"postgres": "^3.4.8",
|
|
"uuid": "^13.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"drizzle-kit": "^0.31.10"
|
|
}
|
|
}
|