Backend:
- New UserRole.PROJECT_MANAGER with pm_client_ids[] on User model
- New models: Client (slug-based), Team (member_user_ids[]), Project (client-scoped)
- Job model gains project_id field
- New GET/POST/PATCH/DELETE /clients, /clients/{id}/teams, /clients/{id}/projects,
/clients/{id}/pm routes (admin-only client CRUD; PM or admin for teams/projects)
- get_accessible_project_ids() helper: staff→all, PM→their clients' projects,
CLIENT→projects from teams they belong to (with legacy owner fallback)
- list_jobs, get_job, bulk_download, get_vtt_content, delete_job all use new isolation
Frontend:
- UserRole type gains 'project_manager'
- Job, JobCreateRequest gain project_id field
- Client, Team, Project, PMUser types added
- ApiClient: full client/team/project/PM CRUD methods
- useClients hook with all query/mutation hooks
- Admin pages: ClientList + ClientDetail (teams, members, projects, PM assignment)
- NewJob form: client + project picker (shown when clients exist)
- Sidebar: Clients nav item for admin and project_manager roles
- Routes: /admin/clients and /admin/clients/:clientId behind RoleGate
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
47 lines
No EOL
1,015 B
Text
47 lines
No EOL
1,015 B
Text
APP_ENV=dev
|
|
API_BASE_URL=https://api.yourdomain.com
|
|
|
|
# Auth
|
|
JWT_SECRET=change_me
|
|
JWT_ALG=HS256
|
|
JWT_ACCESS_TTL_MIN=240
|
|
JWT_REFRESH_TTL_DAYS=7
|
|
COOKIE_DOMAIN=yourdomain.com
|
|
COOKIE_SECURE=true
|
|
COOKIE_SAMESITE=Lax
|
|
|
|
# MongoDB
|
|
MONGODB_URI=mongodb://localhost:27017/accessible_video
|
|
MONGODB_DB=accessible_video
|
|
|
|
# Redis
|
|
REDIS_URL=redis://localhost:6379/0
|
|
|
|
# Celery (uses Redis)
|
|
CELERY_BROKER_URL=redis://localhost:6379/0
|
|
CELERY_RESULT_BACKEND=redis://localhost:6379/0
|
|
|
|
# GCP
|
|
GCP_PROJECT_ID=...
|
|
GCS_BUCKET=accessible-video
|
|
GOOGLE_APPLICATION_CREDENTIALS=/secrets/gcp.json
|
|
|
|
# AI
|
|
GEMINI_API_KEY=...
|
|
ELEVENLABS_API_KEY=...
|
|
GOOGLE_TTS_CREDENTIALS=/secrets/gcp_tts.json
|
|
|
|
# Email
|
|
SENDGRID_API_KEY=...
|
|
EMAIL_FROM=support@yourdomain.com
|
|
CLIENT_BASE_URL=https://app.yourdomain.com
|
|
|
|
# AI Cost Tracker
|
|
COST_TRACKER_BASE_URL=https://optical-dev.oliver.solutions/cost-tracker/v1
|
|
COST_TRACKER_API_KEY=...
|
|
COST_TRACKER_SOURCE_APP=video-accessibility
|
|
COST_TRACKER_ENABLED=true
|
|
|
|
# Observability
|
|
SENTRY_DSN=...
|
|
OTEL_EXPORTER_OTLP_ENDPOINT=... |