# Development TODO Plan ## Phase 1 – Project Foundations - [x] Initialize Git hooks, linting, and formatting tooling (ESLint, Prettier, isort, black). - [x] Configure `pyproject.toml` or equivalent for backend dependency management. - [x] Scaffold FastAPI application entrypoint with health-check endpoint. - [x] Bootstrap React app with Vite/CRA, including routing skeleton and global state provider. - [x] Define shared TypeScript/Python models for core domain entities (tracks, stations, trains). - [x] Set up CI workflow for linting and test automation (GitHub Actions). ## Phase 2 – Core Features - [x] Implement authentication flow (backend JWT, frontend login/register forms). - [x] Build map visualization integrating Leaflet with OSM tiles. - [ ] Create railway builder tools (track placement, station creation) with backend persistence APIs. - [ ] Establish train scheduling service with validation rules and API endpoints. - [ ] Develop frontend dashboards for resources, schedules, and achievements. - [ ] Add real-time simulation updates (WebSocket layer, frontend subscription hooks). ## Phase 3 – Data & Persistence - [x] Design PostgreSQL/PostGIS schema and migrations (Alembic or similar). - [ ] Implement data access layer with SQLAlchemy and repository abstractions. - [ ] Seed initial data fixtures for development/demo purposes. - [ ] Integrate caching strategy (Redis) for map tiles and frequent queries. ## Phase 4 – Testing & Quality - [ ] Write unit tests for backend services and models. - [ ] Add frontend component and hook tests (Jest + React Testing Library). - [ ] Implement end-to-end test suite (Playwright/Cypress) covering critical flows. - [ ] Set up load/performance testing harness for scheduling and simulation. ## Phase 5 – Deployment & Ops - [ ] Create Dockerfiles for frontend and backend, plus docker-compose for local dev. - [ ] Provision infrastructure scripts (Terraform/Ansible) targeting initial cloud environment. - [ ] Configure observability stack (logging, metrics, tracing). - [ ] Document deployment pipeline and release process. ## Phase 6 – Polish & Expansion - [ ] Add leaderboards and achievements logic with UI integration. - [ ] Implement accessibility audit fixes (WCAG compliance). - [ ] Optimize asset loading and introduce lazy loading strategies. - [ ] Evaluate multiplayer/coop roadmap and spike POCs where feasible.