How coffree0123/tsmc-quick-parking works
Project Type and Purpose
• This is a full-stack, web-based “quick parking” management system.
• Frontend: a React + TypeScript single-page application (served via Nginx).
• Backend: a Python (FastAPI) service with routers for users, vehicles, parking lots, parking sessions, and a dashboard.
• Data store: a relational database provisioned via Docker-Compose (SQL scripts for initialization and sample data).
• CI/CD: GitHub Actions triggers automatic deployment to Azure (static site for frontend, container for backend).
File Structure Analysis
A. Top-level
• .github/workflows: CI/CD pipelines for linting, building, delivering both frontend and backend.
• backend/: FastAPI service, Dockerfiles, Docker-Compose, SQL scripts, entrypoint scripts, src/ routers, utils, tests.
• frontend/: React app scaffolded via Create React App, tsconfig, ESLint, Nginx config, Dockerfile, package manifests, src/ components, pages, utils.
B. Backend micro-services style
• Modules under src/: users, vehicles, parkinglots, parking, dashboard.
• Constants, security, database connection, scripts to seed or clear records.
• docker-compose.yml orchestrates app + database containers.
C. Frontend
• Auth integration (authConfig.ts, AuthContext)
• Pages: Home, Dashboard, Parking Lot list/detail, Settings, Vehicle.
• Shared UI components, API wrapper (utils/api.ts), CSS styles, tests.
D. Deployment
• Dockerfiles for production (backend/Dockerfile.prod, frontend/Dockerfile + Nginx).
• GitHub Actions workflows for build/test and push to Azure.
Details to Capture
• The Docker-Compose service definitions (app, db)
• SQL init and seed steps in the database lifecycle
• Frontend’s Nginx reverse proxy to the SPA
• AuthContext → FastAPI’s security layer (JWT verification)
• Git branches & workflows triggering builds and deployments to Azure