How acero-ad/youcook works
Main Components
a) Client Layer:
• Web Browser Interface
• PWA Components (manifest.json and service-worker.js)
• Hotwire (Turbo and Stimulus.js) for frontend interactivity
b) Application Layer:
• Controllers (RecipesController)
• Command Layer (CreateRecipeCommand)
• Query Layer (SearchRecipesByKeywordQuery)
• Views (ERB templates)
c) Data Layer:
• PostgreSQL Database
• Full-text Search Implementation
• Models (Recipe)
┌─ Client Layer ─────────────────────┐
• Web Browser │
• PWA Components │
• Hotwire (Turbo + Stimulus.js) │
• ┬───────────────────┘
• ↓
┌─ Application Layer ────────────────┐
• ┌─ Controllers ─┐ ┌─ Commands ─┐ │
• Recipes │←→│ - Create │ │
• ┘ └───────────┘ │
• ┌─ Queries ────┐ ┌─ Views ────┐ │
• Search │←→│ - ERB │ │
• ┘ └───────────┘ │
• ┬───────────────────┘
• ↓
┌─ Data Layer ──────────────────────┐
• ┌─ PostgreSQL ─────────────────┐ │
• Full-text Search Index │ │
• Recipe Table │ │
• ┘ │
• ┘
Additional Elements
• Testing Framework (RSpec)
• Development Tools (Devcontainer, Docker)
• CI/CD Pipeline (.github/workflows)
• Deployment (Railway.app)