# k4hav/flixbase architecture

> Architecture diagram of the GitHub repository k4hav/flixbase, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/k4hav/flixbase
- Repository: https://github.com/k4hav/flixbase

## Overview

FlixBase is a community movie and game discovery hub: visitors browse and search titles, open detail pages for download or watch links, submit titles and requests, and save favorites in browser storage. Supabase backs the documented movie, request, contact, and game data operations; the README also describes admin management, though no admin page appears in this tree. The graph preserves the separate finder, live, support, and submission experiences. Some page implementations were not excerpted, so their connections rely only on SOURCE INDEX references or README statements.

Main entry points: [`lib/supabase.js`](https://github.com/k4hav/flixbase/blob/main/lib/supabase.js) (Supabase Data API), [`pages/index.jsx`](https://github.com/k4hav/flixbase/blob/main/pages/index.jsx) (Movie Catalog), [`hooks/useCollection.js`](https://github.com/k4hav/flixbase/blob/main/hooks/useCollection.js) (Collection State), [`components/MovieCard.jsx`](https://github.com/k4hav/flixbase/blob/main/components/MovieCard.jsx) (Movie Cards)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Title Discovery"]
  node_home["Movie Catalog<br/>[index.jsx]"]
  node_search["Search Input<br/>[SearchBar.jsx]"]
  node_moviecard["Movie Cards<br/>[MovieCard.jsx]"]
  node_moviedetail["Movie Details<br/>[&#91;id&#93;.jsx]"]
  node_finder["Title Finder<br/>[finder.jsx]"]
  node_games["Game Catalog<br/>[games.jsx]"]
  node_gamedetail["Game Details<br/>[&#91;id&#93;.jsx]"]
  node_live["Live Listings<br/>[live.jsx]"]
end

subgraph group_community["Community Contributions"]
  node_submitmovie["Movie Submission<br/>[submit.jsx]"]
  node_submitgame["Game Submission<br/>[submit-game.jsx]"]
  node_requests["Movie Requests<br/>[requests.jsx]"]
  node_contact["Contact Form<br/>[contact.jsx]"]
  node_support["Support Page<br/>[support.jsx]"]
end

subgraph group_personal["Personal Collection"]
  node_collectionpage["Saved Collection<br/>[collection.jsx]"]
  node_collectionhook["Collection State<br/>[useCollection.js]"]
  node_browserstorage[("Browser Storage")]
end

subgraph group_platform["Shared Platform"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_background["Cinematic Background"]
  node_dataapi["Supabase Data API<br/>[supabase.js]"]
  node_supabase[("Supabase Database<br/>[schema.sql]")]
end

node_visitor(("Visitor"))

node_visitor -->|"browses"| node_home
node_home -->|"loads titles"| node_dataapi
node_home -->|"renders"| node_search
node_home -->|"renders"| node_moviecard
node_moviecard -->|"saves favorites"| node_collectionhook
node_moviecard -->|"links to"| node_moviedetail
node_visitor -->|"opens title"| node_moviedetail
node_moviedetail -->|"loads title data"| node_dataapi
node_visitor -->|"searches titles"| node_finder
node_visitor -->|"browses games"| node_games
node_games -->|"loads games"| node_dataapi
node_visitor -->|"opens game"| node_gamedetail
node_visitor -->|"views listings"| node_live
node_visitor -->|"submits title"| node_submitmovie
node_submitmovie -->|"adds movie"| node_dataapi
node_visitor -->|"submits game"| node_submitgame
node_submitgame -->|"uses game data"| node_dataapi
node_visitor -->|"requests or votes"| node_requests
node_requests -->|"reads and updates"| node_dataapi
node_visitor -->|"sends message"| node_contact
node_contact -->|"submits contact"| node_dataapi
node_visitor -->|"visits support"| node_support
node_visitor -->|"views favorites"| node_collectionpage
node_collectionpage -->|"uses collection"| node_collectionhook
node_collectionhook -->|"reads and writes"| node_browserstorage
node_dataapi -->|"queries"| node_supabase
node_navbar -->|"reads collection"| node_collectionhook
node_navbar -->|"provides navigation"| node_visitor

click node_home "https://github.com/k4hav/flixbase/blob/main/pages/index.jsx"
click node_search "https://github.com/k4hav/flixbase/blob/main/components/SearchBar.jsx"
click node_moviecard "https://github.com/k4hav/flixbase/blob/main/components/MovieCard.jsx"
click node_moviedetail "https://github.com/k4hav/flixbase/blob/main/pages/movies/%5Bid%5D.jsx"
click node_finder "https://github.com/k4hav/flixbase/blob/main/pages/finder.jsx"
click node_games "https://github.com/k4hav/flixbase/blob/main/pages/games.jsx"
click node_gamedetail "https://github.com/k4hav/flixbase/blob/main/pages/games/%5Bid%5D.jsx"
click node_live "https://github.com/k4hav/flixbase/blob/main/pages/live.jsx"
click node_submitmovie "https://github.com/k4hav/flixbase/blob/main/pages/submit.jsx"
click node_submitgame "https://github.com/k4hav/flixbase/blob/main/pages/submit-game.jsx"
click node_requests "https://github.com/k4hav/flixbase/blob/main/pages/requests.jsx"
click node_contact "https://github.com/k4hav/flixbase/blob/main/pages/contact.jsx"
click node_support "https://github.com/k4hav/flixbase/blob/main/pages/support.jsx"
click node_collectionpage "https://github.com/k4hav/flixbase/blob/main/pages/collection.jsx"
click node_collectionhook "https://github.com/k4hav/flixbase/blob/main/hooks/useCollection.js"
click node_navbar "https://github.com/k4hav/flixbase/blob/main/components/Navbar.jsx"
click node_background "https://github.com/k4hav/flixbase/blob/main/components/CinematicBackground.jsx"
click node_dataapi "https://github.com/k4hav/flixbase/blob/main/lib/supabase.js"
click node_supabase "https://github.com/k4hav/flixbase/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_home,node_search,node_moviecard,node_moviedetail,node_finder,node_games,node_gamedetail,node_live toneBlue
class node_submitmovie,node_submitgame,node_requests,node_contact,node_support toneAmber
class node_collectionpage,node_collectionhook,node_browserstorage toneMint
class node_navbar,node_background,node_dataapi,node_supabase toneRose
class node_visitor toneIndigo
```

## Components

### Title Discovery

- [Movie Catalog](https://github.com/k4hav/flixbase/blob/main/pages/index.jsx): `pages/index.jsx`
- [Search Input](https://github.com/k4hav/flixbase/blob/main/components/SearchBar.jsx): `components/SearchBar.jsx`
- [Movie Cards](https://github.com/k4hav/flixbase/blob/main/components/MovieCard.jsx): `components/MovieCard.jsx`
- [Movie Details](https://github.com/k4hav/flixbase/blob/main/pages/movies/%5Bid%5D.jsx): `pages/movies/[id].jsx`
- [Title Finder](https://github.com/k4hav/flixbase/blob/main/pages/finder.jsx): `pages/finder.jsx`
- [Game Catalog](https://github.com/k4hav/flixbase/blob/main/pages/games.jsx): `pages/games.jsx`
- [Game Details](https://github.com/k4hav/flixbase/blob/main/pages/games/%5Bid%5D.jsx): `pages/games/[id].jsx`
- [Live Listings](https://github.com/k4hav/flixbase/blob/main/pages/live.jsx): `pages/live.jsx`

### Community Contributions

- [Movie Submission](https://github.com/k4hav/flixbase/blob/main/pages/submit.jsx): `pages/submit.jsx`
- [Game Submission](https://github.com/k4hav/flixbase/blob/main/pages/submit-game.jsx): `pages/submit-game.jsx`
- [Movie Requests](https://github.com/k4hav/flixbase/blob/main/pages/requests.jsx): `pages/requests.jsx`
- [Contact Form](https://github.com/k4hav/flixbase/blob/main/pages/contact.jsx): `pages/contact.jsx`
- [Support Page](https://github.com/k4hav/flixbase/blob/main/pages/support.jsx): `pages/support.jsx`

### Personal Collection

- [Saved Collection](https://github.com/k4hav/flixbase/blob/main/pages/collection.jsx): `pages/collection.jsx`
- [Collection State](https://github.com/k4hav/flixbase/blob/main/hooks/useCollection.js): `hooks/useCollection.js`
- **Browser Storage**

### Shared Platform

- [Navigation](https://github.com/k4hav/flixbase/blob/main/components/Navbar.jsx): `components/Navbar.jsx`
- [Cinematic Background](https://github.com/k4hav/flixbase/blob/main/components/CinematicBackground.jsx): `components/CinematicBackground.jsx`
- [Supabase Data API](https://github.com/k4hav/flixbase/blob/main/lib/supabase.js): `lib/supabase.js`
- [Supabase Database](https://github.com/k4hav/flixbase/blob/main/supabase/schema.sql): `supabase/schema.sql`

### Other components

- **Visitor**

## Connections

- Visitor → Movie Catalog: browses (evidence: `README.md`)
- Movie Catalog → Supabase Data API: loads titles (evidence: `pages/index.jsx`)
- Movie Catalog → Search Input: renders (evidence: `pages/index.jsx`)
- Movie Catalog → Movie Cards: renders (evidence: `pages/index.jsx`)
- Movie Cards → Collection State: saves favorites (evidence: `components/MovieCard.jsx`)
- Movie Cards → Movie Details: links to (evidence: `components/MovieCard.jsx`)
- Visitor → Movie Details: opens title (evidence: `README.md`)
- Movie Details → Supabase Data API: loads title data (evidence: `pages/movies/[id].jsx`)
- Visitor → Title Finder: searches titles (evidence: `README.md`)
- Visitor → Game Catalog: browses games (evidence: `README.md`)
- Game Catalog → Supabase Data API: loads games (evidence: `pages/games.jsx`)
- Visitor → Game Details: opens game (evidence: `README.md`)
- Visitor → Live Listings: views listings (evidence: `README.md`)
- Visitor → Movie Submission: submits title (evidence: `README.md`)
- Movie Submission → Supabase Data API: adds movie (evidence: `pages/submit.jsx`)
- Visitor → Game Submission: submits game (evidence: `README.md`)
- Game Submission → Supabase Data API: uses game data (evidence: `pages/submit-game.jsx`)
- Visitor → Movie Requests: requests or votes (evidence: `README.md`)
- Movie Requests → Supabase Data API: reads and updates (evidence: `pages/requests.jsx`)
- Visitor → Contact Form: sends message (evidence: `README.md`)
- Contact Form → Supabase Data API: submits contact (evidence: `pages/contact.jsx`)
- Visitor → Support Page: visits support (evidence: `README.md`)
- Visitor → Saved Collection: views favorites (evidence: `README.md`)
- Saved Collection → Collection State: uses collection (evidence: `pages/collection.jsx`)
- Collection State → Browser Storage: reads and writes (evidence: `hooks/useCollection.js`)
- Supabase Data API → Supabase Database: queries (evidence: `lib/supabase.js`)
- Navigation → Collection State: reads collection (evidence: `components/Navbar.jsx`)
- Navigation → Visitor: provides navigation
