# akshithkl/dailyconnect architecture

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

- Interactive diagram: https://gitdiagram.com/akshithkl/dailyconnect
- Repository: https://github.com/akshithkl/dailyconnect

## Overview

DailyConnect is a social sharing and messaging application. A user enters through the React client, which communicates with FastAPI; the backend authenticates requests and serves profile/search, photo-feed, and conversation features backed by relational data and image storage. The graph separates these user-facing domains from shared authentication and persistence layers. Several central files were not excerpted, so their internal calls are shown only where the README or source index supports the relationship.

Main entry points: [`backend/app/main.py`](https://github.com/akshithkl/dailyconnect/blob/main/backend/app/main.py) (FastAPI application), [`backend/app/routers/users.py`](https://github.com/akshithkl/dailyconnect/blob/main/backend/app/routers/users.py) (Profiles and search), [`backend/app/routers/posts.py`](https://github.com/akshithkl/dailyconnect/blob/main/backend/app/routers/posts.py) (Posts and feed), [`backend/app/routers/messages.py`](https://github.com/akshithkl/dailyconnect/blob/main/backend/app/routers/messages.py) (Conversations and chat)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_react["React application<br/>[App.jsx]"]
  node_entry["Client entry<br/>[main.jsx]"]
  node_api_client["Axios API client<br/>[api.js]"]
end

subgraph group_identity["Identity and profiles"]
  node_auth["Accounts and login<br/>[auth.py]"]
  node_profile["Profiles and search<br/>[users.py]"]
  node_security["JWT and passwords<br/>[security.py]"]
  node_dependencies["User authorization<br/>[deps.py]"]
end

subgraph group_sharing["Photo sharing"]
  node_posts["Posts and feed<br/>[posts.py]"]
  node_image_storage["Image storage<br/>[storage.py]"]
end

subgraph group_chat["Messaging"]
  node_messages["Conversations and chat<br/>[messages.py]"]
end

subgraph group_platform["Backend platform"]
  node_schemas["Request and response schemas<br/>[schemas.py]"]
  node_models["Domain models<br/>[models.py]"]
  node_database[("SQL database<br/>[database.py]")]
  node_settings["Backend settings<br/>[config.py]"]
  node_api["FastAPI application<br/>[main.py]"]
end

node_user(("Site user"))
node_cloudinary["Cloudinary image service"]

node_user -->|"uses"| node_entry
node_entry -->|"renders"| node_react
node_api_client -->|"sends API requests"| node_api
node_api -->|"registers routes"| node_auth
node_api -->|"registers routes"| node_profile
node_api -->|"registers routes"| node_posts
node_api -->|"registers routes"| node_messages
node_api -->|"creates tables"| node_database
node_api -->|"configures CORS"| node_settings
node_auth -->|"uses authentication"| node_security
node_dependencies -->|"decodes tokens"| node_security
node_dependencies -->|"loads user"| node_database
node_profile -->|"requires user"| node_dependencies
node_posts -->|"requires user"| node_dependencies
node_messages -->|"requires user"| node_dependencies
node_profile -->|"uploads and resolves images"| node_image_storage
node_posts -->|"uploads and deletes images"| node_image_storage
node_messages -->|"resolves image URLs"| node_image_storage
node_posts -->|"validates and serializes"| node_schemas
node_messages -->|"validates and serializes"| node_schemas
node_profile -->|"validates and serializes"| node_schemas
node_posts -->|"reads and writes"| node_models
node_messages -->|"reads and writes"| node_models
node_profile -->|"reads and writes"| node_models
node_models -->|"uses ORM base"| node_database
node_image_storage -.->|"stores images"| node_cloudinary

click node_react "https://github.com/akshithkl/dailyconnect/blob/main/frontend/src/App.jsx"
click node_entry "https://github.com/akshithkl/dailyconnect/blob/main/frontend/src/main.jsx"
click node_api_client "https://github.com/akshithkl/dailyconnect/blob/main/frontend/src/services/api.js"
click node_auth "https://github.com/akshithkl/dailyconnect/blob/main/backend/app/routers/auth.py"
click node_profile "https://github.com/akshithkl/dailyconnect/blob/main/backend/app/routers/users.py"
click node_security "https://github.com/akshithkl/dailyconnect/blob/main/backend/app/core/security.py"
click node_dependencies "https://github.com/akshithkl/dailyconnect/blob/main/backend/app/deps.py"
click node_posts "https://github.com/akshithkl/dailyconnect/blob/main/backend/app/routers/posts.py"
click node_image_storage "https://github.com/akshithkl/dailyconnect/blob/main/backend/app/services/storage.py"
click node_messages "https://github.com/akshithkl/dailyconnect/blob/main/backend/app/routers/messages.py"
click node_schemas "https://github.com/akshithkl/dailyconnect/blob/main/backend/app/schemas.py"
click node_models "https://github.com/akshithkl/dailyconnect/blob/main/backend/app/models.py"
click node_database "https://github.com/akshithkl/dailyconnect/blob/main/backend/app/core/database.py"
click node_settings "https://github.com/akshithkl/dailyconnect/blob/main/backend/app/core/config.py"
click node_api "https://github.com/akshithkl/dailyconnect/blob/main/backend/app/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_react,node_entry,node_api_client,node_user toneBlue
class node_auth,node_profile,node_security,node_dependencies toneAmber
class node_posts,node_image_storage toneMint
class node_messages toneRose
class node_schemas,node_models,node_database,node_settings,node_api,node_cloudinary toneIndigo
```

## Components

### Web client

- [React application](https://github.com/akshithkl/dailyconnect/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Client entry](https://github.com/akshithkl/dailyconnect/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [Axios API client](https://github.com/akshithkl/dailyconnect/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Identity and profiles

- [Accounts and login](https://github.com/akshithkl/dailyconnect/blob/main/backend/app/routers/auth.py): `backend/app/routers/auth.py`
- [Profiles and search](https://github.com/akshithkl/dailyconnect/blob/main/backend/app/routers/users.py): `backend/app/routers/users.py`
- [JWT and passwords](https://github.com/akshithkl/dailyconnect/blob/main/backend/app/core/security.py): `backend/app/core/security.py`
- [User authorization](https://github.com/akshithkl/dailyconnect/blob/main/backend/app/deps.py): `backend/app/deps.py`

### Photo sharing

- [Posts and feed](https://github.com/akshithkl/dailyconnect/blob/main/backend/app/routers/posts.py): `backend/app/routers/posts.py`
- [Image storage](https://github.com/akshithkl/dailyconnect/blob/main/backend/app/services/storage.py): `backend/app/services/storage.py`

### Messaging

- [Conversations and chat](https://github.com/akshithkl/dailyconnect/blob/main/backend/app/routers/messages.py): `backend/app/routers/messages.py`

### Backend platform

- [Request and response schemas](https://github.com/akshithkl/dailyconnect/blob/main/backend/app/schemas.py): `backend/app/schemas.py`
- [Domain models](https://github.com/akshithkl/dailyconnect/blob/main/backend/app/models.py): `backend/app/models.py`
- [SQL database](https://github.com/akshithkl/dailyconnect/blob/main/backend/app/core/database.py): `backend/app/core/database.py`
- [Backend settings](https://github.com/akshithkl/dailyconnect/blob/main/backend/app/core/config.py): `backend/app/core/config.py`
- [FastAPI application](https://github.com/akshithkl/dailyconnect/blob/main/backend/app/main.py): `backend/app/main.py`

### Other components

- **Site user**
- **Cloudinary image service**

## Connections

- Site user → Client entry: uses (evidence: `README.md`)
- Client entry → React application: renders (evidence: `frontend/src/main.jsx`)
- Axios API client → FastAPI application: sends API requests (evidence: `README.md`)
- FastAPI application → Accounts and login: registers routes (evidence: `backend/app/main.py`)
- FastAPI application → Profiles and search: registers routes (evidence: `backend/app/main.py`)
- FastAPI application → Posts and feed: registers routes (evidence: `backend/app/main.py`)
- FastAPI application → Conversations and chat: registers routes (evidence: `backend/app/main.py`)
- FastAPI application → SQL database: creates tables (evidence: `backend/app/main.py`)
- FastAPI application → Backend settings: configures CORS (evidence: `backend/app/main.py`)
- Accounts and login → JWT and passwords: uses authentication (evidence: `README.md`)
- User authorization → JWT and passwords: decodes tokens (evidence: `backend/app/deps.py`)
- User authorization → SQL database: loads user (evidence: `backend/app/deps.py`)
- Profiles and search → User authorization: requires user (evidence: `backend/app/routers/users.py`)
- Posts and feed → User authorization: requires user (evidence: `backend/app/routers/posts.py`)
- Conversations and chat → User authorization: requires user (evidence: `backend/app/routers/messages.py`)
- Profiles and search → Image storage: uploads and resolves images (evidence: `backend/app/routers/users.py`)
- Posts and feed → Image storage: uploads and deletes images (evidence: `backend/app/routers/posts.py`)
- Conversations and chat → Image storage: resolves image URLs (evidence: `backend/app/routers/messages.py`)
- Posts and feed → Request and response schemas: validates and serializes (evidence: `backend/app/routers/posts.py`)
- Conversations and chat → Request and response schemas: validates and serializes (evidence: `backend/app/routers/messages.py`)
- Profiles and search → Request and response schemas: validates and serializes (evidence: `backend/app/routers/users.py`)
- Posts and feed → Domain models: reads and writes (evidence: `backend/app/routers/posts.py`)
- Conversations and chat → Domain models: reads and writes (evidence: `backend/app/routers/messages.py`)
- Profiles and search → Domain models: reads and writes (evidence: `backend/app/routers/users.py`)
- Domain models → SQL database: uses ORM base (evidence: `backend/app/models.py`)
- Image storage → Cloudinary image service: stores images (evidence: `README.md`)
