# nlkris/tigersproject architecture

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

- Interactive diagram: https://gitdiagram.com/nlkris/tigersproject
- Repository: https://github.com/nlkris/tigersproject

## Overview

This is a Flask social microblog: users sign up, discover accounts, view followed and recommended posts, and interact through profiles, comments, retweets, and notifications. The app registers a route blueprint; route handlers use JSON-backed helpers for users, tweets, and notifications. The excerpts show the feed rendering and some interaction paths, but not every handler, so unsampled feature links are omitted rather than inferred. The separate backend database and models modules are present but are not shown participating in the app’s runtime flow.

Main entry points: [`backend/routes.py`](https://github.com/nlkris/tigersproject/blob/main/backend/routes.py) (Route handlers), [`utils/data_manager.py`](https://github.com/nlkris/tigersproject/blob/main/utils/data_manager.py) (Data manager), [`app.py`](https://github.com/nlkris/tigersproject/blob/main/app.py) (Flask app), [`data/users.json`](https://github.com/nlkris/tigersproject/blob/main/data/users.json) (Users JSON)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Web runtime"]
  node_flask_app["Flask app<br/>[app.py]"]
  node_routes["Route handlers<br/>[routes.py]"]
end

subgraph group_social["Social features"]
  node_accounts["Accounts<br/>[routes.py]"]
  node_discovery["User discovery<br/>[routes.py]"]
  node_feed["Feed<br/>[routes.py]"]
  node_profiles["Profiles<br/>[routes.py]"]
  node_conversations["Comments and replies<br/>[routes.py]"]
  node_retweets["Retweets<br/>[routes.py]"]
  node_notifications["Notifications<br/>[routes.py]"]
end

subgraph group_persistence["JSON persistence"]
  node_data_manager["Data manager<br/>[data_manager.py]"]
  node_users_store[("Users JSON<br/>[users.json]")]
  node_tweets_store[("Tweets JSON<br/>[tweets.json]")]
  node_notifications_store[("Notifications JSON<br/>[notifications.json]")]
end

subgraph group_views["Web views"]
  node_feed_view["Feed template<br/>[feed.html]"]
end

node_visitor(("Visitor"))

node_flask_app -->|"registers blueprint"| node_routes
node_visitor -->|"sends requests"| node_routes
node_routes -->|"uses helpers"| node_data_manager
node_flask_app -->|"initializes data"| node_data_manager
node_routes -->|"renders"| node_feed_view
node_data_manager -->|"reads and writes"| node_users_store
node_data_manager -->|"reads and writes"| node_tweets_store
node_data_manager -->|"reads and writes"| node_notifications_store
node_routes -->|"adds notifications"| node_notifications

click node_flask_app "https://github.com/nlkris/tigersproject/blob/main/app.py"
click node_routes "https://github.com/nlkris/tigersproject/blob/main/backend/routes.py"
click node_accounts "https://github.com/nlkris/tigersproject/blob/main/backend/routes.py"
click node_discovery "https://github.com/nlkris/tigersproject/blob/main/backend/routes.py"
click node_feed "https://github.com/nlkris/tigersproject/blob/main/backend/routes.py"
click node_profiles "https://github.com/nlkris/tigersproject/blob/main/backend/routes.py"
click node_conversations "https://github.com/nlkris/tigersproject/blob/main/backend/routes.py"
click node_retweets "https://github.com/nlkris/tigersproject/blob/main/backend/routes.py"
click node_notifications "https://github.com/nlkris/tigersproject/blob/main/backend/routes.py"
click node_data_manager "https://github.com/nlkris/tigersproject/blob/main/utils/data_manager.py"
click node_users_store "https://github.com/nlkris/tigersproject/blob/main/data/users.json"
click node_tweets_store "https://github.com/nlkris/tigersproject/blob/main/data/tweets.json"
click node_notifications_store "https://github.com/nlkris/tigersproject/blob/main/backend/data/notifications.json"
click node_feed_view "https://github.com/nlkris/tigersproject/blob/main/templates/feed.html"

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_flask_app,node_routes toneBlue
class node_accounts,node_discovery,node_feed,node_profiles,node_conversations,node_retweets,node_notifications toneAmber
class node_data_manager,node_users_store,node_tweets_store,node_notifications_store toneMint
class node_feed_view toneRose
class node_visitor toneIndigo
```

## Components

### Web runtime

- [Flask app](https://github.com/nlkris/tigersproject/blob/main/app.py): `app.py`
- [Route handlers](https://github.com/nlkris/tigersproject/blob/main/backend/routes.py): `backend/routes.py`

### Social features

- [Accounts](https://github.com/nlkris/tigersproject/blob/main/backend/routes.py): `backend/routes.py`
- [User discovery](https://github.com/nlkris/tigersproject/blob/main/backend/routes.py): `backend/routes.py`
- [Feed](https://github.com/nlkris/tigersproject/blob/main/backend/routes.py): `backend/routes.py`
- [Profiles](https://github.com/nlkris/tigersproject/blob/main/backend/routes.py): `backend/routes.py`
- [Comments and replies](https://github.com/nlkris/tigersproject/blob/main/backend/routes.py): `backend/routes.py`
- [Retweets](https://github.com/nlkris/tigersproject/blob/main/backend/routes.py): `backend/routes.py`
- [Notifications](https://github.com/nlkris/tigersproject/blob/main/backend/routes.py): `backend/routes.py`

### JSON persistence

- [Data manager](https://github.com/nlkris/tigersproject/blob/main/utils/data_manager.py): `utils/data_manager.py`
- [Users JSON](https://github.com/nlkris/tigersproject/blob/main/data/users.json): `data/users.json`
- [Tweets JSON](https://github.com/nlkris/tigersproject/blob/main/data/tweets.json): `data/tweets.json`
- [Notifications JSON](https://github.com/nlkris/tigersproject/blob/main/backend/data/notifications.json): `backend/data/notifications.json`

### Web views

- [Feed template](https://github.com/nlkris/tigersproject/blob/main/templates/feed.html): `templates/feed.html`

### Other components

- **Visitor**

## Connections

- Flask app → Route handlers: registers blueprint (evidence: `app.py`)
- Visitor → Route handlers: sends requests (evidence: `backend/routes.py`)
- Route handlers → Data manager: uses helpers (evidence: `backend/routes.py`)
- Flask app → Data manager: initializes data (evidence: `app.py`)
- Route handlers → Feed template: renders (evidence: `backend/routes.py`)
- Data manager → Users JSON: reads and writes (evidence: `utils/data_manager.py`)
- Data manager → Tweets JSON: reads and writes (evidence: `utils/data_manager.py`)
- Data manager → Notifications JSON: reads and writes (evidence: `utils/data_manager.py`)
- Route handlers → Notifications: adds notifications (evidence: `backend/routes.py`)
