# mohan095/worker architecture

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

- Interactive diagram: https://gitdiagram.com/mohan095/worker
- Repository: https://github.com/mohan095/worker

## Overview

Work Connect is a browser-based marketplace where workers find postings and apply, while employers publish work and review applicants. Its documented journey runs from sign-in and profile setup through language selection, work discovery, and application; employers manage postings and application decisions. The graph also includes shared navigation, translation, and persistence layers. Edges reflect README-documented page roles and capabilities or sampled calls; unsampled page wiring is not inferred beyond those documented relationships.

Main entry points: [`js/firebase-config.js`](https://github.com/mohan095/worker/blob/main/js/firebase-config.js) (Firebase & Demo Store), [`js/applications.js`](https://github.com/mohan095/worker/blob/main/js/applications.js) (Application Workflow), [`js/works.js`](https://github.com/mohan095/worker/blob/main/js/works.js) (Work Listings), [`js/auth.js`](https://github.com/mohan095/worker/blob/main/js/auth.js) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Access &amp; Identity"]
  node_login["Sign In<br/>[login.html]"]
  node_auth["Authentication<br/>[auth.js]"]
  node_profile_setup["Profile Setup<br/>[profile-setup.html]"]
  node_profile["Profile Management<br/>[profile.js]"]
  node_profile_page["Profile View<br/>[profile.html]"]
  node_language_page["Language Selection<br/>[language.html]"]
  node_language["Language Controller<br/>[language.js]"]
end

subgraph group_marketplace["Work Marketplace"]
  node_home["Work Dashboard<br/>[home.html]"]
  node_works["Work Listings<br/>[works.js]"]
  node_add_work["Post Work<br/>[add-work.html]"]
  node_details["Work Details<br/>[work-details.html]"]
end

subgraph group_transactions["Applications &amp; Management"]
  node_my_works["My Work Posts<br/>[my-works.html]"]
  node_applications["Application Workflow<br/>[applications.js]"]
  node_my_applications["My Applications"]
end

subgraph group_shared["Shared Services"]
  node_firebase[("Firebase &amp; Demo Store<br/>[firebase-config.js]")]
  node_common["Navigation &amp; Guards<br/>[common.js]"]
  node_translations["Translation Dictionary<br/>[translations.js]"]
  node_firestore_rules["Firestore Access Rules<br/>[firestore.rules]"]
  node_firestore_indexes["Firestore Query Indexes"]
end

node_worker(("Worker"))
node_employer(("Employer"))

node_worker -->|"signs in"| node_login
node_employer -->|"signs in"| node_login
node_login -->|"starts authentication"| node_auth
node_auth -->|"uses auth and store"| node_firebase
node_auth -->|"routes new users"| node_profile_setup
node_auth -->|"routes returning users"| node_home
node_profile_setup -->|"sets up profile"| node_profile
node_profile_page -->|"edits profile"| node_profile
node_profile -->|"reads and writes profiles"| node_firebase
node_worker -->|"chooses language"| node_language_page
node_language_page -->|"saves selection"| node_language
node_language -->|"syncs preference"| node_firebase
node_worker -->|"finds work"| node_home
node_home -->|"shows live feed"| node_works
node_works -->|"reads and manages postings"| node_firebase
node_employer -->|"posts work"| node_add_work
node_add_work -->|"submits posting"| node_works
node_worker -->|"opens posting"| node_details
node_details -->|"applies to work"| node_applications
node_applications -->|"checks and stores applications"| node_firebase
node_worker -->|"tracks applications"| node_my_applications
node_my_applications -->|"views application status"| node_applications
node_employer -->|"manages postings"| node_my_works
node_my_works -->|"edits posting status"| node_works
node_my_works -->|"reviews applicants"| node_applications
node_applications -->|"formats work details"| node_works
node_common -->|"bridges auth state"| node_firebase
node_common -->|"applies page translations"| node_translations
node_language -->|"updates page text"| node_translations
node_firestore_rules -.->|"secures Firestore access"| node_firebase
node_firestore_indexes -.->|"supports Firestore queries"| node_firebase

click node_login "https://github.com/mohan095/worker/blob/main/login.html"
click node_auth "https://github.com/mohan095/worker/blob/main/js/auth.js"
click node_profile_setup "https://github.com/mohan095/worker/blob/main/profile-setup.html"
click node_profile "https://github.com/mohan095/worker/blob/main/js/profile.js"
click node_profile_page "https://github.com/mohan095/worker/blob/main/profile.html"
click node_language_page "https://github.com/mohan095/worker/blob/main/language.html"
click node_language "https://github.com/mohan095/worker/blob/main/js/language.js"
click node_home "https://github.com/mohan095/worker/blob/main/home.html"
click node_works "https://github.com/mohan095/worker/blob/main/js/works.js"
click node_add_work "https://github.com/mohan095/worker/blob/main/add-work.html"
click node_details "https://github.com/mohan095/worker/blob/main/work-details.html"
click node_my_works "https://github.com/mohan095/worker/blob/main/my-works.html"
click node_applications "https://github.com/mohan095/worker/blob/main/js/applications.js"
click node_my_applications "https://github.com/mohan095/worker/blob/main/my-applications.html"
click node_firebase "https://github.com/mohan095/worker/blob/main/js/firebase-config.js"
click node_common "https://github.com/mohan095/worker/blob/main/js/common.js"
click node_translations "https://github.com/mohan095/worker/blob/main/js/translations.js"
click node_firestore_rules "https://github.com/mohan095/worker/blob/main/firestore.rules"
click node_firestore_indexes "https://github.com/mohan095/worker/blob/main/firestore.indexes.json"

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_login,node_auth,node_profile_setup,node_profile,node_profile_page,node_language_page,node_language toneBlue
class node_home,node_works,node_add_work,node_details toneAmber
class node_my_works,node_applications,node_my_applications toneMint
class node_firebase,node_common,node_translations,node_firestore_rules,node_firestore_indexes,node_worker toneRose
class node_employer toneIndigo
```

## Components

### Access & Identity

- [Sign In](https://github.com/mohan095/worker/blob/main/login.html): `login.html`
- [Authentication](https://github.com/mohan095/worker/blob/main/js/auth.js): `js/auth.js`
- [Profile Setup](https://github.com/mohan095/worker/blob/main/profile-setup.html): `profile-setup.html`
- [Profile Management](https://github.com/mohan095/worker/blob/main/js/profile.js): `js/profile.js`
- [Profile View](https://github.com/mohan095/worker/blob/main/profile.html): `profile.html`
- [Language Selection](https://github.com/mohan095/worker/blob/main/language.html): `language.html`
- [Language Controller](https://github.com/mohan095/worker/blob/main/js/language.js): `js/language.js`

### Work Marketplace

- [Work Dashboard](https://github.com/mohan095/worker/blob/main/home.html): `home.html`
- [Work Listings](https://github.com/mohan095/worker/blob/main/js/works.js): `js/works.js`
- [Post Work](https://github.com/mohan095/worker/blob/main/add-work.html): `add-work.html`
- [Work Details](https://github.com/mohan095/worker/blob/main/work-details.html): `work-details.html`

### Applications & Management

- [My Work Posts](https://github.com/mohan095/worker/blob/main/my-works.html): `my-works.html`
- [Application Workflow](https://github.com/mohan095/worker/blob/main/js/applications.js): `js/applications.js`
- [My Applications](https://github.com/mohan095/worker/blob/main/my-applications.html): `my-applications.html`

### Shared Services

- [Firebase & Demo Store](https://github.com/mohan095/worker/blob/main/js/firebase-config.js): `js/firebase-config.js`
- [Navigation & Guards](https://github.com/mohan095/worker/blob/main/js/common.js): `js/common.js`
- [Translation Dictionary](https://github.com/mohan095/worker/blob/main/js/translations.js): `js/translations.js`
- [Firestore Access Rules](https://github.com/mohan095/worker/blob/main/firestore.rules): `firestore.rules`
- [Firestore Query Indexes](https://github.com/mohan095/worker/blob/main/firestore.indexes.json): `firestore.indexes.json`

### Other components

- **Worker**
- **Employer**

## Connections

- Worker → Sign In: signs in (evidence: `README.md`)
- Employer → Sign In: signs in (evidence: `README.md`)
- Sign In → Authentication: starts authentication (evidence: `README.md`)
- Authentication → Firebase & Demo Store: uses auth and store (evidence: `js/auth.js`)
- Authentication → Profile Setup: routes new users (evidence: `js/auth.js`)
- Authentication → Work Dashboard: routes returning users (evidence: `js/auth.js`)
- Profile Setup → Profile Management: sets up profile (evidence: `README.md`)
- Profile View → Profile Management: edits profile (evidence: `README.md`)
- Profile Management → Firebase & Demo Store: reads and writes profiles (evidence: `js/profile.js`)
- Worker → Language Selection: chooses language (evidence: `README.md`)
- Language Selection → Language Controller: saves selection (evidence: `README.md`)
- Language Controller → Firebase & Demo Store: syncs preference (evidence: `js/language.js`)
- Worker → Work Dashboard: finds work (evidence: `README.md`)
- Work Dashboard → Work Listings: shows live feed (evidence: `README.md`)
- Work Listings → Firebase & Demo Store: reads and manages postings (evidence: `js/works.js`)
- Employer → Post Work: posts work (evidence: `README.md`)
- Post Work → Work Listings: submits posting (evidence: `README.md`)
- Worker → Work Details: opens posting (evidence: `README.md`)
- Work Details → Application Workflow: applies to work (evidence: `README.md`)
- Application Workflow → Firebase & Demo Store: checks and stores applications (evidence: `js/applications.js`)
- Worker → My Applications: tracks applications (evidence: `README.md`)
- My Applications → Application Workflow: views application status (evidence: `README.md`)
- Employer → My Work Posts: manages postings (evidence: `README.md`)
- My Work Posts → Work Listings: edits posting status (evidence: `README.md`)
- My Work Posts → Application Workflow: reviews applicants (evidence: `README.md`)
- Application Workflow → Work Listings: formats work details (evidence: `js/applications.js`)
- Navigation & Guards → Firebase & Demo Store: bridges auth state (evidence: `js/common.js`)
- Navigation & Guards → Translation Dictionary: applies page translations (evidence: `js/common.js`)
- Language Controller → Translation Dictionary: updates page text (evidence: `js/language.js`)
- Firestore Access Rules → Firebase & Demo Store: secures Firestore access
- Firestore Query Indexes → Firebase & Demo Store: supports Firestore queries
