Phase 10 — Support Ticket System:
- tickets.py router: SLA status (on_track/at_risk/breached/responded), email
notifications on create+reply via background threads, school_name in list,
priority filter, bulk-close endpoint
- tasks/tickets.py: escalate_stale Celery task (48h→high, 72h no reply→urgent)
- worker.py: escalate_stale scheduled every hour
- templates/email/ticket_notification.html: HTML ticket notification email
- TicketsPage.vue: status tabs, SLA badge, priority badge, school name column,
checkbox bulk-close, pagination
- TicketDetailPage.vue: inline priority/status/assignee selectors, SLA timer,
internal note lock icon, closed-ticket guard
Phase 11 — Monthly Report Generation:
- models/report.py: MonthlyReport + SchoolMonthlyStats ORM models
- tasks/reports.py: send_monthly_reports enhanced with SMS stats, attendance
data, invoice summary, stores MonthlyReport record per school per month
Phase 12 — On-Prem Monthly Report Pull:
- tasks/reports.py: pull_monthly_stats task — httpx GET to each school's
hub_base_url, upserts SchoolMonthlyStats; runs 1st at 5am
- worker.py: pull_monthly_stats scheduled 1st at 5am
Phase 13 — Feature Flags + Suspension:
- models/school.py: hub_base_url, feature_overrides (JSON), onboarding_completed_at
- routers/schools.py: PUT /{id}/feature-overrides endpoint
- routers/sync.py: _tier_features() merges school.feature_overrides into poll config
Phase 14 — Onboarding Wizard + Welcome Email:
- tasks/onboarding.py: send_welcome_email Celery task with license key
- routers/schools.py: auto-trigger welcome email on POST /schools,
POST /{id}/activate (status→active + onboarding_completed_at),
POST /{id}/resend-welcome
Phase 15 — UX Polish + Ops Tools:
- routers/search.py: GET /api/search?q= (schools + invoices + tickets, 5 each)
- routers/audit.py: GET /api/audit-logs (paginated, filterable)
- AppLayout.vue: global search bar with debounced dropdown, result navigation
- AuditLogsPage.vue: new page with filter + pagination
- AppSidebar.vue: Audit Logs nav item added
- router/index.ts: /audit-logs route
- api.ts: globalSearch, getAuditLogs, activateSchool, resendWelcomeEmail,
updateFeatureOverrides, bulkCloseTickets
Deployment:
- docker-compose.yml: x-backend-env anchor (DRY), PDF_DIR env var,
seed service (one-shot python seed.py on first boot)
- migrations/003_phases11_15.py: monthly_reports, school_monthly_stats tables
+ schools hub_base_url/feature_overrides/onboarding_completed_at columns
2.8 KiB
2.8 KiB
TapTrack Hub — PAUL State
Current Position
Milestone: v1.0 — Foundation & Core Services Phase: 15 of 15 (ALL PHASES COMPLETE) Plan: All 15 phases complete — ready for deployment testing Status: v1.0 COMPLETE — deploy and test Last activity: 2026-03-16 — Phases 10-15 complete + deployment verified
Loop Position
PLAN ──▶ APPLY ──▶ UNIFY
· · · [No active plan — Phase 10 planning next]
Progress
v1.0 Foundation
- Phase 1 (Project Setup & Infrastructure): [██████████] 100% ✓
- Phase 2 (School Registry + License Mgmt): [██████████] 100% ✓
- Phase 3 (On-Prem License Validation): [██████████] 100% ✓
- Phase 4 (SMS Gateway): [██████████] 100% ✓
- Phase 5 (On-Prem SMS Polling Agent): [██████████] 100% ✓
- Phase 6 (Super Admin Dashboard UI): [██████████] 100% ✓
- Phase 7 (School Admin Portal UI): [██████████] 100% ✓
- Phase 8 (Billing Engine + Invoice PDF): [██████████] 100% ✓
- Phase 9 (Email Dispatcher): [██████████] 100% ✓
- Phase 10 (Support Ticket System): [██████████] 100% ✓
- Phase 11 (Monthly Report Generation): [██████████] 100% ✓
- Phase 12 (On-Prem Monthly Report Pull): [██████████] 100% ✓
- Phase 13 (Feature Flags + Suspension): [██████████] 100% ✓
- Phase 14 (Onboarding Wizard): [██████████] 100% ✓
- Phase 15 (UX Polish + Ops Tools): [██████████] 100% ✓
Next Action
All 15 phases complete. Deploy and test:
docker compose up --build -d
docker compose exec backend python seed.py
Login: admin@taptrack.io / admin123!
Repo
Remote: TBD (new Gitea repo) Branch: master Last commit: feat(phases-10-15): complete v1.0 — tickets/reports/onboarding/feature-flags/audit/search
Tech Stack
- Backend: FastAPI 0.115 + SQLAlchemy 2 async + PostgreSQL 15 + Redis 7
- Worker: Celery 5.4 + celery-beat
- Email: SMTP via smtplib + Jinja2 HTML templates
- SMS: Semaphore PH API (single account, proxied for all schools)
- Frontend: Vue 3.5 + Vite + Pinia + Vue Router + Tailwind CSS 3
- Infra: Docker Compose + Nginx reverse proxy
Architecture Notes
- Two user roles: super_admin (operator) + school_admin (client)
- Two frontend layouts: AppLayout (super admin nav) + PortalLayout (school portal nav)
- SMS flow: on-prem polls /api/sync/poll every 30s → Hub queues/sends via Semaphore
- License flow: on-prem calls /api/licenses/validate on startup + every 6h
- No inbound firewall rules needed — all communication is on-prem → Hub outbound