# lirazn7/dresscode-pwa architecture

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

- Interactive diagram: https://gitdiagram.com/lirazn7/dresscode-pwa
- Repository: https://github.com/lirazn7/dresscode-pwa

## Overview

DressCode is a fashion-social PWA for browsing and sharing outfit posts, managing a digital closet, discovering users, and getting AI styling suggestions. The main user journey runs through the app’s routed screens: authenticate, browse the Vitrine or search, then view profiles, manage closet items, or create a post. Firebase provides authentication, Firestore data, and Storage; image preparation supports uploads. The README also highlights installable PWA behavior. Some screen-to-service links are supported by the source index rather than call-site excerpts; uncertain integration details are omitted.

Main entry points: [`App.js`](https://github.com/lirazn7/dresscode-pwa/blob/main/App.js) (Navigation shell), [`src/database/firebase.js`](https://github.com/lirazn7/dresscode-pwa/blob/main/src/database/firebase.js) (Firebase client), [`src/screens/ProfileScreen.js`](https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/ProfileScreen.js) (User profile), [`src/services/postService.js`](https://github.com/lirazn7/dresscode-pwa/blob/main/src/services/postService.js) (Post operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_app["Navigation shell<br/>[App.js]"]
  node_bottomnav["Bottom navigation<br/>[BottomNav.js]"]
end

subgraph group_social["Fashion social"]
  node_vitrine["Outfit feed<br/>[VitrineScreen.js]"]
  node_postcard["Post card<br/>[PostCard.js]"]
  node_createpost["Create post"]
  node_search["User search<br/>[SearchScreen.js]"]
  node_profile["User profile<br/>[ProfileScreen.js]"]
  node_postservice["Post operations<br/>[postService.js]"]
end

subgraph group_closet["Closet and styling"]
  node_closet["Closet screens<br/>[ClosetScreen.js]"]
  node_closetmain["Closet overview"]
  node_closetcategory["Closet categories"]
  node_stylist["Stylist chat<br/>[StylistChat.js]"]
  node_closetservice["Closet data service<br/>[closetService.js]"]
  node_aiservice["Styling suggestions<br/>[aiService.js]"]
end

subgraph group_identity["Identity and account"]
  node_login["Login<br/>[LoginScreen.js]"]
  node_register["Registration<br/>[RegisterScreen.js]"]
  node_forgot["Password recovery"]
  node_username["Username setup"]
  node_settings["Account settings<br/>[SettingsScreen.js]"]
  node_admin["Admin panel<br/>[AdminScreen.js]"]
  node_authcontext["Session context<br/>[AuthContext.js]"]
  node_authservice["Authentication service<br/>[authService.js]"]
  node_userservice["Profile operations<br/>[userService.js]"]
end

subgraph group_platform["Platform services"]
  node_firebase["Firebase client<br/>[firebase.js]"]
  node_firestore[("Firestore")]
  node_storage[("Firebase Storage")]
  node_image["Image compression<br/>[imageHelper.js]"]
  node_upload["Image upload<br/>[storageService.js]"]
  node_webalert["Web alert bridge<br/>[WebAlertBridge.js]"]
  node_install["Install prompt"]
end

node_person(("Visitor"))
node_pwa["PWA browser runtime"]
node_ai["AI provider"]

node_person -->|"opens"| node_app
node_app -->|"provides session"| node_authcontext
node_app -->|"routes to"| node_vitrine
node_app -->|"routes to"| node_search
node_app -->|"routes to"| node_closet
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_createpost
node_app -->|"renders"| node_stylist
node_app -->|"renders"| node_webalert
node_app -->|"renders"| node_install
node_bottomnav -->|"navigates to"| node_createpost
node_vitrine -->|"loads posts"| node_postservice
node_search -->|"toggles follow"| node_postservice
node_profile -->|"uses post data"| node_postservice
node_profile -->|"saves profile"| node_userservice
node_stylist -->|"loads closet"| node_closetservice
node_stylist -->|"requests advice"| node_aiservice
node_aiservice -.->|"requests suggestions"| node_ai
node_login -->|"authenticates"| node_authservice
node_register -->|"uses Firebase"| node_firebase
node_authservice -->|"authenticates and profiles"| node_firebase
node_authcontext -->|"loads user"| node_firebase
node_userservice -->|"updates records"| node_firebase
node_postservice -->|"reads and writes"| node_firebase
node_closetservice -->|"uses database"| node_firebase
node_closet -->|"compresses uploads"| node_image
node_createpost -->|"compresses images"| node_image
node_profile -->|"compresses avatar"| node_image
node_upload -->|"uses storage client"| node_firebase
node_firebase -->|"initializes"| node_firestore
node_firebase -->|"initializes"| node_storage
node_webalert -.->|"bridges browser alerts"| node_pwa
node_install -->|"offers installation"| node_pwa
node_pwa -->|"installs for"| node_person

click node_app "https://github.com/lirazn7/dresscode-pwa/blob/main/App.js"
click node_bottomnav "https://github.com/lirazn7/dresscode-pwa/blob/main/src/components/BottomNav.js"
click node_vitrine "https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/VitrineScreen.js"
click node_postcard "https://github.com/lirazn7/dresscode-pwa/blob/main/src/components/PostCard.js"
click node_createpost "https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/CreatePostScreen.js"
click node_search "https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/SearchScreen.js"
click node_profile "https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/ProfileScreen.js"
click node_postservice "https://github.com/lirazn7/dresscode-pwa/blob/main/src/services/postService.js"
click node_closet "https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/ClosetScreen.js"
click node_closetmain "https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/ClosetMainScreen.js"
click node_closetcategory "https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/ClosetCategoryScreen.js"
click node_stylist "https://github.com/lirazn7/dresscode-pwa/blob/main/src/components/StylistChat.js"
click node_closetservice "https://github.com/lirazn7/dresscode-pwa/blob/main/src/services/closetService.js"
click node_aiservice "https://github.com/lirazn7/dresscode-pwa/blob/main/src/services/aiService.js"
click node_login "https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/LoginScreen.js"
click node_register "https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/RegisterScreen.js"
click node_forgot "https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/ForgotPasswordScreen.js"
click node_username "https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/SetUsernameScreen.js"
click node_settings "https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/SettingsScreen.js"
click node_admin "https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/AdminScreen.js"
click node_authcontext "https://github.com/lirazn7/dresscode-pwa/blob/main/src/contexts/AuthContext.js"
click node_authservice "https://github.com/lirazn7/dresscode-pwa/blob/main/src/services/authService.js"
click node_userservice "https://github.com/lirazn7/dresscode-pwa/blob/main/src/services/userService.js"
click node_firebase "https://github.com/lirazn7/dresscode-pwa/blob/main/src/database/firebase.js"
click node_image "https://github.com/lirazn7/dresscode-pwa/blob/main/src/utils/imageHelper.js"
click node_upload "https://github.com/lirazn7/dresscode-pwa/blob/main/src/services/storageService.js"
click node_webalert "https://github.com/lirazn7/dresscode-pwa/blob/main/src/components/WebAlertBridge.js"
click node_install "https://github.com/lirazn7/dresscode-pwa/blob/main/src/components/PWAInstallPrompt.js"

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_app,node_bottomnav,node_pwa toneBlue
class node_vitrine,node_postcard,node_createpost,node_search,node_profile,node_postservice toneAmber
class node_closet,node_closetmain,node_closetcategory,node_stylist,node_closetservice,node_aiservice toneMint
class node_login,node_register,node_forgot,node_username,node_settings,node_admin,node_authcontext,node_authservice,node_userservice toneRose
class node_firebase,node_firestore,node_storage,node_image,node_upload,node_webalert,node_install,node_person,node_ai toneIndigo
```

## Components

### App shell

- [Navigation shell](https://github.com/lirazn7/dresscode-pwa/blob/main/App.js): `App.js`
- [Bottom navigation](https://github.com/lirazn7/dresscode-pwa/blob/main/src/components/BottomNav.js): `src/components/BottomNav.js`

### Fashion social

- [Outfit feed](https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/VitrineScreen.js): `src/screens/VitrineScreen.js`
- [Post card](https://github.com/lirazn7/dresscode-pwa/blob/main/src/components/PostCard.js): `src/components/PostCard.js`
- [Create post](https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/CreatePostScreen.js): `src/screens/CreatePostScreen.js`
- [User search](https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/SearchScreen.js): `src/screens/SearchScreen.js`
- [User profile](https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/ProfileScreen.js): `src/screens/ProfileScreen.js`
- [Post operations](https://github.com/lirazn7/dresscode-pwa/blob/main/src/services/postService.js): `src/services/postService.js`

### Closet and styling

- [Closet screens](https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/ClosetScreen.js): `src/screens/ClosetScreen.js`
- [Closet overview](https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/ClosetMainScreen.js): `src/screens/ClosetMainScreen.js`
- [Closet categories](https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/ClosetCategoryScreen.js): `src/screens/ClosetCategoryScreen.js`
- [Stylist chat](https://github.com/lirazn7/dresscode-pwa/blob/main/src/components/StylistChat.js): `src/components/StylistChat.js`
- [Closet data service](https://github.com/lirazn7/dresscode-pwa/blob/main/src/services/closetService.js): `src/services/closetService.js`
- [Styling suggestions](https://github.com/lirazn7/dresscode-pwa/blob/main/src/services/aiService.js): `src/services/aiService.js`

### Identity and account

- [Login](https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/LoginScreen.js): `src/screens/LoginScreen.js`
- [Registration](https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/RegisterScreen.js): `src/screens/RegisterScreen.js`
- [Password recovery](https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/ForgotPasswordScreen.js): `src/screens/ForgotPasswordScreen.js`
- [Username setup](https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/SetUsernameScreen.js): `src/screens/SetUsernameScreen.js`
- [Account settings](https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/SettingsScreen.js): `src/screens/SettingsScreen.js`
- [Admin panel](https://github.com/lirazn7/dresscode-pwa/blob/main/src/screens/AdminScreen.js): `src/screens/AdminScreen.js`
- [Session context](https://github.com/lirazn7/dresscode-pwa/blob/main/src/contexts/AuthContext.js): `src/contexts/AuthContext.js`
- [Authentication service](https://github.com/lirazn7/dresscode-pwa/blob/main/src/services/authService.js): `src/services/authService.js`
- [Profile operations](https://github.com/lirazn7/dresscode-pwa/blob/main/src/services/userService.js): `src/services/userService.js`

### Platform services

- [Firebase client](https://github.com/lirazn7/dresscode-pwa/blob/main/src/database/firebase.js): `src/database/firebase.js`
- **Firestore**
- **Firebase Storage**
- [Image compression](https://github.com/lirazn7/dresscode-pwa/blob/main/src/utils/imageHelper.js): `src/utils/imageHelper.js`
- [Image upload](https://github.com/lirazn7/dresscode-pwa/blob/main/src/services/storageService.js): `src/services/storageService.js`
- [Web alert bridge](https://github.com/lirazn7/dresscode-pwa/blob/main/src/components/WebAlertBridge.js): `src/components/WebAlertBridge.js`
- [Install prompt](https://github.com/lirazn7/dresscode-pwa/blob/main/src/components/PWAInstallPrompt.js): `src/components/PWAInstallPrompt.js`

### Other components

- **Visitor**
- **PWA browser runtime**
- **AI provider**

## Connections

- Visitor → Navigation shell: opens (evidence: `README.md`)
- Navigation shell → Session context: provides session (evidence: `App.js`)
- Navigation shell → Outfit feed: routes to (evidence: `App.js`)
- Navigation shell → User search: routes to (evidence: `App.js`)
- Navigation shell → Closet screens: routes to (evidence: `App.js`)
- Navigation shell → User profile: routes to (evidence: `App.js`)
- Navigation shell → Create post: routes to (evidence: `App.js`)
- Navigation shell → Stylist chat: renders (evidence: `App.js`)
- Navigation shell → Web alert bridge: renders (evidence: `App.js`)
- Navigation shell → Install prompt: renders (evidence: `App.js`)
- Bottom navigation → Create post: navigates to (evidence: `src/components/BottomNav.js`)
- Outfit feed → Post operations: loads posts (evidence: `src/screens/VitrineScreen.js`)
- User search → Post operations: toggles follow (evidence: `src/screens/SearchScreen.js`)
- User profile → Post operations: uses post data (evidence: `src/screens/ProfileScreen.js`)
- User profile → Profile operations: saves profile (evidence: `src/screens/ProfileScreen.js`)
- Stylist chat → Closet data service: loads closet (evidence: `src/components/StylistChat.js`)
- Stylist chat → Styling suggestions: requests advice (evidence: `src/components/StylistChat.js`)
- Styling suggestions → AI provider: requests suggestions
- Login → Authentication service: authenticates (evidence: `src/screens/LoginScreen.js`)
- Registration → Firebase client: uses Firebase (evidence: `src/screens/RegisterScreen.js`)
- Authentication service → Firebase client: authenticates and profiles (evidence: `src/services/authService.js`)
- Session context → Firebase client: loads user (evidence: `src/contexts/AuthContext.js`)
- Profile operations → Firebase client: updates records (evidence: `src/services/userService.js`)
- Post operations → Firebase client: reads and writes (evidence: `src/services/postService.js`)
- Closet data service → Firebase client: uses database (evidence: `src/services/closetService.js`)
- Closet screens → Image compression: compresses uploads (evidence: `src/screens/ClosetScreen.js`)
- Create post → Image compression: compresses images (evidence: `src/screens/CreatePostScreen.js`)
- User profile → Image compression: compresses avatar (evidence: `src/screens/ProfileScreen.js`)
- Image upload → Firebase client: uses storage client (evidence: `src/services/storageService.js`)
- Firebase client → Firestore: initializes (evidence: `src/database/firebase.js`)
- Firebase client → Firebase Storage: initializes (evidence: `src/database/firebase.js`)
- Web alert bridge → PWA browser runtime: bridges browser alerts
- Install prompt → PWA browser runtime: offers installation (evidence: `README.md`)
- PWA browser runtime → Visitor: installs for (evidence: `README.md`)
