FixFlow is an AI-assisted campus issue reporting and resolution platform for students, admins, and staff members, moving issues across the strict lifecycle: REPORT → CLASSIFY → PRIORITIZE → ASSIGN → RESOLVE.
- Purpose: Centralize campus infrastructure complaints into an actionable, tracked, and measurable resolution workflow.
- Roles: Students (report, track, support duplicates), Admins (triage, prioritize, assign, view analytics), and Staff (task queue, progress updates).
- Core Lifecycle: Strict status transitions (
Open → Assigned → In Progress → Resolved) with immutablestatus_historylogging. - AI Capabilities: Amazon Bedrock (via Converse API) suggests category, priority (Low/Med/High/Critical), and smart summary, with a robust rule-based fallback.
- Key Innovation: Duplicate Issue Detection (location + category + description scoring) lets students "Support" existing issues rather than filing duplicates.
- Backend: Python 3.12 + FastAPI + SQLAlchemy 2.x + PyMySQL + JWT/bcrypt security.
- Frontend: Vanilla HTML5, CSS3, and ES6 JavaScript (Chart.js via CDN for analytics; no heavy JS frameworks).
- Storage: Configurable local disk (
backend/uploads/) or private AWS S3 with pre-signed GET URLs. - Zero-AWS Local Execution: Runs completely locally with local storage and rule-based AI; switches to AWS (S3, RDS, Bedrock, EC2) via
.env. - Data Integrity: Fully seeded MySQL database with realistic demo issues, analytics history, and duplicate test pairs.
| Phase | Description | Deliverables | Verification Step |
|---|---|---|---|
| Phase 1 | Foundation | Folder structure, config.py, database.py, models.py, schema.sql, seed.sql/seed.py, main.py serving static files & /docs |
App boots and connects to MySQL; /api/health returns 200 OK |
| Phase 2 | Auth & Roles | Register, login, /api/auth/me, JWT verification, role guards, frontend auth forms & redirection |
Seeded accounts (student, admin, staff) login and redirect to respective dashboards |
| Phase 3 | Student Flow | Multi-step report form, photo upload, POST /api/issues, GET /api/issues/mine, detail view |
Student submits issue with photo and sees it in My Reports as Open |
| Phase 4 | Admin & Staff Flow | Live dashboard stat cards, issue filters, assign to staff, status updates (status_history), staff task queue |
Moving Open → Assigned → In Progress → Resolved updates timeline in real-time |
| Phase 5 | AWS Integration | Switchable S3 storage service with pre-signed URLs, RDS env support, EC2 deployment guide | Switching STORAGE_BACKEND=s3 loads photo via S3 pre-signed URL |
| Phase 6 | AI & Duplicate Detection | /api/ai/suggest (Bedrock + keyword fallback), duplicate detection candidate filter & scoring, "Support this issue" |
"Projector broken" in Room 204 suggests Equipment/High; 2nd report triggers duplicate modal |
| Phase 7 | Analytics & Polish | Analytics APIs, Chart.js visualizations (category, block, trend, hotspots, heatmap), comments, UI polish | Analytics page displays charts, heatmap, and average resolution time accurately |
| Phase 8 | Docs & Demo Prep | Demo script (docs/demo-script.md), README verification, pytest test suite |
All acceptance checklist items verified; automated tests pass |
- Create
requirements.txtwith required dependencies. - Setup Python 3.12 virtual environment
venv/. - Create
.env.exampleand local.env. - Create
database/schema.sqldefining all 6 relational tables with indexes and foreign keys. - Create
backend/seed.pyanddatabase/seed.sqlwith demo users (admin, staff, students) and 20+ realistic issues. - Setup
fixflowdatabase in local MySQL Server 8.0 with dedicated userfixflow_user. - Create
backend/app/config.pyusingpydantic-settings. - Create
backend/app/database.pywith SQLAlchemy engine,SessionLocal, and DB connection check. - Create
backend/app/models.pywith SQLAlchemy 2.0 ORM mappings. - Create
backend/app/main.pywith FastAPI, CORS, static file serving, and/api/health. - Create minimal placeholder
frontend/index.htmlandfrontend/css/styles.cssto verify static file serving.
- Create DB and run schema + seed scripts.
- Run
uvicorn backend.app.main:app --port 8000. - Verify
GET http://localhost:8000/api/healthreturns{"status": "ok", "database": "connected"}. - Verify
http://localhost:8000/docsloads Swagger UI. - Verify
http://localhost:8000/serves the frontend foundation.