docs: update documentation for Phase 3.7 changes
- Update README.md with beta features, seed commands, resource limits - Update SESSION_CONTEXT.md with Phase 3.7 changelog and new structure - Update DEPLOYMENT.md with seeding instructions and resource requirements - Document Makefile commands, environment reorganization, footer changes - Update test accounts to use @spotlight.cam domain - Add production resource allocation table (4 CPU / 8GB server) - Last updated: 2025-12-06
This commit is contained in:
70
README.md
70
README.md
@@ -80,7 +80,10 @@ Web application (PWA) enabling dance event participants to:
|
||||
- Profile statistics (average rating, reviews)
|
||||
- Responsive mobile layout
|
||||
- 404 page with activity logging for invalid routes
|
||||
- About Us and How It Works pages (markdown-based static content)
|
||||
- Static content pages (About Us, How It Works, Privacy Policy) - HTML-based
|
||||
- Dedicated Footer component for authenticated users
|
||||
- GDPR/RODO compliant cookie consent banner
|
||||
- Google Analytics 4 integration with privacy controls
|
||||
|
||||
### Admin & Monitoring
|
||||
- Activity Log System with real-time streaming dashboard
|
||||
@@ -95,8 +98,14 @@ Web application (PWA) enabling dance event participants to:
|
||||
### PWA & Infrastructure
|
||||
- Progressive Web App (offline support, iOS compatible)
|
||||
- Docker Compose orchestration (nginx, frontend, backend, PostgreSQL)
|
||||
- Development profile: No resource limits
|
||||
- Production profile: Optimized for 4 CPU / 8GB server (3.5 CPU / 6GB allocated)
|
||||
- PostgreSQL 15 with Prisma ORM (12 tables)
|
||||
- Admin CLI with REPL for operations
|
||||
- Makefile commands for streamlined development
|
||||
- Split seed scripts (development vs production data)
|
||||
- Environment-based configuration (.env.development, .env.production)
|
||||
- Beta testing mode with account tier auto-assignment
|
||||
|
||||
---
|
||||
|
||||
@@ -133,12 +142,24 @@ docker compose --profile dev up
|
||||
http://localhost:8080
|
||||
```
|
||||
|
||||
### 2. Test the application
|
||||
### 2. Seed the database
|
||||
|
||||
```bash
|
||||
# Seed with development data (includes test users, events, heats)
|
||||
make seed-dev
|
||||
|
||||
# Or use npm directly
|
||||
docker compose exec backend npm run prisma:seed:dev
|
||||
```
|
||||
|
||||
### 3. Test the application
|
||||
|
||||
Use seeded accounts:
|
||||
- john@example.com / Dance123!
|
||||
- sarah@example.com / Swing456!
|
||||
- mike@example.com / Blues789!
|
||||
- **Admin:** admin@spotlight.cam / [password set during seed]
|
||||
- **Test users:**
|
||||
- john@spotlight.cam / Dance123! (SUPPORTER tier)
|
||||
- sarah@spotlight.cam / Swing456! (SUPPORTER tier)
|
||||
- mike@spotlight.cam / Blues789! (SUPPORTER tier)
|
||||
|
||||
**Flow:**
|
||||
1. Login → Select event → Join chat
|
||||
@@ -155,16 +176,21 @@ docker compose --profile dev down
|
||||
# Rebuild after changes
|
||||
docker compose --profile dev up --build
|
||||
|
||||
# Run tests
|
||||
docker compose exec backend npm test
|
||||
# Database seeding
|
||||
make seed-dev # Development data (admin + test users + events)
|
||||
make seed-prod # Production data (admin + divisions + competition types only)
|
||||
|
||||
# Run specific test suite
|
||||
# Run tests
|
||||
make test # Run all tests
|
||||
make test-watch # Run tests in watch mode
|
||||
make test-coverage # Run tests with coverage report
|
||||
|
||||
# Or use docker compose directly
|
||||
docker compose exec backend npm test
|
||||
docker compose exec backend npm test -- matching-algorithm.test.js
|
||||
|
||||
# Coverage report
|
||||
docker compose exec backend npm run test:coverage
|
||||
|
||||
# Admin CLI
|
||||
make dev-cli # Interactive REPL
|
||||
docker compose exec backend npm run cli -- users:list --limit 20
|
||||
```
|
||||
|
||||
@@ -202,23 +228,32 @@ docker compose exec backend npm run cli -- users:list --limit 20
|
||||
|
||||
```
|
||||
spotlightcam/
|
||||
├── Makefile # Development commands (dev-up, seed-dev, test, etc.)
|
||||
├── docker-compose.yml # Container orchestration (dev + prod profiles)
|
||||
├── nginx/ # Nginx reverse proxy config
|
||||
├── frontend/ # React PWA
|
||||
│ ├── public/content/ # Static markdown content (About Us, How It Works)
|
||||
│ ├── .env.development # Frontend environment variables (dev)
|
||||
│ ├── .env.production # Frontend environment variables (prod)
|
||||
│ ├── public/content/ # Static HTML content (About Us, How It Works, Privacy)
|
||||
│ ├── src/
|
||||
│ │ ├── components/ # React components
|
||||
│ │ │ ├── common/ # TierBadge, Footer, CookieConsent, BetaBanner
|
||||
│ │ │ ├── layout/ # Navbar, Layout, PublicLayout, Footer
|
||||
│ │ │ └── events/ # ParticipantsSidebar with status grouping
|
||||
│ │ ├── pages/ # Application pages (Home, Profile, Contact, 404)
|
||||
│ │ │ └── admin/ # Admin pages (ActivityLogsPage, ContactMessages)
|
||||
│ │ ├── hooks/ # Custom hooks (useWebRTC with Cloudflare TURN)
|
||||
│ │ ├── hooks/ # Custom hooks (useWebRTC, usePageTracking)
|
||||
│ │ ├── contexts/ # AuthContext
|
||||
│ │ ├── services/ # API client, Socket.IO client, WebRTC API
|
||||
│ │ ├── utils/ # Analytics (GA4 integration)
|
||||
│ │ └── constants/ # Status constants
|
||||
│ ├── Dockerfile # Development container
|
||||
│ └── Dockerfile.prod # Production build
|
||||
├── backend/ # Node.js + Express API
|
||||
│ ├── .env.development # Backend environment variables (dev)
|
||||
│ ├── .env.production # Backend environment variables (prod)
|
||||
│ ├── src/
|
||||
│ │ ├── controllers/ # Auth, users, events, WSDC
|
||||
│ │ ├── controllers/ # Auth (with beta auto-tier), users, events, WSDC
|
||||
│ │ ├── routes/ # API routes (events, matches, admin, webrtc, public)
|
||||
│ │ ├── services/ # Matching algorithm, activity logging
|
||||
│ │ ├── middleware/ # Auth, admin access, message validation (spam protection)
|
||||
@@ -226,7 +261,9 @@ spotlightcam/
|
||||
│ │ └── __tests__/ # Jest tests (351 tests, 100% passing)
|
||||
│ ├── prisma/
|
||||
│ │ ├── schema.prisma # Database schema (12 tables)
|
||||
│ │ └── migrations/ # Database migrations
|
||||
│ │ ├── migrations/ # Database migrations
|
||||
│ │ ├── seed.development.js # Development seed (admin + test users + events)
|
||||
│ │ └── seed.production.js # Production seed (admin + basic data only)
|
||||
│ ├── Dockerfile # Development container
|
||||
│ └── Dockerfile.prod # Production build
|
||||
└── docs/ # Documentation
|
||||
@@ -237,6 +274,7 @@ spotlightcam/
|
||||
├── MONITORING.md # Operations & monitoring
|
||||
├── TESTING_MATCHING_RATINGS.md # Comprehensive test documentation
|
||||
├── WEBRTC_TESTING_GUIDE.md # WebRTC testing guide
|
||||
├── GOOGLE_ANALYTICS_SETUP.md # GA4 integration guide
|
||||
└── archive/ # Archived documentation
|
||||
```
|
||||
|
||||
@@ -394,4 +432,4 @@ TBD
|
||||
---
|
||||
|
||||
**Status:** MVP Complete ✅ | 351/351 tests passing (100%) | Production Ready
|
||||
**Last Updated:** 2025-12-05
|
||||
**Last Updated:** 2025-12-06
|
||||
|
||||
Reference in New Issue
Block a user