# moesiomarcelino/pass-in architecture

> Architecture diagram of the GitHub repository moesiomarcelino/pass-in, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/moesiomarcelino/pass-in
- Repository: https://github.com/moesiomarcelino/pass-in

## Overview

##### Project type and purpose
- This is a full-stack web application monorepo (“Pass.in Monorepo”) managed by Turborepo.
- It consists of two primary packages:
- packages/web – a React+TypeScript frontend (Vite + TailwindCSS) that provides an event check-in UI.
- packages/server – a Node.js/TypeScript HTTP API (using Prisma/SQLite) that exposes REST endpoints for creating events, registering attendees, and checking in.

##### File structure
- Top-level:
- turbo.json / package.json / node-modules – Turborepo orchestrator & shared dev dependencies.
- tailwind.config.js, metro.config.js – shared build configs.
- packages/web:
- src/app.tsx, main.tsx – React entrypoints.
- components/… – UI building blocks (tables, buttons, header).
- mocks – local fake data for development.
- vite.config.ts & tsconfig.json – build and type configs.
- packages/server:
- src/server.ts – HTTP server bootstrap.
- src/routes/… – REST handlers (create-event, register-for-event, check-in, get-event-attendees, etc.).
- src/lib/prisma.ts – Prisma client.
- prisma/schema.prisma & migrations – database schema and migration history.

##### README for additional insights
- Describes the mono repo structure, how to install and run both packages in dev.
- Mentions features: Web React.JS package, Server Node.JS package.
- Deployment status: Netlify badge suggests front-end is deployed on Netlify.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% External Entities
    Developer["Developer"]:::external
    GitHub["GitHub (Repo)"]:::external
    Netlify["Netlify CDN"]:::external
    Browser["Browser"]:::external

    %% Monorepo Root
    subgraph "Pass.in Monorepo" 
        direction TB
        Turborepo["Turborepo Orchestrator"]:::tool
        SharedConfigs["Shared Build Configs"]:::tool

        subgraph "Frontend (React + Vite)" 
            direction TB
            WebDir["/packages/web"]:::frontend
            MainTSX["main.tsx"]:::frontend
            AppTSX["app.tsx"]:::frontend
            Components["components/…"]:::frontend
            Mocks["mocks/…"]:::frontend
            ViteConfig["vite.config.ts"]:::frontend
            WebTailwind["tailwind.config.js"]:::frontend
            WebTsConfig["tsconfig.json"]:::frontend
            WebTsNodeConfig["tsconfig.node.json"]:::frontend
        end

        subgraph "Backend API (Node.js + Prisma)" 
            direction TB
            ServerDir["/packages/server"]:::backend
            ServerBootstrap["src/server.ts"]:::backend
            Routes["src/routes/…"]:::backend
            ErrorHandler["error-handler.ts"]:::backend
            PrismaClient["lib/prisma.ts"]:::backend
            Utils["utils/…"]:::backend
            ApiSamples["api.http"]:::backend
            ServerTsConfig["tsconfig.json"]:::backend

            subgraph "Prisma Schema & Migrations"
                direction TB
                Schema["schema.prisma"]:::db
                Migrations["migrations/…"]:::db
                DevDB["dev.db"]:::db
                Seed["seed.ts"]:::db
            end
        end
    end

    %% Runtime Flow
    Browser -->|"loads JS bundle"| Netlify
    Netlify -->|"serves static files"| Browser
    Browser -->|"HTTP requests (REST)"| ServerBootstrap
    ServerBootstrap -->|"uses Prisma Client"| PrismaClient
    PrismaClient -->|"queries/mutates"| DevDB

    %% CI/CD Flow
    Developer -->|"push code"| GitHub
    GitHub -->|"run pipelines"| Turborepo
    Turborepo -->|"build web"| ViteConfig
    Turborepo -->|"build server"| ServerBootstrap
    Turborepo -->|"deploy frontend"| Netlify

    %% Click Events
    click Turborepo "https://github.com/moesiomarcelino/pass-in/blob/master//turbo.json"
    click Turborepo "https://github.com/moesiomarcelino/pass-in/blob/master//package.json"
    click SharedConfigs "https://github.com/moesiomarcelino/pass-in/blob/master//tailwind.config.js"
    click SharedConfigs "https://github.com/moesiomarcelino/pass-in/blob/master//metro.config.js"
    click WebDir "https://github.com/moesiomarcelino/pass-in/tree/master//packages/web"
    click MainTSX "https://github.com/moesiomarcelino/pass-in/blob/master//packages/web/src/main.tsx"
    click AppTSX "https://github.com/moesiomarcelino/pass-in/blob/master//packages/web/src/app.tsx"
    click Components "https://github.com/moesiomarcelino/pass-in/tree/master//packages/web/src/components"
    click Mocks "https://github.com/moesiomarcelino/pass-in/tree/master//packages/web/src/mocks"
    click ViteConfig "https://github.com/moesiomarcelino/pass-in/blob/master//packages/web/vite.config.ts"
    click WebTailwind "https://github.com/moesiomarcelino/pass-in/blob/master//packages/web/tailwind.config.js"
    click WebTsConfig "https://github.com/moesiomarcelino/pass-in/blob/master//packages/web/tsconfig.json"
    click WebTsNodeConfig "https://github.com/moesiomarcelino/pass-in/blob/master//packages/web/tsconfig.node.json"
    click ServerDir "https://github.com/moesiomarcelino/pass-in/tree/master//packages/server"
    click ServerBootstrap "https://github.com/moesiomarcelino/pass-in/blob/master//packages/server/src/server.ts"
    click Routes "https://github.com/moesiomarcelino/pass-in/tree/master//packages/server/src/routes"
    click ErrorHandler "https://github.com/moesiomarcelino/pass-in/blob/master//packages/server/src/error-handler.ts"
    click PrismaClient "https://github.com/moesiomarcelino/pass-in/blob/master//packages/server/src/lib/prisma.ts"
    click Utils "https://github.com/moesiomarcelino/pass-in/tree/master//packages/server/src/utils"
    click ApiSamples "https://github.com/moesiomarcelino/pass-in/blob/master//packages/server/api.http"
    click ServerTsConfig "https://github.com/moesiomarcelino/pass-in/blob/master//packages/server/tsconfig.json"
    click Schema "https://github.com/moesiomarcelino/pass-in/blob/master//packages/server/prisma/schema.prisma"
    click Migrations "https://github.com/moesiomarcelino/pass-in/tree/master//packages/server/prisma/migrations"
    click DevDB "https://github.com/moesiomarcelino/pass-in/blob/master//packages/server/prisma/dev.db"
    click Seed "https://github.com/moesiomarcelino/pass-in/blob/master//packages/server/prisma/seed.ts"
    click READMERoot "https://github.com/moesiomarcelino/pass-in/blob/master//README.md"
    click READMEServer "https://github.com/moesiomarcelino/pass-in/blob/master//packages/server/README.md"
    click READMEWeb "https://github.com/moesiomarcelino/pass-in/blob/master//packages/web/README.md"

    %% Styles
    classDef external fill:#f9f,stroke:#333,stroke-width:1px
    classDef tool fill:#bbf,stroke:#333,stroke-width:1px
    classDef frontend fill:#bfb,stroke:#333,stroke-width:1px
    classDef backend fill:#fbf,stroke:#333,stroke-width:1px
    classDef db fill:#ffb,stroke:#333,stroke-width:1px,stroke-dasharray: 5 5
```
