# samyaktiwari16/watchnow architecture

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

- Interactive diagram: https://gitdiagram.com/samyaktiwari16/watchnow
- Repository: https://github.com/samyaktiwari16/watchnow

## Overview

WatchNow is a React movie-discovery application backed by Django REST Framework. Users browse a movie catalogue, filter and search it, then sign up or log in to manage watchlists and favourites and view a profile. The frontend calls the deployed API directly; the sampled backend views use serializers and Django models. The README also identifies PostgreSQL and Supabase, but the available excerpts do not establish Supabase’s runtime role or show all API routes, so those connections are not inferred.

Main entry points: [`WatchNow_Frontend/frontend/src/App.jsx`](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/App.jsx) (Route application), [`WatchNow_Backend/Backend/views.py`](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Backend/Backend/views.py) (REST API views), [`WatchNow_Frontend/frontend/src/pages/Home.jsx`](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/Home.jsx) (Movie discovery), [`WatchNow_Frontend/frontend/src/components/navbar.jsx`](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/components/navbar.jsx) (Navigation and search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Movie experience"]
  node_app["Route application<br/>[App.jsx]"]
  node_home["Movie discovery<br/>[Home.jsx]"]
  node_navbar["Navigation and search<br/>[navbar.jsx]"]
  node_searchbox["Search input<br/>[searchbox.jsx]"]
  node_moviecard["Movie cards<br/>[moviecard.jsx]"]
  node_noresults["Empty results<br/>[Nothing.jsx]"]
  node_watchlistui["Watchlist<br/>[Watchlist.jsx]"]
  node_favouriteui["Favourites<br/>[Favourite.jsx]"]
  node_footer["Shared footer<br/>[footer.jsx]"]
  node_bar["Section divider<br/>[Bar.jsx]"]
end

subgraph group_identity["User identity"]
  node_login["Login<br/>[Login.jsx]"]
  node_signup["Sign up<br/>[SignUp.jsx]"]
  node_logout["Logout<br/>[Logout.jsx]"]
  node_protected["Protected routes<br/>[ProtectedPage.jsx]"]
  node_profile["User profile<br/>[Profile.jsx]"]
end

subgraph group_backend["API and domain"]
  node_api["REST API views<br/>[views.py]"]
  node_serializers["API serializers<br/>[serializers.py]"]
end

subgraph group_persistence["Application data"]
  node_models["Domain models<br/>[models.py]"]
  node_postgres[("PostgreSQL")]
end

node_visitor(("Movie viewer"))

node_visitor -->|"uses"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_signup
node_app -->|"routes to"| node_logout
node_app -->|"guards routes"| node_protected
node_app -->|"routes to"| node_watchlistui
node_app -->|"routes to"| node_favouriteui
node_app -->|"routes to"| node_profile
node_home -->|"renders"| node_navbar
node_home -->|"renders"| node_moviecard
node_home -->|"renders"| node_noresults
node_home -->|"renders"| node_footer
node_home -->|"renders"| node_bar
node_navbar -->|"renders"| node_searchbox
node_signup -.->|"registers via"| node_api
node_home -.->|"requests movies"| node_api
node_watchlistui -.->|"reads and removes"| node_api
node_favouriteui -.->|"manages favourites"| node_api
node_login -.->|"authenticates via"| node_api
node_logout -.->|"logs out via"| node_api
node_profile -->|"offers logout"| node_logout
node_api -->|"uses"| node_serializers
node_api -->|"queries"| node_models
node_serializers -->|"serializes"| node_models
node_models -.->|"persists data"| node_postgres
node_watchlistui -->|"renders"| node_navbar
node_watchlistui -->|"renders"| node_footer
node_watchlistui -->|"renders"| node_bar
node_favouriteui -->|"renders"| node_navbar
node_favouriteui -->|"renders"| node_footer
node_favouriteui -->|"renders"| node_bar
node_login -->|"renders"| node_navbar
node_login -->|"renders"| node_footer
node_signup -->|"renders"| node_navbar
node_signup -->|"renders"| node_footer

click node_app "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/App.jsx"
click node_home "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/Home.jsx"
click node_navbar "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/components/navbar.jsx"
click node_searchbox "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/components/searchbox.jsx"
click node_moviecard "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/components/moviecard.jsx"
click node_noresults "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/Nothing.jsx"
click node_watchlistui "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/Watchlist.jsx"
click node_favouriteui "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/Favourite.jsx"
click node_login "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/Login.jsx"
click node_signup "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/SignUp.jsx"
click node_logout "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/Logout.jsx"
click node_protected "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/ProtectedPage.jsx"
click node_profile "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/Profile.jsx"
click node_api "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Backend/Backend/views.py"
click node_serializers "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Backend/Backend/serializers.py"
click node_models "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Backend/Backend/models.py"
click node_footer "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/components/footer.jsx"
click node_bar "https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/components/Bar.jsx"

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_app,node_home,node_navbar,node_searchbox,node_moviecard,node_noresults,node_watchlistui,node_favouriteui,node_footer,node_bar,node_visitor toneBlue
class node_login,node_signup,node_logout,node_protected,node_profile toneAmber
class node_api,node_serializers toneMint
class node_models,node_postgres toneRose
```

## Components

### Movie experience

- [Route application](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/App.jsx): `WatchNow_Frontend/frontend/src/App.jsx`
- [Movie discovery](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/Home.jsx): `WatchNow_Frontend/frontend/src/pages/Home.jsx`
- [Navigation and search](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/components/navbar.jsx): `WatchNow_Frontend/frontend/src/components/navbar.jsx`
- [Search input](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/components/searchbox.jsx): `WatchNow_Frontend/frontend/src/components/searchbox.jsx`
- [Movie cards](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/components/moviecard.jsx): `WatchNow_Frontend/frontend/src/components/moviecard.jsx`
- [Empty results](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/Nothing.jsx): `WatchNow_Frontend/frontend/src/pages/Nothing.jsx`
- [Watchlist](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/Watchlist.jsx): `WatchNow_Frontend/frontend/src/pages/Watchlist.jsx`
- [Favourites](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/Favourite.jsx): `WatchNow_Frontend/frontend/src/pages/Favourite.jsx`
- [Shared footer](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/components/footer.jsx): `WatchNow_Frontend/frontend/src/components/footer.jsx`
- [Section divider](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/components/Bar.jsx): `WatchNow_Frontend/frontend/src/components/Bar.jsx`

### User identity

- [Login](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/Login.jsx): `WatchNow_Frontend/frontend/src/pages/Login.jsx`
- [Sign up](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/SignUp.jsx): `WatchNow_Frontend/frontend/src/pages/SignUp.jsx`
- [Logout](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/Logout.jsx): `WatchNow_Frontend/frontend/src/pages/Logout.jsx`
- [Protected routes](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/ProtectedPage.jsx): `WatchNow_Frontend/frontend/src/pages/ProtectedPage.jsx`
- [User profile](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Frontend/frontend/src/pages/Profile.jsx): `WatchNow_Frontend/frontend/src/pages/Profile.jsx`

### API and domain

- [REST API views](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Backend/Backend/views.py): `WatchNow_Backend/Backend/views.py`
- [API serializers](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Backend/Backend/serializers.py): `WatchNow_Backend/Backend/serializers.py`

### Application data

- [Domain models](https://github.com/samyaktiwari16/watchnow/blob/main/WatchNow_Backend/Backend/models.py): `WatchNow_Backend/Backend/models.py`
- **PostgreSQL**

### Other components

- **Movie viewer**

## Connections

- Movie viewer → Route application: uses
- Route application → Movie discovery: routes to (evidence: `WatchNow_Frontend/frontend/src/App.jsx`)
- Route application → Login: routes to (evidence: `WatchNow_Frontend/frontend/src/App.jsx`)
- Route application → Sign up: routes to (evidence: `WatchNow_Frontend/frontend/src/App.jsx`)
- Route application → Logout: routes to (evidence: `WatchNow_Frontend/frontend/src/App.jsx`)
- Route application → Protected routes: guards routes (evidence: `WatchNow_Frontend/frontend/src/App.jsx`)
- Route application → Watchlist: routes to (evidence: `WatchNow_Frontend/frontend/src/App.jsx`)
- Route application → Favourites: routes to (evidence: `WatchNow_Frontend/frontend/src/App.jsx`)
- Route application → User profile: routes to (evidence: `WatchNow_Frontend/frontend/src/App.jsx`)
- Movie discovery → Navigation and search: renders (evidence: `WatchNow_Frontend/frontend/src/pages/Home.jsx`)
- Movie discovery → Movie cards: renders (evidence: `WatchNow_Frontend/frontend/src/pages/Home.jsx`)
- Movie discovery → Empty results: renders (evidence: `WatchNow_Frontend/frontend/src/pages/Home.jsx`)
- Movie discovery → Shared footer: renders (evidence: `WatchNow_Frontend/frontend/src/pages/Home.jsx`)
- Movie discovery → Section divider: renders (evidence: `WatchNow_Frontend/frontend/src/pages/Home.jsx`)
- Navigation and search → Search input: renders (evidence: `WatchNow_Frontend/frontend/src/components/navbar.jsx`)
- Sign up → REST API views: registers via
- Movie discovery → REST API views: requests movies
- Watchlist → REST API views: reads and removes
- Favourites → REST API views: manages favourites
- Login → REST API views: authenticates via
- Logout → REST API views: logs out via
- User profile → Logout: offers logout (evidence: `WatchNow_Frontend/frontend/src/pages/Profile.jsx`)
- REST API views → API serializers: uses (evidence: `WatchNow_Backend/Backend/views.py`)
- REST API views → Domain models: queries (evidence: `WatchNow_Backend/Backend/views.py`)
- API serializers → Domain models: serializes (evidence: `WatchNow_Backend/Backend/serializers.py`)
- Domain models → PostgreSQL: persists data
- Watchlist → Navigation and search: renders (evidence: `WatchNow_Frontend/frontend/src/pages/Watchlist.jsx`)
- Watchlist → Shared footer: renders (evidence: `WatchNow_Frontend/frontend/src/pages/Watchlist.jsx`)
- Watchlist → Section divider: renders (evidence: `WatchNow_Frontend/frontend/src/pages/Watchlist.jsx`)
- Favourites → Navigation and search: renders (evidence: `WatchNow_Frontend/frontend/src/pages/Favourite.jsx`)
- Favourites → Shared footer: renders (evidence: `WatchNow_Frontend/frontend/src/pages/Favourite.jsx`)
- Favourites → Section divider: renders (evidence: `WatchNow_Frontend/frontend/src/pages/Favourite.jsx`)
- Login → Navigation and search: renders (evidence: `WatchNow_Frontend/frontend/src/pages/Login.jsx`)
- Login → Shared footer: renders (evidence: `WatchNow_Frontend/frontend/src/pages/Login.jsx`)
- Sign up → Navigation and search: renders (evidence: `WatchNow_Frontend/frontend/src/pages/SignUp.jsx`)
- Sign up → Shared footer: renders (evidence: `WatchNow_Frontend/frontend/src/pages/SignUp.jsx`)
