# cosmicdinosaur/to-do-list-app-supabase architecture

> Architecture diagram of the GitHub repository cosmicdinosaur/to-do-list-app-supabase, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cosmicdinosaur/to-do-list-app-supabase
- Repository: https://github.com/cosmicdinosaur/to-do-list-app-supabase

## Overview

This is a small browser-based personal to-do app. The user opens the page, signs in or signs up, and—when authenticated—manages tasks; the browser talks directly to Supabase for authentication and database operations. The app implementation is concentrated in app.js, so its auth and task responsibilities share that source path. The README documents the page structure, Supabase client, database, and RLS setup; sampled app.js confirms configuration use, auth calls, and task queries/mutations. Other source files were not sampled, so those links rely on the README.

Main entry points: [`app.js`](https://github.com/cosmicdinosaur/to-do-list-app-supabase/blob/main/app.js) (Auth and tasks), [`index.html`](https://github.com/cosmicdinosaur/to-do-list-app-supabase/blob/main/index.html) (Page structure), [`supabase/schema.sql`](https://github.com/cosmicdinosaur/to-do-list-app-supabase/blob/main/supabase/schema.sql) (Row security), [`config.example.js`](https://github.com/cosmicdinosaur/to-do-list-app-supabase/blob/main/config.example.js) (Project credentials)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Browser app"]
  node_page["Page structure<br/>[index.html]"]
  node_styles["App styling<br/>[styles.css]"]
  node_app["Auth and tasks<br/>[app.js]"]
end

subgraph group_supabase["Supabase services"]
  node_client["Supabase client"]
  node_auth["Email auth"]
  node_todos[("Todos database")]
  node_policies["Row security<br/>[schema.sql]"]
end

subgraph group_setup["Project setup"]
  node_config["Project credentials<br/>[config.example.js]"]
end

node_user(("User"))

node_user -->|"opens"| node_page
node_page -->|"loads"| node_app
node_page -->|"uses"| node_styles
node_config -->|"configures"| node_app
node_app -->|"calls"| node_client
node_app -->|"authenticates"| node_auth
node_app -->|"reads and writes"| node_todos
node_policies -->|"defines access"| node_todos
node_todos -->|"enforces"| node_policies
node_auth -.->|"uses"| node_client
node_todos -.->|"uses"| node_client

click node_page "https://github.com/cosmicdinosaur/to-do-list-app-supabase/blob/main/index.html"
click node_styles "https://github.com/cosmicdinosaur/to-do-list-app-supabase/blob/main/styles.css"
click node_app "https://github.com/cosmicdinosaur/to-do-list-app-supabase/blob/main/app.js"
click node_config "https://github.com/cosmicdinosaur/to-do-list-app-supabase/blob/main/config.example.js"
click node_policies "https://github.com/cosmicdinosaur/to-do-list-app-supabase/blob/main/supabase/schema.sql"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_page,node_styles,node_app,node_user toneBlue
class node_client,node_auth,node_todos,node_policies toneAmber
class node_config toneMint
```

## Components

### Browser app

- [Page structure](https://github.com/cosmicdinosaur/to-do-list-app-supabase/blob/main/index.html): `index.html`
- [App styling](https://github.com/cosmicdinosaur/to-do-list-app-supabase/blob/main/styles.css): `styles.css`
- [Auth and tasks](https://github.com/cosmicdinosaur/to-do-list-app-supabase/blob/main/app.js): `app.js`

### Supabase services

- **Supabase client**
- **Email auth**
- **Todos database**
- [Row security](https://github.com/cosmicdinosaur/to-do-list-app-supabase/blob/main/supabase/schema.sql): `supabase/schema.sql`

### Project setup

- [Project credentials](https://github.com/cosmicdinosaur/to-do-list-app-supabase/blob/main/config.example.js): `config.example.js`

### Other components

- **User**

## Connections

- User → Page structure: opens (evidence: `README.md`)
- Page structure → Auth and tasks: loads (evidence: `README.md`)
- Page structure → App styling: uses (evidence: `README.md`)
- Project credentials → Auth and tasks: configures (evidence: `app.js`)
- Auth and tasks → Supabase client: calls (evidence: `app.js`)
- Auth and tasks → Email auth: authenticates (evidence: `app.js`)
- Auth and tasks → Todos database: reads and writes (evidence: `app.js`)
- Row security → Todos database: defines access (evidence: `README.md`)
- Todos database → Row security: enforces (evidence: `README.md`)
- Email auth → Supabase client: uses (evidence: `README.md`)
- Todos database → Supabase client: uses (evidence: `README.md`)
