fix: reopen clears restored_at, wire settings, docs, startup warning

This commit is contained in:
Atharv1705
2026-11-12 17:34:04 +05:30
parent 5027c0766e
commit e2a6fa601e
17 changed files with 292 additions and 36 deletions
+28 -4
View File
@@ -1,6 +1,30 @@
# Implementation Plan
# Poona Hospital AMS — Implementation Plan Summary
Full plan is in docs/. See the user's implementation plan document for the complete specification.
This file will be updated progressively as phases are completed.
**Status:** Phases 0–8 complete, plus Excel exports / bulk import / responsive layout as of commit `22fad38`.
**Current phase:** 0 — Scaffold
For local development, Docker Compose, seeding, and test commands, see [README.md](../README.md).
## Tech Stack
| Layer | Technology |
|---|---|
| Backend API | FastAPI + Pydantic v2 (`Python 3.13`, `uvicorn`) |
| Database & ORM | SQLAlchemy 2.0 (`SQLite` with indexed 19-table schema) |
| Authentication & Security | JWT (`python-jose`), `bcrypt`, 5-role RBAC, sliding-window login rate limiter |
| Background Scheduler | `APScheduler` (`06:00` daily alert evaluation job) |
| Exports & Bulk Import | `openpyxl` (styled `.xlsx` reports & 2-sheet import template), `csv`, SheetJS (`xlsx`) |
| Frontend UI | React 18, TypeScript, Vite, Tailwind CSS, shadcn/ui, TanStack Query & Table, Recharts |
| Packaging & Docs | Docker, Nginx reverse proxy, `docker-compose.yml`, Demo Script & Acceptance Checklist |
| Testing | `pytest` + `httpx` (`ASGITransport`), `Vitest` + React Testing Library |
## Phases Overview (0–8)
- **Phase 0 — Scaffold:** Project layout, FastAPI health endpoint, React + Vite + Tailwind + shadcn/ui shell, Makefile.
- **Phase 1 — Auth, Masters & Settings:** JWT login/me, 5-role RBAC matrix, Admin Master Lists CRUD, typed System Settings, and `seed.py`.
- **Phase 2 — Asset Register & Attachments:** Full Asset CRUD (`409` duplicate check), `AssetPicker`, department scoping, magic-byte validated attachments.
- **Phase 3 — Breakdown & Complaint Lifecycle:** Sequential `complaint_no`, IST response/downtime calculations (`clip_downtime_to_month`), workflow transitions & technical-field locks.
- **Phase 4 — Preventive Maintenance & Calibration:** In-house/outsourced PM table & 7-column calendar views, clamped `add_months`, gated calibration approval & certificates.
- **Phase 5 — Contracts, Warranties, Insurance, Demo & Visits:** Contract renewal chain (`is_superseded`), warranties, insurance drawer, overdue demo equipment, department visit rounds.
- **Phase 6 — Notifications, Alerts & Dashboard:** Daily `APScheduler` 7-type deduplicated alerts, TopBar Demo Clock, calibration login modal, and role-scoped Recharts dashboard.
- **Phase 7 — Operational Reports & Exports:** 8 operational reports with formula transparency, `daily-visit` RBAC, server-side `.xlsx`/`.csv` exports, and A4 `@media print`.
- **Phase 8 — Polish & Packaging:** Global quick search (`/api/search`), Admin audit log viewer (`/api/audit-logs`), DB indexes, login rate limiting, Docker Compose, and demo/acceptance docs.