How fortune-cook1e/iot-smart-parking-system works
Project type & purpose
– This is a full-stack, IoT-enabled Smart Parking System in a pnpm monorepo.
– Components:
• Mobile App (React Native + Expo) for end users
• Admin Dashboard (Next.js) for parking administrators
• Backend API (Express + TypeScript + Prisma + PostgreSQL + Socket.IO + Swagger)
• Shared Schemas (Zod + TypeScript) used across client and server
• AI/ML Service (Python + FastAPI + scikit-learn) for occupancy-prediction
File-structure analysis
– Top-level directories:
• apps/mobile – React Native code, Expo config, Socket.IO client, hooks, services, store
• apps/dashboard – Next.js pages, components (UI library, charts, dialogs), services (REST & SSE), Zustand store
• apps/server – Express app with layered subfolders (config, controllers, routes, services, middleware, utils), Prisma schema, migrations, seed
• packages/shared-schemas – Zod schemas and TS types for DTO validation
• AI-ML – Python scripts for training and a FastAPI service, Dockerfile
– Cross-cutting: Dockerfile, docker-compose.yml/prod, GitHub workflows, workspace config
README insights
– Realtime updates via Socket.IO (server pushes events to mobile & dashboard)
– IoT webhook ingestion: sensors POST occupancy/price updates → server
– Dashboard AI-chat uses Ollama (gpt-oss) over SSE
– Occupancy-probability predictions via Python FastAPI service
– Shared Zod schemas guarantee consistency across all apps