Files
TapTrack-Hub/.paul/STATE.md
kevin-asprec 73a17aaf9a feat(phase-1): TapTrack Hub initial scaffold
Full project scaffold for TapTrack Hub — cloud SaaS control plane
for managing on-prem TapTrack school deployments.

## Infrastructure
- Docker Compose: backend (gunicorn+uvicorn), Celery worker + beat,
  frontend (Vite build + nginx), PostgreSQL 15, Redis 7, nginx proxy
- Dockerfile for backend and frontend, nginx reverse proxy config

## Backend (FastAPI + SQLAlchemy async + Celery)
Database schema (10 tables):
  hub_users, schools, licenses, sms_jobs, sms_credit_ledger,
  invoices, invoice_line_items, school_subscriptions,
  support_tickets, ticket_replies, audit_logs, announcements

Auth: JWT (python-jose) + bcrypt + role-based FastAPI dependencies
  (get_current_user, require_super_admin, require_school_admin)

Routers (11): auth, schools, licenses, sms, billing, tickets,
  users, dashboard, school_portal, announcements, sync

Celery tasks (6):
  sms.process_queue, billing.generate_monthly_invoices,
  billing.send_invoice_email, billing.check_overdue,
  license.check_expiry, reports.send_monthly_reports

Services: SMTP email helper (smtplib + Jinja2)
Seed script: creates super admin admin@taptrack.io

## Frontend (Vue 3 + Vite + Pinia + Tailwind CSS)
Router: 14 routes across super admin + school portal layouts
Stores: Pinia auth store with localStorage persistence
API client: full axios client for all backend endpoints
Layouts: AppLayout (super admin), PortalLayout (school), AuthLayout
Components: AppSidebar, PortalSidebar, SidebarItem, KpiCard,
  StatusBadge, ToastStack
Pages: Login, Dashboard, Schools, SchoolDetail, Licenses, SMS,
  Billing, Tickets, TicketDetail, Users, Announcements, 404
Portal pages: Overview, Billing, SMS Reports, Tickets, Profile

## PAUL Planning Files
- .paul/ROADMAP.md: full 15-phase roadmap with detailed scope
- .paul/STATE.md: current position, tech stack, architecture notes
- .paul/phases/01-setup/01-PLAN.md: complete Phase 1 plan (done)
- .paul/phases/02 through 15: README stubs for all future phases
2026-03-16 07:26:06 +08:00

65 lines
2.8 KiB
Markdown

# TapTrack Hub — PAUL State
## Current Position
Milestone: v1.0 — Foundation & Core Services
Phase: 1 of 15 (Project Setup & Infrastructure — complete)
Plan: Phase 1 complete — no active plan
Status: **Phase 1 applied — ready to begin Phase 2**
Last activity: 2026-03-15 — Phase 1 complete (full stack scaffold: Docker Compose, all backend models/routers/tasks, Vue 3 frontend skeleton with all page stubs)
## Loop Position
```
PLAN ──▶ APPLY ──▶ UNIFY
· · · [No active plan — Phase 2 planning next]
```
## Progress
### v1.0 Foundation
- Phase 1 (Project Setup & Infrastructure): [██████████] 100% ✓
- Phase 2 (School Registry + License Mgmt): [░░░░░░░░░░] 0%
- Phase 3 (On-Prem License Validation): [░░░░░░░░░░] 0%
- Phase 4 (SMS Gateway): [░░░░░░░░░░] 0%
- Phase 5 (On-Prem SMS Polling Agent): [░░░░░░░░░░] 0%
- Phase 6 (Super Admin Dashboard UI): [░░░░░░░░░░] 0%
- Phase 7 (School Admin Portal UI): [░░░░░░░░░░] 0%
- Phase 8 (Billing Engine + Invoice PDF): [░░░░░░░░░░] 0%
- Phase 9 (Email Dispatcher): [░░░░░░░░░░] 0%
- Phase 10 (Support Ticket System): [░░░░░░░░░░] 0%
- Phase 11 (Monthly Report Generation): [░░░░░░░░░░] 0%
- Phase 12 (On-Prem Monthly Report Pull): [░░░░░░░░░░] 0%
- Phase 13 (Feature Flags + Suspension): [░░░░░░░░░░] 0%
- Phase 14 (Onboarding Wizard): [░░░░░░░░░░] 0%
- Phase 15 (UX Polish + Ops Tools): [░░░░░░░░░░] 0%
## Next Action
Run: `/paul:plan` for Phase 2 — School Registry + License Management
Resume file: .paul/ROADMAP.md → Phase 2
## Repo
Remote: TBD (new Gitea repo)
Branch: master
Last commit: initial scaffold
## 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