How danielsrs/slaps_and_kisses works
Project type and purpose
• This is a full-stack, multi-package monorepo (managed via Yarn workspaces) for an electric-car charging application.
• apps/car: A React-based client (likely React Native or React Web) that provides pages for user registration, station reservation, charging sessions, and recommendations.
• apps/server: A TypeScript/Node.js HTTP API (Express-style router) that handles car and station registration, session start/end, reservations, payments, and station suggestions using an in-memory data store and schema validation.
• apps/shared: A library of shared React components, utility functions, API-client code, storage adapters, and a TCP/MQTT helper that’s consumed by apps/car.
• docker-compose.yml + mosquitto/: Defines a local MQTT broker (Mosquitto) and server container for real-time messaging around charging events.
File structure
• Top-level folders:
• apps/car – client UI code (Pages/, components/, navigation, Redux-style store).
• apps/server – backend code (routes/, schemas/, utils/, server entrypoints, Dockerfile).
• apps/shared – shared UI components, API client, storage and TCP/MQTT libs, TS configs.
• Configuration and orchestration:
• docker-compose.yml – brings up the server and Mosquitto broker.
• tsconfig.* and package.json workspaces – unify build and type checking across all packages.
• scripts/ – lint, format, and type-check workflows.
Extract additional insights from the README
• The README is minimal (“slaps_and_kisses”) but the CONTRIBUTING.md explains TypeScript setup across the monorepo.
Essential elements
• Don’t overcomplicate with every single file—focus on the three logical modules (car, server, shared) plus the MQTT broker.
• Data persistence layers or storage only if they’re external; here the backend uses in-memory data and the client uses local file storage.
• Both synchronous (HTTP) and asynchronous (MQTT) flows.