Back to Dashboard
Architecture Flow src/main.py
How the phone-first participant app, tested service routes, dashboard, API, Redis, PostgreSQL, proxy, extension, and pipeline fit together.
System path
Phone / PWA
/ags onboarding, task UI, help overlay
→
Service route
template target such as Niko or public-service flow
→
Capture layer
proxy, SW proxy, extension, limited, offline
→
FastAPI
participants, sessions, events, help, survey
→
Pipeline
normalise → readiness → governance → adaptation
→
Storage
Redis session state + PostgreSQL evidence
→
Dashboard
monitoring, content, analytics, exports
Component responsibilities
| Component | Owns | Does not own |
|---|---|---|
| Phone/PWA participant app | Onboarding, consent UI, task shell, help display, touch/mobile signals, offline queue. | Study condition assignment or governance decisions. |
| Service route/template | Target-service metadata, schema version, route-specific capture preference, tested route notes such as Niko. | Global readiness logic or participant identity. |
| Proxy/SW proxy | Header rewriting, runtime injection, iframe-compatible capture. | Bypassing in-page anti-frame logic or CAPTCHA checks. |
| Extension | Real-tab capture, overlay, locator guidance, external-site handoff. | Participant enrollment or dashboard access. |
| Tauri desktop shell | Future desktop packaging option for controlled desktop or lab studies. | The default mobile participant path. |
| API | Auth, validation, session lifecycle, persistence, pipeline orchestration. | Hardcoded study changes outside config/templates. |
| Redis | Hot session context, cooldowns, counters, background suppression. | Permanent research record. |
| PostgreSQL | Canonical evidence: users, sessions, events, readiness, governance, adaptations, audit. | Realtime browser capture. |
| Dashboard | Monitoring, config/content administration, exports, audit review. | Participant-facing intervention rendering. |
Boundary rule
Client submits signals, not decisions. The participant app and extension may report what happened. The server computes condition, readiness, governance, adaptation level, and content resolution.