# anushkalaheri/hack_heritage-3.0_-her-voice- architecture

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

- Interactive diagram: https://gitdiagram.com/anushkalaheri/hack_heritage-3.0_-her-voice-
- Repository: https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-

## Overview

This is a women’s safety and empowerment web app. Users authenticate, then navigate a protected hub for community posts, AI legal guidance, emergency help, equality resources, government schemes, and skill exchange. The frontend routes pages and uses Redux slices or API clients to manage requests; Flask provides the API, with equality models and routes separated from the main application file. The README documents additional product capabilities and endpoints, but most backend implementation details were not sampled, so those links are documentation-based rather than code-verified.

Main entry points: [`frontend/src/App.tsx`](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/App.tsx) (Route shell), [`frontend/src/api/axios.ts`](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/api/axios.ts) (HTTP client), [`backend/app.py`](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/backend/app.py) (Flask API), [`frontend/src/pages/Home/Home.tsx`](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/pages/Home/Home.tsx) (Home dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry and identity"]
  node_routes["Route shell<br/>[App.tsx]"]
  node_authpages["Login and register<br/>[Login.tsx]"]
  node_authstate["Authentication state<br/>[authSlice.ts]"]
  node_api["HTTP client<br/>[axios.ts]"]
end

subgraph group_community["Community and skills"]
  node_posts["Community posts<br/>[Posts.tsx]"]
  node_poststate["Posts state<br/>[postsSlice.ts]"]
  node_skills["Skill exchange<br/>[SkillSwap.tsx]"]
  node_skillapi["Skill exchange API<br/>[skillSwapApi.ts]"]
  node_home["Home dashboard<br/>[Home.tsx]"]
end

subgraph group_safety["Safety and guidance"]
  node_chat["AI legal assistant<br/>[Chatbot.tsx]"]
  node_chatdialog["Chat assistant dialog<br/>[ChatbotDialog.tsx]"]
  node_emergency["Emergency help<br/>[Emergency.tsx]"]
  node_sos["SOS alert control<br/>[SOSButton.tsx]"]
  node_emergstate["Emergency state<br/>[emergencySlice.ts]"]
  node_emergapi["Emergency API<br/>[emergencyApi.ts]"]
  node_schemes["Government schemes<br/>[Schemes.tsx]"]
end

subgraph group_equality["Equality and backend"]
  node_equalitypages["Equality hub"]
  node_equalitystate["Equality state<br/>[equalitySlice.ts]"]
  node_equalityroutes["Equality routes<br/>[equality_routes.py]"]
  node_equalitymodels[("Equality records<br/>[equality_models.py]")]
  node_backend["Flask API<br/>[app.py]"]
end

node_user(("User"))
node_db[("Application database")]
node_external{{"External services"}}

node_user -->|"opens app"| node_routes
node_routes -->|"routes to"| node_authpages
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_posts
node_routes -->|"routes to"| node_chat
node_routes -->|"routes to"| node_emergency
node_routes -->|"routes to"| node_equalitypages
node_routes -->|"routes to"| node_schemes
node_routes -->|"routes to"| node_skills
node_authpages -->|"dispatches"| node_authstate
node_authstate -->|"sends requests"| node_api
node_posts -->|"dispatches"| node_poststate
node_poststate -->|"sends requests"| node_api
node_home -->|"loads posts"| node_poststate
node_home -->|"loads nearby help"| node_emergstate
node_home -->|"loads dashboard"| node_equalitystate
node_skills -->|"uses"| node_skillapi
node_skillapi -->|"sends requests"| node_api
node_chat -->|"sends queries"| node_api
node_chatdialog -->|"dispatches chat state"| node_api
node_emergency -->|"dispatches"| node_emergstate
node_emergency -->|"gets contacts"| node_emergapi
node_sos -->|"starts and updates SOS"| node_emergapi
node_emergstate -->|"sends requests"| node_api
node_equalitypages -->|"dispatches"| node_equalitystate
node_equalitystate -->|"sends requests"| node_api
node_api -.->|"calls API"| node_backend
node_skillapi -->|"calls skill endpoints"| node_backend
node_backend -->|"delegates equality"| node_equalityroutes
node_equalityroutes -->|"uses records"| node_equalitymodels
node_backend -.->|"persists app data"| node_db
node_backend -.->|"integrates AI and location"| node_external

click node_routes "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/App.tsx"
click node_authpages "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/pages/Auth/Login.tsx"
click node_authstate "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/store/slices/authSlice.ts"
click node_api "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/api/axios.ts"
click node_posts "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/pages/Posts/Posts.tsx"
click node_poststate "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/store/slices/postsSlice.ts"
click node_skills "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/pages/SkillSwap/SkillSwap.tsx"
click node_skillapi "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/api/skillSwapApi.ts"
click node_home "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/pages/Home/Home.tsx"
click node_chat "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/pages/Chatbot/Chatbot.tsx"
click node_chatdialog "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/components/Chatbot/ChatbotDialog.tsx"
click node_emergency "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/pages/Emergency/Emergency.tsx"
click node_sos "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/components/SOS/SOSButton.tsx"
click node_emergstate "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/store/slices/emergencySlice.ts"
click node_emergapi "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/api/emergencyApi.ts"
click node_schemes "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/pages/Schemes/Schemes.tsx"
click node_equalitypages "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/pages/Equality/CompleteEquality.tsx"
click node_equalitystate "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/store/slices/equalitySlice.ts"
click node_equalityroutes "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/backend/routes/equality_routes.py"
click node_equalitymodels "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/backend/models/equality_models.py"
click node_backend "https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/backend/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_routes,node_authpages,node_authstate,node_api,node_user toneBlue
class node_posts,node_poststate,node_skills,node_skillapi,node_home,node_db toneAmber
class node_chat,node_chatdialog,node_emergency,node_sos,node_emergstate,node_emergapi,node_schemes toneMint
class node_equalitypages,node_equalitystate,node_equalityroutes,node_equalitymodels,node_backend toneRose
class node_external toneIndigo
```

## Components

### App entry and identity

- [Route shell](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Login and register](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/pages/Auth/Login.tsx): `frontend/src/pages/Auth/Login.tsx`
- [Authentication state](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/store/slices/authSlice.ts): `frontend/src/store/slices/authSlice.ts`
- [HTTP client](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/api/axios.ts): `frontend/src/api/axios.ts`

### Community and skills

- [Community posts](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/pages/Posts/Posts.tsx): `frontend/src/pages/Posts/Posts.tsx`
- [Posts state](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/store/slices/postsSlice.ts): `frontend/src/store/slices/postsSlice.ts`
- [Skill exchange](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/pages/SkillSwap/SkillSwap.tsx): `frontend/src/pages/SkillSwap/SkillSwap.tsx`
- [Skill exchange API](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/api/skillSwapApi.ts): `frontend/src/api/skillSwapApi.ts`
- [Home dashboard](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/pages/Home/Home.tsx): `frontend/src/pages/Home/Home.tsx`

### Safety and guidance

- [AI legal assistant](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/pages/Chatbot/Chatbot.tsx): `frontend/src/pages/Chatbot/Chatbot.tsx`
- [Chat assistant dialog](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/components/Chatbot/ChatbotDialog.tsx): `frontend/src/components/Chatbot/ChatbotDialog.tsx`
- [Emergency help](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/pages/Emergency/Emergency.tsx): `frontend/src/pages/Emergency/Emergency.tsx`
- [SOS alert control](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/components/SOS/SOSButton.tsx): `frontend/src/components/SOS/SOSButton.tsx`
- [Emergency state](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/store/slices/emergencySlice.ts): `frontend/src/store/slices/emergencySlice.ts`
- [Emergency API](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/api/emergencyApi.ts): `frontend/src/api/emergencyApi.ts`
- [Government schemes](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/pages/Schemes/Schemes.tsx): `frontend/src/pages/Schemes/Schemes.tsx`

### Equality and backend

- [Equality hub](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/pages/Equality/CompleteEquality.tsx): `frontend/src/pages/Equality/CompleteEquality.tsx`
- [Equality state](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/frontend/src/store/slices/equalitySlice.ts): `frontend/src/store/slices/equalitySlice.ts`
- [Equality routes](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/backend/routes/equality_routes.py): `backend/routes/equality_routes.py`
- [Equality records](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/backend/models/equality_models.py): `backend/models/equality_models.py`
- [Flask API](https://github.com/anushkalaheri/hack_heritage-3.0_-her-voice-/blob/main/backend/app.py): `backend/app.py`

### Other components

- **User**
- **Application database**
- **External services**

## Connections

- User → Route shell: opens app (evidence: `frontend/src/App.tsx`)
- Route shell → Login and register: routes to (evidence: `frontend/src/App.tsx`)
- Route shell → Home dashboard: routes to (evidence: `frontend/src/App.tsx`)
- Route shell → Community posts: routes to (evidence: `frontend/src/App.tsx`)
- Route shell → AI legal assistant: routes to (evidence: `frontend/src/App.tsx`)
- Route shell → Emergency help: routes to (evidence: `frontend/src/App.tsx`)
- Route shell → Equality hub: routes to (evidence: `frontend/src/App.tsx`)
- Route shell → Government schemes: routes to (evidence: `frontend/src/App.tsx`)
- Route shell → Skill exchange: routes to (evidence: `frontend/src/App.tsx`)
- Login and register → Authentication state: dispatches (evidence: `frontend/src/pages/Auth/Login.tsx`)
- Authentication state → HTTP client: sends requests (evidence: `frontend/src/store/slices/authSlice.ts`)
- Community posts → Posts state: dispatches (evidence: `frontend/src/pages/Posts/Posts.tsx`)
- Posts state → HTTP client: sends requests (evidence: `frontend/src/store/slices/postsSlice.ts`)
- Home dashboard → Posts state: loads posts (evidence: `frontend/src/pages/Home/Home.tsx`)
- Home dashboard → Emergency state: loads nearby help (evidence: `frontend/src/pages/Home/Home.tsx`)
- Home dashboard → Equality state: loads dashboard (evidence: `frontend/src/pages/Home/Home.tsx`)
- Skill exchange → Skill exchange API: uses (evidence: `frontend/src/pages/SkillSwap/SkillSwap.tsx`)
- Skill exchange API → HTTP client: sends requests (evidence: `frontend/src/api/skillSwapApi.ts`)
- AI legal assistant → HTTP client: sends queries (evidence: `frontend/src/pages/Chatbot/Chatbot.tsx`)
- Chat assistant dialog → HTTP client: dispatches chat state (evidence: `frontend/src/components/Chatbot/ChatbotDialog.tsx`)
- Emergency help → Emergency state: dispatches (evidence: `frontend/src/pages/Emergency/Emergency.tsx`)
- Emergency help → Emergency API: gets contacts (evidence: `frontend/src/pages/Emergency/Emergency.tsx`)
- SOS alert control → Emergency API: starts and updates SOS (evidence: `frontend/src/components/SOS/SOSButton.tsx`)
- Emergency state → HTTP client: sends requests (evidence: `frontend/src/store/slices/emergencySlice.ts`)
- Equality hub → Equality state: dispatches (evidence: `frontend/src/pages/Equality/CompleteEquality.tsx`)
- Equality state → HTTP client: sends requests (evidence: `frontend/src/store/slices/equalitySlice.ts`)
- HTTP client → Flask API: calls API (evidence: `README.md`)
- Skill exchange API → Flask API: calls skill endpoints (evidence: `frontend/src/api/skillSwapApi.ts`)
- Flask API → Equality routes: delegates equality (evidence: `backend/routes/equality_routes.py`)
- Equality routes → Equality records: uses records (evidence: `backend/routes/equality_routes.py`)
- Flask API → Application database: persists app data (evidence: `README.md`)
- Flask API → External services: integrates AI and location (evidence: `README.md`)
