Files
spotlightcam/backend/package.json
Radosław Gierwiało 92315d5a8c feat: add test accounts and secure event slugs
Security improvements:
- Add @default(cuid()) to Event.slug for auto-generated random slugs
- Prevent ID enumeration attacks (no more predictable slugs like "warsaw-dance-festival-2025")
- Event slugs now generated as secure cuid strings (e.g., "cmhz3lcgb00018vbn34v4phoi")

Test accounts:
- Add 3 test users to seed (john_dancer, sarah_swings, mike_blues)
- All users checked in to Warsaw Dance Festival 2025
- Pre-configured heats for testing matchmaking system
- Full profiles with WSDC IDs, social media, and locations

Seed improvements:
- Add bcryptjs for password hashing
- Add Prisma seed configuration to package.json
- Use worldsdcId for event upsert (instead of slug)
- Auto-generate event slugs via Prisma default

Documentation:
- Add test account credentials to SESSION_CONTEXT.md
- Document event slug security model
- Include sample heats for each test user
2025-11-14 17:55:29 +01:00

62 lines
1.4 KiB
JSON

{
"name": "spotlightcam-backend",
"version": "1.0.0",
"description": "Backend API for spotlight.cam - P2P video exchange for dance events",
"main": "src/server.js",
"scripts": {
"start": "node src/server.js",
"dev": "nodemon src/server.js",
"test": "jest --coverage",
"test:watch": "jest --watch",
"prisma:generate": "prisma generate",
"prisma:migrate": "prisma migrate dev",
"prisma:seed": "node prisma/seed.js",
"prisma:studio": "prisma studio"
},
"keywords": [
"webrtc",
"p2p",
"video",
"dance",
"matchmaking"
],
"author": "",
"license": "ISC",
"dependencies": {
"@aws-sdk/client-ses": "^3.930.0",
"@prisma/client": "^5.8.0",
"bcryptjs": "^2.4.3",
"cookie-parser": "^1.4.7",
"cors": "^2.8.5",
"csurf": "^1.11.0",
"dompurify": "^3.3.0",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"express-rate-limit": "^8.2.1",
"express-validator": "^7.3.0",
"helmet": "^8.1.0",
"jsdom": "^27.2.0",
"jsonwebtoken": "^9.0.2",
"socket.io": "^4.8.1"
},
"devDependencies": {
"jest": "^29.7.0",
"nodemon": "^3.0.2",
"prisma": "^5.8.0",
"socket.io-client": "^4.8.1",
"supertest": "^6.3.3"
},
"jest": {
"testEnvironment": "node",
"coveragePathIgnorePatterns": [
"/node_modules/"
],
"testMatch": [
"**/__tests__/**/*.test.js"
]
},
"prisma": {
"seed": "node prisma/seed.js"
}
}