# rosuz/l9adar architecture

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

- Interactive diagram: https://gitdiagram.com/rosuz/l9adar
- Repository: https://github.com/rosuz/l9adar

## Overview

L9aDar is a roommate-planning product: students create a housing plan, find compatible roommates, coordinate by chat, and form a group. The README documents authentication, profiles, housing preferences, rent splitting, matches, messaging, invitations, plan management, and safety/settings. The sampled code is only a thin health-check skeleton, so those product capabilities are shown as documented but not verified as implemented or wired. The evidenced runtime currently connects the frontend readiness check to the backend, which checks database readiness; the AI service exposes an independent health endpoint.

Main entry points: [`backend/src`](https://github.com/rosuz/l9adar/tree/main/backend/src) (Housing plan), [`backend/src/app.js`](https://github.com/rosuz/l9adar/blob/main/backend/src/app.js) (HTTP API), [`frontend/src/App.jsx`](https://github.com/rosuz/l9adar/blob/main/frontend/src/App.jsx) (Web app), [`backend/src/server.js`](https://github.com/rosuz/l9adar/blob/main/backend/src/server.js) (Backend server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client"]
  node_webapp["Web app<br/>[App.jsx]"]
  node_auth["Account access"]
  node_profile["Student profile"]
  node_settings["Account settings"]
end

subgraph group_planning["Housing planning"]
  node_housing["Housing plan"]
  node_preferences["Living preferences"]
  node_rent["Rent split"]
  node_planmembers["Plan membership"]
  node_myplan["Plan overview"]
end

subgraph group_coordination["Roommate coordination"]
  node_matching["Roommate matches"]
  node_saved["Saved profiles"]
  node_messaging["Direct messaging"]
  node_homechat["Home sharing"]
  node_safety["Safety actions"]
end

subgraph group_runtime["Runtime services"]
  node_api["HTTP API<br/>[app.js]"]
  node_server["Backend server<br/>[server.js]"]
  node_database[("Application database<br/>[schema.prisma]")]
  node_ai["AI service<br/>[main.py]"]
end

node_student(("Student"))

node_student -->|"uses"| node_webapp
node_student -->|"creates account"| node_auth
node_student -->|"sets up"| node_profile
node_student -->|"creates plan"| node_housing
node_housing -->|"records"| node_preferences
node_housing -->|"estimates rent"| node_rent
node_student -->|"finds roommates"| node_matching
node_matching -->|"saves profile"| node_saved
node_student -->|"starts conversation"| node_messaging
node_messaging -->|"shares home"| node_homechat
node_messaging -->|"leads to invitation"| node_planmembers
node_planmembers -->|"updates group"| node_myplan
node_student -->|"blocks or reports"| node_safety
node_student -->|"manages account"| node_settings
node_webapp -->|"checks readiness"| node_api
node_server -->|"creates app"| node_api
node_api -->|"checks readiness"| node_database

click node_webapp "https://github.com/rosuz/l9adar/blob/main/frontend/src/App.jsx"
click node_auth "https://github.com/rosuz/l9adar/tree/main/frontend/src"
click node_profile "https://github.com/rosuz/l9adar/tree/main/frontend/src"
click node_housing "https://github.com/rosuz/l9adar/tree/main/backend/src"
click node_preferences "https://github.com/rosuz/l9adar/tree/main/backend/src"
click node_rent "https://github.com/rosuz/l9adar/tree/main/backend/src"
click node_matching "https://github.com/rosuz/l9adar/tree/main/backend/src"
click node_saved "https://github.com/rosuz/l9adar/tree/main/backend/src"
click node_messaging "https://github.com/rosuz/l9adar/tree/main/backend/src"
click node_homechat "https://github.com/rosuz/l9adar/tree/main/backend/src"
click node_planmembers "https://github.com/rosuz/l9adar/tree/main/backend/src"
click node_myplan "https://github.com/rosuz/l9adar/tree/main/backend/src"
click node_safety "https://github.com/rosuz/l9adar/tree/main/backend/src"
click node_settings "https://github.com/rosuz/l9adar/tree/main/backend/src"
click node_api "https://github.com/rosuz/l9adar/blob/main/backend/src/app.js"
click node_server "https://github.com/rosuz/l9adar/blob/main/backend/src/server.js"
click node_database "https://github.com/rosuz/l9adar/blob/main/backend/prisma/schema.prisma"
click node_ai "https://github.com/rosuz/l9adar/blob/main/ai-service/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_webapp,node_auth,node_profile,node_settings toneBlue
class node_housing,node_preferences,node_rent,node_planmembers,node_myplan toneAmber
class node_matching,node_saved,node_messaging,node_homechat,node_safety toneMint
class node_api,node_server,node_database,node_ai toneRose
class node_student toneIndigo
```

## Components

### Client

- [Web app](https://github.com/rosuz/l9adar/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Account access](https://github.com/rosuz/l9adar/tree/main/frontend/src): `frontend/src`
- [Student profile](https://github.com/rosuz/l9adar/tree/main/frontend/src): `frontend/src`
- [Account settings](https://github.com/rosuz/l9adar/tree/main/backend/src): `backend/src`

### Housing planning

- [Housing plan](https://github.com/rosuz/l9adar/tree/main/backend/src): `backend/src`
- [Living preferences](https://github.com/rosuz/l9adar/tree/main/backend/src): `backend/src`
- [Rent split](https://github.com/rosuz/l9adar/tree/main/backend/src): `backend/src`
- [Plan membership](https://github.com/rosuz/l9adar/tree/main/backend/src): `backend/src`
- [Plan overview](https://github.com/rosuz/l9adar/tree/main/backend/src): `backend/src`

### Roommate coordination

- [Roommate matches](https://github.com/rosuz/l9adar/tree/main/backend/src): `backend/src`
- [Saved profiles](https://github.com/rosuz/l9adar/tree/main/backend/src): `backend/src`
- [Direct messaging](https://github.com/rosuz/l9adar/tree/main/backend/src): `backend/src`
- [Home sharing](https://github.com/rosuz/l9adar/tree/main/backend/src): `backend/src`
- [Safety actions](https://github.com/rosuz/l9adar/tree/main/backend/src): `backend/src`

### Runtime services

- [HTTP API](https://github.com/rosuz/l9adar/blob/main/backend/src/app.js): `backend/src/app.js`
- [Backend server](https://github.com/rosuz/l9adar/blob/main/backend/src/server.js): `backend/src/server.js`
- [Application database](https://github.com/rosuz/l9adar/blob/main/backend/prisma/schema.prisma): `backend/prisma/schema.prisma`
- [AI service](https://github.com/rosuz/l9adar/blob/main/ai-service/app/main.py): `ai-service/app/main.py`

### Other components

- **Student**

## Connections

- Student → Web app: uses (evidence: `README.md`)
- Student → Account access: creates account (evidence: `README.md`)
- Student → Student profile: sets up (evidence: `README.md`)
- Student → Housing plan: creates plan (evidence: `README.md`)
- Housing plan → Living preferences: records (evidence: `README.md`)
- Housing plan → Rent split: estimates rent (evidence: `README.md`)
- Student → Roommate matches: finds roommates (evidence: `README.md`)
- Roommate matches → Saved profiles: saves profile (evidence: `README.md`)
- Student → Direct messaging: starts conversation (evidence: `README.md`)
- Direct messaging → Home sharing: shares home (evidence: `README.md`)
- Direct messaging → Plan membership: leads to invitation (evidence: `README.md`)
- Plan membership → Plan overview: updates group (evidence: `README.md`)
- Student → Safety actions: blocks or reports (evidence: `README.md`)
- Student → Account settings: manages account (evidence: `README.md`)
- Web app → HTTP API: checks readiness (evidence: `frontend/src/App.jsx`)
- Backend server → HTTP API: creates app (evidence: `backend/src/server.js`)
- HTTP API → Application database: checks readiness (evidence: `backend/src/app.js`)
