How urigo/whatsapp-clone-tutorial works
Project Type and Purpose
• This is a full-stack tutorial repository (“WhatsApp Clone Tutorial”) that walks learners through building a hybrid web/mobile chat app.
• It comprises three concerns:
• A React-based client (with Hooks, Suspense, Styled-Components, Material-UI, TypeScript, Apollo Client)
• A Node.js GraphQL server (Apollo Server, GraphQL Modules, PostgreSQL, REST fallback)
• A documentation engine (.tortilla) that generates step-by-step Markdown manuals from templates and views
File Structure
• Top-level directories:
· .gitmodules → client and server submodules
· .tortilla/manuals → templates (.tmpl) + view files (.md) for tutorial generation
· assets/ → screenshots and media per tutorial step
· client/ → React front-end project
· server/ → GraphQL back-end project
· package.json → root orchestration (likely installs .tortilla CLI, builds docs)
• Look inside client/ and server/ for standard project layouts (src/, public/, schema/, modules/, etc.) indicating separation of UI, business logic, schema definitions, and database layers.
README for Additional Insights
• The tutorial evolves through 17+ steps, introducing features in sequence: basic React, styling, REST, GraphQL, testing, routing, caching, mutations, subscriptions, authentication, PostgreSQL, REST APIs, modularity, performance, etc.
• Key technologies: React, Styled-Components, Material-UI, TypeScript, Apollo GraphQL, GraphQL Code Generator, GraphQL Inspector, PostgreSQL.
• The goal is not only to build a chat app but to demonstrate best practices, migrations, and ecosystem alignment.
a. Main Components
• User Interface (Browser/Mobile)
• React Client
• UI Library (Material-UI + Styled-Components)
• Apollo Client (Queries, Mutations, Subscriptions, Cache)
• Generated TS Types (GraphQL Code Generator)
• API Layer
• Apollo Server (HTTP + WebSocket gateway)
• GraphQL Modules (schema + resolver organization)
• Optional REST endpoints
• Database
• PostgreSQL for persistence
• Dev/Docs Pipeline
• .tortilla engine (Markdown template → tutorial pages)
b. Relationships and Data Flows
• Client → Server via GraphQL HTTP (Queries/Mutations)
• Server → Client via WebSocket (Subscriptions)
• Server → Database via SQL drivers
• Codegen tool reads GraphQL schema and emits TypeScript definitions for both client and server
c. Architectural Patterns / Design Principles
• Client-Server decoupling
• Schema-first GraphQL design
• Modular back-end via GraphQL Modules
• Incremental feature layering (reflecting tutorial steps)
• Type safety across boundaries with generated types
d. Key Technologies to Annotate
• React, React Hooks, Suspense
• Styled-Components, Material-UI
• Apollo Client, Apollo Server
• GraphQL Modules, GraphQL Code Generator, GraphQL Inspector
• PostgreSQL
• Node.js