# llambert721/movie-review architecture

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

- Interactive diagram: https://gitdiagram.com/llambert721/movie-review
- Repository: https://github.com/llambert721/movie-review

## Overview

Movie Review is a Flask application for browsing movies, publishing and managing reviews, and managing user accounts. The main workflow is a visitor or member using the browser pages to browse movies or the review feed, then opening a movie and submitting a review; Flask serves the pages and API, with MongoDB as persistent storage. Separate branches cover registration and login, personal and public profiles, and administrator movie/account management. The sampled files show browser requests and parts of the Flask/MongoDB implementation; several API routes and page scripts are unsampled, so those connections are limited to documented or directly visible behavior.

Main entry points: [`app.py`](https://github.com/llambert721/movie-review/blob/main/app.py) (Authentication API), [`feed.js`](https://github.com/llambert721/movie-review/blob/main/feed.js) (Review feed), [`moviepage.js`](https://github.com/llambert721/movie-review/blob/main/moviepage.js) (Movie details), [`adduser.js`](https://github.com/llambert721/movie-review/blob/main/adduser.js) (Account forms)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser experience"]
end

subgraph group_identity["Accounts and profiles"]
  node_account_forms["Account forms<br/>[adduser.js]"]
  node_admin_accounts["Admin account creation<br/>[addadmin.js]"]
  node_login["Login<br/>[login.js]"]
  node_user_profile["Personal profile<br/>[myprofileuser.js]"]
  node_admin_profile["Admin profile<br/>[myprofileadmin.js]"]
  node_public_profile["Public profile<br/>[userpage.js]"]
end

subgraph group_discovery["Movies and reviews"]
  node_review_feed["Review feed<br/>[feed.js]"]
  node_movie_catalog["Movie catalog<br/>[moviefeed.js]"]
  node_movie_detail["Movie details<br/>[moviepage.js]"]
end

subgraph group_server["Application and storage"]
  node_auth_api["Authentication API<br/>[app.py]"]
  node_profile_api["Profile API<br/>[app.py]"]
  node_movie_api["Movie API<br/>[app.py]"]
  node_review_api["Review API<br/>[app.py]"]
  node_mongo[("MongoDB")]
end

node_visitor(("Visitor or member"))

node_visitor -->|"registers through"| node_account_forms
node_account_forms -.->|"posts registration"| node_auth_api
node_visitor -.->|"signs in through"| node_login
node_login -.->|"requests login"| node_auth_api
node_visitor -->|"creates account through"| node_admin_accounts
node_admin_accounts -->|"posts admin creation"| node_auth_api
node_user_profile -->|"loads own reviews"| node_profile_api
node_public_profile -->|"loads public profile"| node_profile_api
node_admin_profile -->|"checks session"| node_auth_api
node_review_feed -->|"loads and edits reviews"| node_review_api
node_review_feed -->|"loads movie options"| node_movie_api
node_movie_catalog -->|"lists and manages movies"| node_movie_api
node_movie_detail -->|"loads movie"| node_movie_api
node_movie_detail -->|"loads and posts reviews"| node_review_api
node_auth_api -.->|"reads and writes accounts"| node_mongo
node_profile_api -.->|"reads profile data"| node_mongo
node_movie_api -->|"reads and writes movies"| node_mongo
node_review_api -.->|"reads and writes reviews"| node_mongo

click node_account_forms "https://github.com/llambert721/movie-review/blob/main/adduser.js"
click node_admin_accounts "https://github.com/llambert721/movie-review/blob/main/addadmin.js"
click node_login "https://github.com/llambert721/movie-review/blob/main/login.js"
click node_user_profile "https://github.com/llambert721/movie-review/blob/main/myprofileuser.js"
click node_admin_profile "https://github.com/llambert721/movie-review/blob/main/myprofileadmin.js"
click node_public_profile "https://github.com/llambert721/movie-review/blob/main/userpage.js"
click node_review_feed "https://github.com/llambert721/movie-review/blob/main/feed.js"
click node_movie_catalog "https://github.com/llambert721/movie-review/blob/main/moviefeed.js"
click node_movie_detail "https://github.com/llambert721/movie-review/blob/main/moviepage.js"
click node_auth_api "https://github.com/llambert721/movie-review/blob/main/app.py"
click node_profile_api "https://github.com/llambert721/movie-review/blob/main/app.py"
click node_movie_api "https://github.com/llambert721/movie-review/blob/main/app.py"
click node_review_api "https://github.com/llambert721/movie-review/blob/main/app.py"

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_account_forms,node_admin_accounts,node_login,node_user_profile,node_admin_profile,node_public_profile toneAmber
class node_review_feed,node_movie_catalog,node_movie_detail toneMint
class node_auth_api,node_profile_api,node_movie_api,node_review_api,node_mongo toneRose
class node_visitor toneIndigo
```

## Components

### Accounts and profiles

- [Account forms](https://github.com/llambert721/movie-review/blob/main/adduser.js): `adduser.js`
- [Admin account creation](https://github.com/llambert721/movie-review/blob/main/addadmin.js): `addadmin.js`
- [Login](https://github.com/llambert721/movie-review/blob/main/login.js): `login.js`
- [Personal profile](https://github.com/llambert721/movie-review/blob/main/myprofileuser.js): `myprofileuser.js`
- [Admin profile](https://github.com/llambert721/movie-review/blob/main/myprofileadmin.js): `myprofileadmin.js`
- [Public profile](https://github.com/llambert721/movie-review/blob/main/userpage.js): `userpage.js`

### Movies and reviews

- [Review feed](https://github.com/llambert721/movie-review/blob/main/feed.js): `feed.js`
- [Movie catalog](https://github.com/llambert721/movie-review/blob/main/moviefeed.js): `moviefeed.js`
- [Movie details](https://github.com/llambert721/movie-review/blob/main/moviepage.js): `moviepage.js`

### Application and storage

- [Authentication API](https://github.com/llambert721/movie-review/blob/main/app.py): `app.py`
- [Profile API](https://github.com/llambert721/movie-review/blob/main/app.py): `app.py`
- [Movie API](https://github.com/llambert721/movie-review/blob/main/app.py): `app.py`
- [Review API](https://github.com/llambert721/movie-review/blob/main/app.py): `app.py`
- **MongoDB**

### Other components

- **Visitor or member**

## Connections

- Visitor or member → Account forms: registers through (evidence: `adduser.js`)
- Account forms → Authentication API: posts registration
- Visitor or member → Login: signs in through
- Login → Authentication API: requests login
- Visitor or member → Admin account creation: creates account through (evidence: `addadmin.js`)
- Admin account creation → Authentication API: posts admin creation (evidence: `addadmin.js`)
- Personal profile → Profile API: loads own reviews (evidence: `myprofileuser.js`)
- Public profile → Profile API: loads public profile (evidence: `userpage.js`)
- Admin profile → Authentication API: checks session (evidence: `myprofileadmin.js`)
- Review feed → Review API: loads and edits reviews (evidence: `feed.js`)
- Review feed → Movie API: loads movie options (evidence: `feed.js`)
- Movie catalog → Movie API: lists and manages movies (evidence: `moviefeed.js`)
- Movie details → Movie API: loads movie (evidence: `moviepage.js`)
- Movie details → Review API: loads and posts reviews (evidence: `moviepage.js`)
- Authentication API → MongoDB: reads and writes accounts
- Profile API → MongoDB: reads profile data
- Movie API → MongoDB: reads and writes movies (evidence: `app.py`)
- Review API → MongoDB: reads and writes reviews
