# priscila55/calendar architecture

> Architecture diagram of the GitHub repository priscila55/calendar, 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/priscila55/calendar
- Repository: https://github.com/priscila55/calendar

## Overview

This Flask calendar app is intended to help users manage tasks and goals. The principal workflow is account sign-in followed by viewing a calendar and managing dated tasks; the README also describes goal tracking. The sampled code shows authentication and task retrieval/saving, but not goal-management routes or calendar-to-API JavaScript, so those documented capabilities are represented without inferred call edges. The tree and excerpts reveal overlapping app setup and calendar routes; the graph reflects the sampled registration and route code rather than resolving that ambiguity.

Main entry points: [`auth.py`](https://github.com/priscila55/calendar/blob/main/auth.py) (Authentication routes), [`__init__.py`](https://github.com/priscila55/calendar/blob/main/__init__.py) (App factory), [`views.py`](https://github.com/priscila55/calendar/blob/main/views.py) (Page routes), [`calendar_routes.py`](https://github.com/priscila55/calendar/blob/main/calendar_routes.py) (Calendar and task routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_entry["Flask entry<br/>[main.py]"]
  node_app["App factory<br/>[__init__.py]"]
  node_views["Page routes<br/>[views.py]"]
  node_home["Home page<br/>[home.html]"]
  node_profile["Profile page<br/>[profile.html]"]
end

subgraph group_identity["Identity"]
  node_auth["Authentication routes<br/>[auth.py]"]
  node_authpages["Login and signup<br/>[login.html]"]
  node_userlookup["User lookup<br/>[models.py]"]
  node_loginstate["Login session and loader<br/>[__init__.py]"]
end

subgraph group_planning["Calendar and planning"]
  node_calendarroute["Calendar and task routes<br/>[calendar_routes.py]"]
  node_calendarui["Calendar page<br/>[calendar.html]"]
  node_calendarjs["Calendar rendering<br/>[calendar.js]"]
  node_goaltracking["Goal tracking<br/>[models.py]"]
end

subgraph group_data["Persistence"]
  node_taskstore[("Task records<br/>[calendar_routes.py]")]
  node_userstore[("User records<br/>[models.py]")]
end

node_user(("Calendar user"))
node_mysql[("MySQL service")]

node_user -->|"opens app"| node_entry
node_entry -->|"creates app"| node_app
node_app -->|"registers routes"| node_views
node_app -->|"registers routes"| node_auth
node_app -->|"registers routes"| node_calendarroute
node_user -->|"views home"| node_home
node_views -->|"renders"| node_home
node_views -->|"renders"| node_profile
node_user -->|"submits credentials"| node_authpages
node_auth -->|"renders"| node_authpages
node_auth -->|"looks up user"| node_userlookup
node_auth -->|"inserts account"| node_userstore
node_userlookup -->|"queries users"| node_mysql
node_auth -->|"logs in or out"| node_loginstate
node_loginstate -->|"loads user"| node_mysql
node_user -->|"views calendar"| node_calendarui
node_calendarroute -->|"renders"| node_calendarui
node_calendarjs -->|"renders dates"| node_calendarui
node_calendarroute -->|"reads and writes tasks"| node_taskstore
node_taskstore -->|"persists tasks"| node_mysql
node_user -->|"tracks goals"| node_goaltracking
node_goaltracking -->|"queries goals"| node_mysql

click node_entry "https://github.com/priscila55/calendar/blob/main/main.py"
click node_app "https://github.com/priscila55/calendar/blob/main/__init__.py"
click node_views "https://github.com/priscila55/calendar/blob/main/views.py"
click node_home "https://github.com/priscila55/calendar/blob/main/home.html"
click node_profile "https://github.com/priscila55/calendar/blob/main/profile.html"
click node_auth "https://github.com/priscila55/calendar/blob/main/auth.py"
click node_authpages "https://github.com/priscila55/calendar/blob/main/login.html"
click node_userlookup "https://github.com/priscila55/calendar/blob/main/models.py"
click node_loginstate "https://github.com/priscila55/calendar/blob/main/__init__.py"
click node_calendarroute "https://github.com/priscila55/calendar/blob/main/calendar_routes.py"
click node_calendarui "https://github.com/priscila55/calendar/blob/main/calendar.html"
click node_calendarjs "https://github.com/priscila55/calendar/blob/main/calendar.js"
click node_goaltracking "https://github.com/priscila55/calendar/blob/main/models.py"
click node_taskstore "https://github.com/priscila55/calendar/blob/main/calendar_routes.py"
click node_userstore "https://github.com/priscila55/calendar/blob/main/models.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_entry,node_app,node_views,node_home,node_profile,node_user toneBlue
class node_auth,node_authpages,node_userlookup,node_loginstate,node_mysql toneAmber
class node_calendarroute,node_calendarui,node_calendarjs,node_goaltracking toneMint
class node_taskstore,node_userstore toneRose
```

## Components

### Web application

- [Flask entry](https://github.com/priscila55/calendar/blob/main/main.py): `main.py`
- [App factory](https://github.com/priscila55/calendar/blob/main/__init__.py): `__init__.py`
- [Page routes](https://github.com/priscila55/calendar/blob/main/views.py): `views.py`
- [Home page](https://github.com/priscila55/calendar/blob/main/home.html): `home.html`
- [Profile page](https://github.com/priscila55/calendar/blob/main/profile.html): `profile.html`

### Identity

- [Authentication routes](https://github.com/priscila55/calendar/blob/main/auth.py): `auth.py`
- [Login and signup](https://github.com/priscila55/calendar/blob/main/login.html): `login.html`
- [User lookup](https://github.com/priscila55/calendar/blob/main/models.py): `models.py`
- [Login session and loader](https://github.com/priscila55/calendar/blob/main/__init__.py): `__init__.py`

### Calendar and planning

- [Calendar and task routes](https://github.com/priscila55/calendar/blob/main/calendar_routes.py): `calendar_routes.py`
- [Calendar page](https://github.com/priscila55/calendar/blob/main/calendar.html): `calendar.html`
- [Calendar rendering](https://github.com/priscila55/calendar/blob/main/calendar.js): `calendar.js`
- [Goal tracking](https://github.com/priscila55/calendar/blob/main/models.py): `models.py`

### Persistence

- [Task records](https://github.com/priscila55/calendar/blob/main/calendar_routes.py): `calendar_routes.py`
- [User records](https://github.com/priscila55/calendar/blob/main/models.py): `models.py`

### Other components

- **Calendar user**
- **MySQL service**

## Connections

- Calendar user → Flask entry: opens app (evidence: `README.md`)
- Flask entry → App factory: creates app (evidence: `main.py`)
- App factory → Page routes: registers routes (evidence: `__init__.py`)
- App factory → Authentication routes: registers routes (evidence: `__init__.py`)
- App factory → Calendar and task routes: registers routes (evidence: `__init__.py`)
- Calendar user → Home page: views home (evidence: `README.md`)
- Page routes → Home page: renders (evidence: `views.py`)
- Page routes → Profile page: renders (evidence: `views.py`)
- Calendar user → Login and signup: submits credentials (evidence: `README.md`)
- Authentication routes → Login and signup: renders (evidence: `auth.py`)
- Authentication routes → User lookup: looks up user (evidence: `auth.py`)
- Authentication routes → User records: inserts account (evidence: `auth.py`)
- User lookup → MySQL service: queries users (evidence: `models.py`)
- Authentication routes → Login session and loader: logs in or out (evidence: `auth.py`)
- Login session and loader → MySQL service: loads user (evidence: `__init__.py`)
- Calendar user → Calendar page: views calendar (evidence: `README.md`)
- Calendar and task routes → Calendar page: renders (evidence: `calendar_routes.py`)
- Calendar rendering → Calendar page: renders dates (evidence: `calendar.js`)
- Calendar and task routes → Task records: reads and writes tasks (evidence: `calendar_routes.py`)
- Task records → MySQL service: persists tasks (evidence: `calendar_routes.py`)
- Calendar user → Goal tracking: tracks goals (evidence: `README.md`)
- Goal tracking → MySQL service: queries goals (evidence: `models.py`)
