# lujaintayy/recipeeez architecture

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

- Interactive diagram: https://gitdiagram.com/lujaintayy/recipeeez
- Repository: https://github.com/lujaintayy/recipeeez

## Overview

RECIPEEEZ lets visitors browse saved recipes and submit recipes for later use, with Google sign-in also present. The configured runtime starts at `src/app.js`: it serves the public pages and handles recipe listing and creation against MongoDB. The repository also contains a parallel root-level implementation, including recipe routes and controllers; the excerpts do not show it as the configured entry point. Google OAuth is routed through Passport, while the excerpts do not establish that the separate auth controller is wired into those routes.

Main entry points: [`src/app.js`](https://github.com/lujaintayy/recipeeez/blob/main/src/app.js) (Express application), [`app.js`](https://github.com/lujaintayy/recipeeez/blob/main/app.js) (Root application), [`src/controllers/recipeController.js`](https://github.com/lujaintayy/recipeeez/blob/main/src/controllers/recipeController.js) (Recipe controller), [`src/routes/authRoutes.js`](https://github.com/lujaintayy/recipeeez/blob/main/src/routes/authRoutes.js) (Authentication routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_pages["Recipe pages"]
  node_browser_js["Browser behavior<br/>[main.js]"]
end

subgraph group_runtime["Application runtime"]
  node_server["Express application<br/>[app.js]"]
end

subgraph group_recipes["Recipe handling"]
  node_recipe_controller["Recipe controller"]
  node_recipe_routes["Recipe routes<br/>[recipeRoutes.js]"]
  node_recipe_model[("Recipe model<br/>[recipeModel.js]")]
end

subgraph group_identity["Identity and users"]
  node_auth_routes["Authentication routes<br/>[authRoutes.js]"]
  node_auth_controller["User authentication<br/>[authController.js]"]
  node_user_model[("User model<br/>[userModel.js]")]
end

subgraph group_legacy["Parallel implementation"]
  node_root_app["Root application<br/>[app.js]"]
  node_root_auth_routes["Root authentication routes<br/>[authRoutes.js]"]
  node_root_auth_controller["Root user authentication<br/>[authController.js]"]
  node_root_user_model[("Root user model<br/>[userModel.js]")]
  node_root_recipe_routes["Root recipe routes<br/>[recipeRoutes.js]"]
  node_root_recipe_controller["Root recipe controller"]
  node_root_recipe_model[("Root recipe model<br/>[recipeModel.js]")]
end

node_visitor(("Visitor"))
node_google["Google OAuth"]

node_visitor -->|"uses"| node_pages
node_server -->|"serves"| node_pages
node_server -->|"mounts"| node_auth_routes
node_auth_routes -->|"authenticates with"| node_google
node_auth_controller -->|"reads and saves"| node_user_model
node_recipe_routes -->|"dispatches to"| node_recipe_controller
node_recipe_controller -->|"queries and saves"| node_recipe_model
node_server -->|"queries and saves"| node_recipe_model
node_root_app -->|"mounts"| node_root_auth_routes
node_root_app -->|"mounts"| node_root_recipe_routes
node_root_auth_controller -->|"reads and saves"| node_root_user_model
node_root_recipe_routes -->|"dispatches to"| node_root_recipe_controller
node_root_recipe_controller -->|"queries and saves"| node_root_recipe_model

click node_pages "https://github.com/lujaintayy/recipeeez/tree/main/public"
click node_browser_js "https://github.com/lujaintayy/recipeeez/blob/main/public/js/main.js"
click node_server "https://github.com/lujaintayy/recipeeez/blob/main/src/app.js"
click node_auth_routes "https://github.com/lujaintayy/recipeeez/blob/main/src/routes/authRoutes.js"
click node_auth_controller "https://github.com/lujaintayy/recipeeez/blob/main/src/controllers/authController.js"
click node_user_model "https://github.com/lujaintayy/recipeeez/blob/main/src/models/userModel.js"
click node_recipe_controller "https://github.com/lujaintayy/recipeeez/blob/main/src/controllers/recipeController.js"
click node_recipe_routes "https://github.com/lujaintayy/recipeeez/blob/main/src/routes/recipeRoutes.js"
click node_recipe_model "https://github.com/lujaintayy/recipeeez/blob/main/src/models/recipeModel.js"
click node_root_app "https://github.com/lujaintayy/recipeeez/blob/main/app.js"
click node_root_auth_routes "https://github.com/lujaintayy/recipeeez/blob/main/routes/authRoutes.js"
click node_root_auth_controller "https://github.com/lujaintayy/recipeeez/blob/main/controllers/authController.js"
click node_root_user_model "https://github.com/lujaintayy/recipeeez/blob/main/models/userModel.js"
click node_root_recipe_routes "https://github.com/lujaintayy/recipeeez/blob/main/routes/recipeRoutes.js"
click node_root_recipe_controller "https://github.com/lujaintayy/recipeeez/blob/main/controllers/recipeController.js"
click node_root_recipe_model "https://github.com/lujaintayy/recipeeez/blob/main/models/recipeModel.js"

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_pages,node_browser_js toneBlue
class node_server toneAmber
class node_recipe_controller,node_recipe_routes,node_recipe_model toneMint
class node_auth_routes,node_auth_controller,node_user_model toneRose
class node_root_app,node_root_auth_routes,node_root_auth_controller,node_root_user_model,node_root_recipe_routes,node_root_recipe_controller,node_root_recipe_model,node_visitor,node_google toneIndigo
```

## Components

### Web experience

- [Recipe pages](https://github.com/lujaintayy/recipeeez/tree/main/public): `public`
- [Browser behavior](https://github.com/lujaintayy/recipeeez/blob/main/public/js/main.js): `public/js/main.js`

### Application runtime

- [Express application](https://github.com/lujaintayy/recipeeez/blob/main/src/app.js): `src/app.js`

### Recipe handling

- [Recipe controller](https://github.com/lujaintayy/recipeeez/blob/main/src/controllers/recipeController.js): `src/controllers/recipeController.js`
- [Recipe routes](https://github.com/lujaintayy/recipeeez/blob/main/src/routes/recipeRoutes.js): `src/routes/recipeRoutes.js`
- [Recipe model](https://github.com/lujaintayy/recipeeez/blob/main/src/models/recipeModel.js): `src/models/recipeModel.js`

### Identity and users

- [Authentication routes](https://github.com/lujaintayy/recipeeez/blob/main/src/routes/authRoutes.js): `src/routes/authRoutes.js`
- [User authentication](https://github.com/lujaintayy/recipeeez/blob/main/src/controllers/authController.js): `src/controllers/authController.js`
- [User model](https://github.com/lujaintayy/recipeeez/blob/main/src/models/userModel.js): `src/models/userModel.js`

### Parallel implementation

- [Root application](https://github.com/lujaintayy/recipeeez/blob/main/app.js): `app.js`
- [Root authentication routes](https://github.com/lujaintayy/recipeeez/blob/main/routes/authRoutes.js): `routes/authRoutes.js`
- [Root user authentication](https://github.com/lujaintayy/recipeeez/blob/main/controllers/authController.js): `controllers/authController.js`
- [Root user model](https://github.com/lujaintayy/recipeeez/blob/main/models/userModel.js): `models/userModel.js`
- [Root recipe routes](https://github.com/lujaintayy/recipeeez/blob/main/routes/recipeRoutes.js): `routes/recipeRoutes.js`
- [Root recipe controller](https://github.com/lujaintayy/recipeeez/blob/main/controllers/recipeController.js): `controllers/recipeController.js`
- [Root recipe model](https://github.com/lujaintayy/recipeeez/blob/main/models/recipeModel.js): `models/recipeModel.js`

### Other components

- **Visitor**
- **Google OAuth**

## Connections

- Visitor → Recipe pages: uses (evidence: `README.md`)
- Express application → Recipe pages: serves (evidence: `src/app.js`)
- Express application → Authentication routes: mounts (evidence: `src/app.js`)
- Authentication routes → Google OAuth: authenticates with (evidence: `src/routes/authRoutes.js`)
- User authentication → User model: reads and saves (evidence: `src/controllers/authController.js`)
- Recipe routes → Recipe controller: dispatches to (evidence: `src/routes/recipeRoutes.js`)
- Recipe controller → Recipe model: queries and saves (evidence: `src/controllers/recipeController.js`)
- Express application → Recipe model: queries and saves (evidence: `src/app.js`)
- Root application → Root authentication routes: mounts (evidence: `app.js`)
- Root application → Root recipe routes: mounts (evidence: `app.js`)
- Root user authentication → Root user model: reads and saves (evidence: `controllers/authController.js`)
- Root recipe routes → Root recipe controller: dispatches to (evidence: `routes/recipeRoutes.js`)
- Root recipe controller → Root recipe model: queries and saves (evidence: `controllers/recipeController.js`)
