How dorkrawk/coparent works
Project type and purpose
• This is a full-stack web application (“Coparent”) consisting of:
• A React/TypeScript single-page application (SPA) frontend
• A Ruby (Sinatra-style) micro-service backend
• A SQLite database for persistence
• An external OpenWeather API integration
File structure
• Top-level directories:
• /frontend – Vite + React + TypeScript code, ESLint config, public assets
• /backend – Ruby app (app.rb, config.ru), ORM models, ERB views, DB setup
• Key files and patterns:
• backend/app.rb + config.ru → Sinatra entry points
• backend/models/*.rb → ActiveRecord or Sequel model layer (Kid, Task, Reward, Routine, RoutineTask, OpenWeatherApi)
• backend/db/*.rb → migrations, seed, config for SQLite (database.db)
• backend/views/*.erb → server-side templates for any server-rendered pages (although the SPA likely handles most rendering)
• frontend/src/pages + components → React component hierarchy, pages (Home, Routine)
• frontend/vite.config.ts + tsconfig → build & dev setup
README for additional insights
• Confirms simple dev commands:
• npm run dev → starts Vite dev server on the SPA
• ruby app.rb or shotgun app.rb → runs the backend on e.g. localhost:4567
• No explicit hosted deployment or cloud services; assume typical Node/Vite hosting for static assets and Ruby hosting for API