# arjitbhatnagar3-hue/eway-financial-website architecture

> Architecture diagram of the GitHub repository arjitbhatnagar3-hue/eway-financial-website, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arjitbhatnagar3-hue/eway-financial-website
- Repository: https://github.com/arjitbhatnagar3-hue/eway-financial-website

## Overview

EWAY Financial Consultancy’s product is a data-driven company website with enquiry submission and cookie-based accounts. Visitors load the static site, which fetches company, service, leadership, compliance, statistics, testimonial and FAQ content from the FastAPI backend for rendering. Separate flows submit enquiries and sign up, log in, check the current account or log out. The README documents JSON-file persistence for enquiries, users and sessions. Source excerpts are partial, so the graph shows only documented or evidenced connections; authentication page loading and some endpoint details are not expanded.

Main entry points: [`company_data.py`](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/company_data.py) (Company content models), [`static/js/app.js`](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/static/js/app.js) (Homepage behavior), [`main.py`](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/main.py) (Account and session API), [`static/index.html`](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/static/index.html) (Company homepage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Website"]
  node_site["Company homepage<br/>[index.html]"]
  node_authpages["Account pages<br/>[login.html]"]
  node_sitejs["Homepage behavior<br/>[app.js]"]
  node_authjs["Account forms<br/>[auth.js]"]
end

subgraph group_api["Backend API"]
  node_server["FastAPI application<br/>[main.py]"]
  node_companyapi["Company information API<br/>[main.py]"]
  node_contactapi["Enquiry submission<br/>[main.py]"]
  node_authapi["Account and session API<br/>[main.py]"]
  node_stats["Headline statistics<br/>[main.py]"]
end

subgraph group_content["Company Content"]
  node_companydata["Company content models<br/>[company_data.py]"]
  node_company["Company details<br/>[company_data.py]"]
  node_services["Advisory services<br/>[company_data.py]"]
  node_leadership["Directors<br/>[company_data.py]"]
  node_compliance["Compliance status<br/>[company_data.py]"]
  node_socialproof["Testimonials and FAQ<br/>[company_data.py]"]
end

subgraph group_state["Persistent State"]
  node_enquiries[("Enquiry records<br/>[main.py]")]
  node_users[("User records<br/>[main.py]")]
  node_sessions[("Session records<br/>[main.py]")]
end

node_visitor(("Site visitor"))

node_visitor -->|"opens"| node_site
node_visitor -->|"opens"| node_authpages
node_site -->|"loads"| node_sitejs
node_sitejs -->|"fetches content"| node_companyapi
node_companyapi -->|"reads models"| node_companydata
node_companydata -->|"defines"| node_company
node_companydata -->|"defines"| node_services
node_companydata -->|"defines"| node_leadership
node_companydata -->|"defines"| node_compliance
node_companydata -->|"defines"| node_socialproof
node_companyapi -->|"computes"| node_stats
node_sitejs -->|"posts enquiry"| node_contactapi
node_contactapi -->|"writes"| node_enquiries
node_authpages -->|"loads"| node_authjs
node_authjs -->|"posts credentials"| node_authapi
node_sitejs -->|"checks or ends session"| node_authapi
node_authapi -->|"reads and writes"| node_users
node_authapi -->|"reads and writes"| node_sessions
node_server -->|"serves page"| node_site
node_server -->|"serves pages"| node_authpages

click node_site "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/static/index.html"
click node_authpages "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/static/login.html"
click node_sitejs "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/static/js/app.js"
click node_authjs "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/static/js/auth.js"
click node_server "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/main.py"
click node_companyapi "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/main.py"
click node_contactapi "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/main.py"
click node_authapi "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/main.py"
click node_companydata "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/company_data.py"
click node_company "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/company_data.py"
click node_services "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/company_data.py"
click node_leadership "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/company_data.py"
click node_compliance "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/company_data.py"
click node_socialproof "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/company_data.py"
click node_stats "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/main.py"
click node_enquiries "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/main.py"
click node_users "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/main.py"
click node_sessions "https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/main.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_site,node_authpages,node_sitejs,node_authjs toneBlue
class node_server,node_companyapi,node_contactapi,node_authapi,node_stats toneAmber
class node_companydata,node_company,node_services,node_leadership,node_compliance,node_socialproof toneMint
class node_enquiries,node_users,node_sessions toneRose
class node_visitor toneIndigo
```

## Components

### Website

- [Company homepage](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/static/index.html): `static/index.html`
- [Account pages](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/static/login.html): `static/login.html`
- [Homepage behavior](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/static/js/app.js): `static/js/app.js`
- [Account forms](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/static/js/auth.js): `static/js/auth.js`

### Backend API

- [FastAPI application](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/main.py): `main.py`
- [Company information API](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/main.py): `main.py`
- [Enquiry submission](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/main.py): `main.py`
- [Account and session API](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/main.py): `main.py`
- [Headline statistics](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/main.py): `main.py`

### Company Content

- [Company content models](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/company_data.py): `company_data.py`
- [Company details](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/company_data.py): `company_data.py`
- [Advisory services](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/company_data.py): `company_data.py`
- [Directors](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/company_data.py): `company_data.py`
- [Compliance status](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/company_data.py): `company_data.py`
- [Testimonials and FAQ](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/company_data.py): `company_data.py`

### Persistent State

- [Enquiry records](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/main.py): `main.py`
- [User records](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/main.py): `main.py`
- [Session records](https://github.com/arjitbhatnagar3-hue/eway-financial-website/blob/main/main.py): `main.py`

### Other components

- **Site visitor**

## Connections

- Site visitor → Company homepage: opens
- Site visitor → Account pages: opens
- Company homepage → Homepage behavior: loads
- Homepage behavior → Company information API: fetches content
- Company information API → Company content models: reads models
- Company content models → Company details: defines
- Company content models → Advisory services: defines
- Company content models → Directors: defines
- Company content models → Compliance status: defines
- Company content models → Testimonials and FAQ: defines
- Company information API → Headline statistics: computes
- Homepage behavior → Enquiry submission: posts enquiry
- Enquiry submission → Enquiry records: writes
- Account pages → Account forms: loads
- Account forms → Account and session API: posts credentials
- Homepage behavior → Account and session API: checks or ends session
- Account and session API → User records: reads and writes
- Account and session API → Session records: reads and writes
- FastAPI application → Company homepage: serves page
- FastAPI application → Account pages: serves pages
