# johannesbremer/praxisplaner architecture

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

- Interactive diagram: https://gitdiagram.com/johannesbremer/praxisplaner
- Repository: https://github.com/johannesbremer/praxisplaner

## Overview

##### Project Type & Purpose
- From the file tree, we see a React/TypeScript front-end (components/, src/) with SSR (src/ssr.tsx), a Convex backend (convex/), GitHub CI workflows, and static assets (public/).
- This is a full-stack application (“Praxisplaner”) using a component-based UI library, server-side rendering, and a serverless database/backend (Convex).

##### File Structure Highlights
- components/ui: Reusable UI building blocks (buttons, dialogs, cards, etc.).
- src/
- client.tsx: Client bootstrap for CSR.
- ssr.tsx: Entry for server-side rendering.
- router.tsx + src/routes: Route definitions & pages.
- src/db/schema.ts: Local type definitions mirroring your data model.
- convex/: Serverless functions & schema delivering real-time data, user preferences, logs.
- CI/CD: .github/workflows CI, code scanning.

##### Key Architecture Components
a. Frontend UI Layer
- Browser executes client bundle (React components, router).
- SSR server pre-renders pages on request (using ssr.tsx).
b. Server-Side Render Engine
- Node.js server (or adapter) invokes React SSR entry, serves HTML + initial data.
c. Convex Backend
- Serverless functions (gdtFiles, gdtPreferences, permissionLogs) implement business logic.
- Convex-managed database stores schema.ts data models.
- Real-time subscriptions push updates to client.
d. Static Asset Hosting
- public/ files served via CDN or static server.
e. CI/CD Pipeline
- GitHub Actions build, lint (eslint, prettier), test, and deploy both front and back.

a. Components & Boundaries
- Client Browser (UI Components)
- SSR Server (ssr.tsx entry)
- Convex API Gateway
- Convex Functions & Database
- Static Asset Host/CDN
- GitHub CI/CD
b. Interactions & Data Flow
1. Browser → SSR Server: HTTP GET page → server-rendered HTML + JS.
2. Browser ↔ Convex:
- Queries & Mutations via Convex client in src/client.tsx.
- Real-time subscriptions on data changes.
3. SSR Server → Convex:
- Pre-fetch data on SSR page render.
4. CI/CD → Deployment Targets (Frontend host, Convex functions).
c. Architectural Patterns
- Component-based UI (Atomic Design in components/ui).
- Universal/Isomorphic rendering via SSR.
- Serverless functions + real-time DB (Convex).
- Separation of concerns: UI / routing / data / styles.
d. Technologies & Frameworks
- React, TypeScript, CSS/PostCSS, pnpm.
- Convex for backend & DB.
- GitHub Actions for CI/CD.
- ESLint, Prettier for code quality.

## Diagram (Mermaid)

```mermaid
flowchart TD
    Browser["Client Browser"]:::frontend

    subgraph "Frontend UI Layer"
        UI["components/ui/"]:::frontend
        ClientEntry["src/client.tsx"]:::frontend
        RouterDef["src/router.tsx + src/routes/"]:::frontend
        Hooks["src/hooks/"]:::frontend
        Utils["src/utils/"]:::frontend
        Icons["src/icons/icons.tsx"]:::frontend
        Styles["src/styles/app.css + src/styles/globals.css"]:::frontend
    end

    subgraph "SSR Server"
        SSREntry["src/ssr.tsx"]:::ssr
        DBTypes["src/db/schema.ts"]:::ssr
    end

    subgraph "Convex Backend"
        GdtFiles["convex/gdtFiles.ts"]:::convex
        GdtPref["convex/gdtPreferences.ts"]:::convex
        PermLogs["convex/permissionLogs.ts"]:::convex
        DBSchema["convex/schema.ts"]:::convex
    end

    Public["public/"]:::static

    subgraph "CI/CD Pipeline"
        CI1[".github/workflows/ci.yml"]:::cicd
        CI2[".github/workflows/codeql.yml"]:::cicd
        CI3[".github/actions/prepare/action.yml"]:::cicd
    end

    FrontendHost["Frontend Host"]:::static
    ConvexDeploy["Convex Cloud"]:::convex

    Browser --> UI
    Browser --> ClientEntry
    Browser --> RouterDef
    Browser --> Hooks
    Browser --> Utils
    Browser --> Icons
    Browser --> Styles

    Browser -->|"HTTP GET HTML/JS"| SSREntry
    SSREntry -->|"Pre-fetch data (Queries)"| GdtFiles

    Browser -->|"Queries & Mutations"| GdtFiles
    Browser -->|"Real-time Subscriptions"| GdtFiles

    GdtFiles -->|"Reads/Writes"| DBSchema
    GdtPref -->|"Reads/Writes"| DBSchema
    PermLogs -->|"Writes Logs"| DBSchema

    Public --> Browser

    CI1 --> FrontendHost
    CI2 --> FrontendHost
    CI3 --> ConvexDeploy

    classDef frontend fill:#cce5ff,stroke:#2b6cb0,color:#2c5282
    classDef ssr fill:#c6f6d5,stroke:#2f855a,color:#276749
    classDef convex fill:#fed7d7,stroke:#c53030,color:#9b2c2c
    classDef static fill:#e2e8f0,stroke:#4a5568,color:#2d3748
    classDef cicd fill:#e9d8fd,stroke:#6b46c1,color:#553c9a

    click UI "https://github.com/johannesbremer/praxisplaner/tree/main/components/ui/"
    click ClientEntry "https://github.com/johannesbremer/praxisplaner/blob/main/src/client.tsx"
    click RouterDef "https://github.com/johannesbremer/praxisplaner/blob/main/src/router.tsx"
    click RouterDef "https://github.com/johannesbremer/praxisplaner/tree/main/src/routes/"
    click Hooks "https://github.com/johannesbremer/praxisplaner/blob/main/src/hooks/useOfflineIndicator.tsx"
    click Utils "https://github.com/johannesbremer/praxisplaner/blob/main/lib/utils.ts"
    click Utils "https://github.com/johannesbremer/praxisplaner/blob/main/src/utils/posts.tsx"
    click Utils "https://github.com/johannesbremer/praxisplaner/blob/main/src/utils/seo.ts"
    click Icons "https://github.com/johannesbremer/praxisplaner/blob/main/src/icons/icons.tsx"
    click Styles "https://github.com/johannesbremer/praxisplaner/blob/main/src/styles/app.css"
    click Styles "https://github.com/johannesbremer/praxisplaner/blob/main/src/styles/globals.css"
    click SSREntry "https://github.com/johannesbremer/praxisplaner/blob/main/src/ssr.tsx"
    click DBTypes "https://github.com/johannesbremer/praxisplaner/blob/main/src/db/schema.ts"
    click GdtFiles "https://github.com/johannesbremer/praxisplaner/blob/main/convex/gdtFiles.ts"
    click GdtPref "https://github.com/johannesbremer/praxisplaner/blob/main/convex/gdtPreferences.ts"
    click PermLogs "https://github.com/johannesbremer/praxisplaner/blob/main/convex/permissionLogs.ts"
    click DBSchema "https://github.com/johannesbremer/praxisplaner/blob/main/convex/schema.ts"
    click Public "https://github.com/johannesbremer/praxisplaner/tree/main/public/"
    click CI1 "https://github.com/johannesbremer/praxisplaner/blob/main/.github/workflows/ci.yml"
    click CI2 "https://github.com/johannesbremer/praxisplaner/blob/main/.github/workflows/codeql.yml"
    click CI3 "https://github.com/johannesbremer/praxisplaner/blob/main/.github/actions/prepare/action.yml"
```
