Files
rail-game/TODO.md
zwitschi 615b63ba76
Some checks failed
Backend CI / lint-and-test (push) Failing after 37s
Add unit tests for station service and enhance documentation
- Introduced unit tests for the station service, covering creation, updating, and archiving of stations.
- Added detailed building block view documentation outlining the architecture of the Rail Game system.
- Created runtime view documentation illustrating key user interactions and system behavior.
- Developed concepts documentation detailing domain models, architectural patterns, and security considerations.
- Updated architecture documentation to reference new detailed sections for building block and runtime views.
2025-10-11 18:52:25 +02:00

5.0 KiB
Raw Blame History

Development TODO Plan

Phase 1 Project Foundations

  • Initialize Git hooks, linting, and formatting tooling (ESLint, Prettier, isort, black).
  • Configure pyproject.toml or equivalent for backend dependency management.
  • Scaffold FastAPI application entrypoint with health-check endpoint.
  • Bootstrap React app with Vite/CRA, including routing skeleton and global state provider.
  • Define shared TypeScript/Python models for core domain entities (tracks, stations, trains).
  • Set up CI workflow for linting and test automation (GitHub Actions).

Phase 2 Core Features

  • Implement authentication flow (backend JWT, frontend login/register forms).
  • Build map visualization integrating Leaflet with OSM tiles.
  • Define geographic bounding boxes and filtering rules for importing real-world stations from OpenStreetMap.
  • Implement an import script/CLI that pulls OSM station data and normalizes it to the PostGIS schema.
  • Expose backend CRUD endpoints for stations (create, update, archive) with validation and geometry handling.
  • Build React map tooling for selecting a station.
  • Build tools for station editing, including form validation.
  • Define track selection criteria and tagging rules for harvesting OSM rail segments within target regions.
  • Extend the importer to load track geometries and associate them with existing stations.
  • Implement backend track-management APIs with length/speed validation and topology checks.
  • Create a frontend track-drawing workflow (polyline editor, snapping to stations, undo/redo).
  • Design train connection manager requirements (link trains to operating tracks, manage consist data).
  • Implement backend services and APIs to attach trains to routes and update assignments.
  • Add UI flows for managing train connections, including visual feedback on the map.
  • Establish train scheduling service with validation rules, conflict detection, and persistence APIs.
  • Provide frontend scheduling tools (timeline or table view) for creating and editing train timetables.
  • Develop frontend dashboards for resources, schedules, and achievements.
  • Add real-time simulation updates (WebSocket layer, frontend subscription hooks).

Phase 3 Data & Persistence

  • Design PostgreSQL/PostGIS schema and migrations (Alembic or similar).
  • Implement data access layer with SQLAlchemy and repository abstractions.
  • Decide on canonical fixture scope (demo geography, sample trains) and document expected dataset size.
  • Author fixture generation scripts that export JSON/GeoJSON compatible with the repository layer.
  • Create ingestion utilities to load fixtures into local and CI databases.
  • Provision a Redis instance/container for local development.
  • Add caching abstractions in backend services (e.g., network snapshot, map layers).
  • Implement cache invalidation hooks tied to repository mutations.

Phase 4 Testing & Quality

  • Write unit tests for backend services and models.
  • Configure Jest/RTL testing utilities and shared mocks for Leaflet and network APIs.
  • Write component tests for map controls, station builder UI, and dashboards.
  • Add integration tests for custom hooks (network snapshot, scheduling forms).
  • Stand up Playwright/Cypress project structure with authentication helpers.
  • Script login end-to-end flow (Playwright).
  • Script station creation end-to-end flow.
  • Script track placement end-to-end flow.
  • Script scheduling end-to-end flow.
  • Define load/performance targets (requests per second, simulation latency) and tooling.
  • Implement performance test harness covering scheduling and real-time updates.

Phase 5 Deployment & Ops

  • Create Dockerfile for frontend.
  • Create Dockerfile for backend.
  • Create docker-compose for local development with Postgres/Redis dependencies.
  • Add task runner commands to orchestrate container workflows.
  • Set up CI/CD pipeline for automated builds, tests, and container publishing.
  • Provision infrastructure scripts (Terraform/Ansible) targeting initial cloud environment.
  • Define environment configuration strategy (secrets management, config maps).
  • Configure observability stack (logging, metrics, tracing).
  • Integrate tracing/logging exporters into backend services.
  • Document deployment pipeline and release process.

Phase 6 Polish & Expansion

  • Add leaderboards and achievements logic with UI integration.
  • Design data model changes required for achievements and ranking.
  • Implement accessibility audit fixes (WCAG compliance).
  • Conduct accessibility audit (contrast, keyboard navigation, screen reader paths).
  • Optimize asset loading and introduce lazy loading strategies.
  • Establish performance budgets for bundle size and render times.
  • Evaluate multiplayer/coop roadmap and spike POCs where feasible.
  • Prototype networking approach (WebRTC/WebSocket) for cooperative sessions.