Date: 2025-11-06 Status: Backend + Frontend Deployed, Ready for Testing
Integrated Mission Deck APIs into main backend (no separate service):
- Location:
/home/mind-protocol/scopelock/backend/app/api/mission_deck/ - Routes:
POST /api/auth/login- JWT authenticationGET /api/missions- List all missionsPOST /api/missions- Create new missionPOST /api/chat/message- Send message to RafaelGET /api/dod/:mission_id- Get Definition of Done itemsPUT /api/dod/:mission_id/toggle/:item_id- Toggle DoD item
Environment Variables Set on Render:
FALKORDB_API_KEY- Graph database accessJWT_SECRET- Token signingCORS_ORIGINS- Includes scopelock.mindprotocol.ai
Backend Status:
- ✅ Deployed: https://scopelock.onrender.com
- ✅ Health Check: https://scopelock.onrender.com/health
- ✅ Imports verified: No circular imports, all dependencies installed
Mission Deck frontend is part of main scopelock site:
- Location:
/home/mind-protocol/scopelock/mission-deck-frontend/ - Configuration:
USE_MOCK_DATA = false(line 22 of lib/api.ts) - API Client:
/home/mind-protocol/scopelock/mission-deck-frontend/lib/api.ts
Environment Variable Set in Vercel:
NEXT_PUBLIC_API_URL=https://scopelock.onrender.com- Environments: Production, Preview, Development
Frontend Status:
- ✅ Deployed: https://scopelock.mindprotocol.ai
- ✅ Deployment ID: dpl_Ft1hhXyySzmdL9EK7rDcU3UG5r1E
- ✅ Build Status: READY (completed at 2025-11-06 21:52 UTC)
- ✅ Environment variable: Active in production
URL: https://scopelock.mindprotocol.ai/mission-deck
(Note: If route doesn't exist yet, Mission Deck may be at a different path in the main site)
- Navigate to Mission Deck login page
- Enter credentials:
- Email:
person1@scopelock.ai(or configured test user) - Password: (test password)
- Email:
- Expected: JWT token received, redirected to dashboard
- Verify in DevTools Network tab:
- Request to:
https://scopelock.onrender.com/api/auth/login - Response:
{"access_token": "eyJ..."} - Token stored in localStorage
- Request to:
- After login, view missions page
- Expected: Missions loaded from FalkorDB
- Verify in DevTools Network tab:
- Request to:
https://scopelock.onrender.com/api/missions - Response:
{"missions": [...], "total": N} - NO mock data (check for hardcoded mission IDs)
- Request to:
- Open a mission
- Click "Chat with Rafael"
- Send message: "How do I deploy to Render?"
- Expected: Rafael responds via Claude CLI
- Verify:
- Request to:
https://scopelock.onrender.com/api/chat/message - Response includes
responseandcode_blocks[] - Rafael invoked in background (check backend logs)
- Request to:
- View mission Definition of Done
- Toggle checkbox on/off
- Expected: State persisted to FalkorDB
- Verify:
- Request to:
https://scopelock.onrender.com/api/dod/:mission_id/toggle/:item_id - Response:
{"success": true} - Reload page → checkbox state persists
- Request to:
┌─────────────────────────────────────────────────────────┐
│ Vercel (scopelock.mindprotocol.ai) │
│ │
│ Main ScopeLock Site + Mission Deck Frontend │
│ - NEXT_PUBLIC_API_URL=https://scopelock.onrender.com │
│ - USE_MOCK_DATA = false │
│ - Routes: /mission-deck (?) │
└─────────────────────────────────────────────────────────┘
│
│ HTTPS
▼
┌─────────────────────────────────────────────────────────┐
│ Render (scopelock.onrender.com) │
│ │
│ Main Backend + Mission Deck APIs │
│ - /api/auth/login │
│ - /api/missions │
│ - /api/chat/message │
│ - /api/dod/:mission_id │
│ - CORS: scopelock.mindprotocol.ai allowed │
└─────────────────────────────────────────────────────────┘
│
│ HTTPS
▼
┌─────────────────────────────────────────────────────────┐
│ FalkorDB (mindprotocol.onrender.com) │
│ │
│ Graph Database │
│ - Missions │
│ - DoD Items │
│ - Chat Messages │
└─────────────────────────────────────────────────────────┘
- Error:
cannot import name 'drafts' from partially initialized module 'app.api' - Fix: Removed circular import in
backend/app/api/__init__.py - Status: ✅ Fixed, imports work
- Error:
ValueError: JWT_SECRET environment variable is required - Fix: Removed validation from
auth.py, now usessettings.jwt_secretdirectly - Status: ✅ Fixed, validation only in
config.py
- Error:
AttributeError: module 'app.api.mission_deck.auth' has no attribute 'router' - Fix:
auth.pyhas utility functions only, routers are inmissions.py,chat.py,dod.py - Status: ✅ Fixed, only actual routers imported in
main.py
-
You (Nicolas): Test login flow in browser
- Navigate to Mission Deck
- Verify login connects to backend
- Check missions load from FalkorDB (not mock data)
-
Verify Environment:
- Check browser DevTools Network tab
- Confirm all requests go to
scopelock.onrender.com - Confirm NO requests to
localhost:8000(mock mode)
-
Test Rafael Chat:
- Send message to Rafael
- Verify response is from Claude CLI (not mock)
- Check backend logs for Rafael invocation
After manual testing passes:
@Sofia — Mission Deck ready for pre-delivery QA
Deployment:
- Frontend: https://scopelock.mindprotocol.ai/mission-deck
- Backend: https://scopelock.onrender.com
Test Coverage Needed:
1. Login flow (JWT authentication)
2. Mission list (FalkorDB queries)
3. Rafael chat (Claude CLI integration)
4. DoD toggle (state persistence)
5. Error handling (network failures, invalid tokens)
Acceptance Criteria:
- All backend routes return 200 (authenticated)
- No mock data visible in responses
- Rafael responds with real code (not mock)
- DoD state persists across page reloads
- Proper error messages on failures
Documentation:
- See: /home/mind-protocol/scopelock/MISSION_DECK_INTEGRATION_COMPLETE.md
Please verify and report any issues.
backend/app/api/mission_deck/
├── __init__.py
├── auth.py # JWT utilities
├── dependencies.py # FastAPI auth dependency
├── schemas.py # Pydantic models
├── missions.py # Mission CRUD router
├── chat.py # Rafael chat router
├── dod.py # DoD toggle router
└── services/
├── graph.py # FalkorDB integration
└── rafael_cli.py # Claude CLI integration
backend/requirements.txt # Added: python-jose, passlib, email-validator
backend/app/config.py # Added: Mission Deck env vars
backend/app/main.py # Added: Mission Deck routers
backend/app/api/__init__.py # Fixed: Removed circular imports
mission-deck-frontend/lib/api.ts # USE_MOCK_DATA = false
mission-deck-frontend/.env.local # NEXT_PUBLIC_API_URL set
/home/mind-protocol/scopelock/MISSION_DECK_INTEGRATION_COMPLETE.md (this file)
/home/mind-protocol/scopelock/HANDOFF_VERCEL_INTEGRATION.md (previous)
/home/mind-protocol/scopelock/citizens/SYNC.md (updated)
Latest commit: 3fbd0df7c6093313bbe705abc1995773fdcd280e
commit 3fbd0df7c6093313bbe705abc1995773fdcd280e
Author: nlr-ai <reynolds.nicorr@gmail.com>
Date: Wed Nov 6 21:51:36 2025 +0000
chore: trigger Vercel redeploy with NEXT_PUBLIC_API_URL env var
Environment variable set in Vercel dashboard:
- NEXT_PUBLIC_API_URL=https://scopelock.onrender.com
Mission Deck frontend will now connect to real backend APIs.
rafael@scopelock
Previous key commits:
c3615ea- Integrated Mission Deck into main backendf6b13c4- Added Vercel auto-fix webhook to main backend263aaeb- Initial Mission Deck backend integration
✅ Backend deployed: https://scopelock.onrender.com (Mission Deck APIs integrated) ✅ Frontend deployed: https://scopelock.mindprotocol.ai (NEXT_PUBLIC_API_URL configured) ✅ Environment variables: Set in Vercel dashboard + Render dashboard ✅ Mock data disabled: Frontend connects to real backend ✅ CORS configured: Backend allows requests from frontend domain
Status: Integration complete, ready for manual testing + QA.
Next: Test in browser → Verify real data loads → Hand off to Sofia
rafael@scopelock