# deimar10/miits architecture

> Architecture diagram of the GitHub repository deimar10/miits, 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/deimar10/miits
- Repository: https://github.com/deimar10/miits

## Overview

Miits is a React/TypeScript offers marketplace for students, with enterprise tools for managing offers and an admin view. The main user journey loads and browses offers, filters or searches them, opens details, and may favorite an offer or submit feedback; enterprises register or log in, then create and manage offers. The graph includes the API client and documented Firebase and browser-storage integrations. Evidence is limited to the README, SOURCE INDEX references, and sampled excerpts; some capability links are documented rather than source-verified.

Main entry points: [`src/App.tsx`](https://github.com/deimar10/miits/blob/master/src/App.tsx) (App routes), [`src/middleware/api.ts`](https://github.com/deimar10/miits/blob/master/src/middleware/api.ts) (API client), [`src/pages/user/OfferDetails.tsx`](https://github.com/deimar10/miits/blob/master/src/pages/user/OfferDetails.tsx) (Offer details), [`src/pages/enterprise/Management.tsx`](https://github.com/deimar10/miits/blob/master/src/pages/enterprise/Management.tsx) (Offer management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Routing and shared UI"]
  node_app["App routes<br/>[App.tsx]"]
  node_publicnav["User navigation<br/>[Nav.tsx]"]
end

subgraph group_user["Offer discovery"]
  node_offerlist["Browse offers<br/>[Offers.tsx]"]
  node_offeritem["Offer cards<br/>[Offer.tsx]"]
  node_favorites["Favorites<br/>[Favorites.tsx]"]
  node_details["Offer details<br/>[OfferDetails.tsx]"]
  node_feedback["Feedback form<br/>[UserFeedback.tsx]"]
  node_notifications["Expiry alerts<br/>[Notification.tsx]"]
end

subgraph group_enterprise["Enterprise management"]
  node_enterpriseauth["Enterprise access"]
  node_management["Offer management<br/>[Management.tsx]"]
  node_enterpriseoffers["Enterprise offers"]
  node_create["Create offer<br/>[CreateOffer.tsx]"]
  node_edit["Edit offer<br/>[EditOffer.tsx]"]
  node_admin["Admin panel<br/>[Panel.tsx]"]
end

subgraph group_services["Data and integrations"]
  node_api["API client<br/>[api.ts]"]
  node_backend["Miits API"]
  node_firebase["Image storage<br/>[config.ts]"]
  node_browserstorage[("Browser storage")]
end

node_visitor(("Student"))
node_company(("Enterprise user"))

node_visitor -->|"opens app"| node_app
node_company -->|"opens app"| node_app
node_app -->|"routes to"| node_offerlist
node_app -->|"routes to"| node_favorites
node_app -->|"routes to"| node_details
node_app -->|"routes to"| node_enterpriseauth
node_app -->|"routes to"| node_management
node_app -->|"routes to"| node_create
node_app -->|"routes to"| node_edit
node_app -->|"routes to"| node_admin
node_app -->|"loads offers"| node_api
node_app -.->|"renders"| node_publicnav
node_offerlist -->|"requests offers"| node_api
node_offerlist -->|"renders cards"| node_offeritem
node_offeritem -->|"marks favorites"| node_favorites
node_offeritem -->|"links details"| node_details
node_details -->|"loads details"| node_api
node_details -->|"submits feedback"| node_api
node_details -.->|"presents feedback"| node_feedback
node_details -->|"adds favorite"| node_favorites
node_publicnav -->|"shows alerts"| node_notifications
node_publicnav -->|"persists theme"| node_browserstorage
node_favorites -->|"stores favorites"| node_browserstorage
node_notifications -->|"checks favorites"| node_browserstorage
node_enterpriseauth -->|"authenticates"| node_api
node_management -->|"loads offers"| node_api
node_management -->|"renders offers"| node_enterpriseoffers
node_enterpriseoffers -.->|"deletes offers"| node_api
node_management -->|"offers creation"| node_create
node_management -->|"offers editing"| node_edit
node_create -->|"creates offer"| node_api
node_edit -->|"updates offer"| node_api
node_create -->|"uploads image"| node_firebase
node_api -->|"sends requests"| node_backend
node_admin -->|"loads enterprises"| node_api

click node_app "https://github.com/deimar10/miits/blob/master/src/App.tsx"
click node_publicnav "https://github.com/deimar10/miits/blob/master/src/Components/Nav/Nav.tsx"
click node_enterpriseauth "https://github.com/deimar10/miits/tree/master/src/pages/enterprise"
click node_offerlist "https://github.com/deimar10/miits/blob/master/src/pages/user/Offers.tsx"
click node_offeritem "https://github.com/deimar10/miits/blob/master/src/Components/Offer/Offer.tsx"
click node_favorites "https://github.com/deimar10/miits/blob/master/src/pages/user/Favorites.tsx"
click node_details "https://github.com/deimar10/miits/blob/master/src/pages/user/OfferDetails.tsx"
click node_feedback "https://github.com/deimar10/miits/blob/master/src/Components/UserFeedback/UserFeedback.tsx"
click node_notifications "https://github.com/deimar10/miits/blob/master/src/Components/Notification/Notification.tsx"
click node_management "https://github.com/deimar10/miits/blob/master/src/pages/enterprise/Management.tsx"
click node_enterpriseoffers "https://github.com/deimar10/miits/blob/master/src/Components/EnterpriseOffers/EnterpriseOffers.tsx"
click node_create "https://github.com/deimar10/miits/blob/master/src/pages/enterprise/CreateOffer.tsx"
click node_edit "https://github.com/deimar10/miits/blob/master/src/pages/enterprise/EditOffer.tsx"
click node_admin "https://github.com/deimar10/miits/blob/master/src/pages/admin/Panel.tsx"
click node_api "https://github.com/deimar10/miits/blob/master/src/middleware/api.ts"
click node_firebase "https://github.com/deimar10/miits/blob/master/src/firebase/config.ts"

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_publicnav,node_company toneBlue
class node_offerlist,node_offeritem,node_favorites,node_details,node_feedback,node_notifications toneAmber
class node_enterpriseauth,node_management,node_enterpriseoffers,node_create,node_edit,node_admin toneMint
class node_api,node_backend,node_firebase,node_browserstorage toneRose
class node_visitor toneIndigo
```

## Components

### Routing and shared UI

- [App routes](https://github.com/deimar10/miits/blob/master/src/App.tsx): `src/App.tsx`
- [User navigation](https://github.com/deimar10/miits/blob/master/src/Components/Nav/Nav.tsx): `src/Components/Nav/Nav.tsx`

### Offer discovery

- [Browse offers](https://github.com/deimar10/miits/blob/master/src/pages/user/Offers.tsx): `src/pages/user/Offers.tsx`
- [Offer cards](https://github.com/deimar10/miits/blob/master/src/Components/Offer/Offer.tsx): `src/Components/Offer/Offer.tsx`
- [Favorites](https://github.com/deimar10/miits/blob/master/src/pages/user/Favorites.tsx): `src/pages/user/Favorites.tsx`
- [Offer details](https://github.com/deimar10/miits/blob/master/src/pages/user/OfferDetails.tsx): `src/pages/user/OfferDetails.tsx`
- [Feedback form](https://github.com/deimar10/miits/blob/master/src/Components/UserFeedback/UserFeedback.tsx): `src/Components/UserFeedback/UserFeedback.tsx`
- [Expiry alerts](https://github.com/deimar10/miits/blob/master/src/Components/Notification/Notification.tsx): `src/Components/Notification/Notification.tsx`

### Enterprise management

- [Enterprise access](https://github.com/deimar10/miits/tree/master/src/pages/enterprise): `src/pages/enterprise`
- [Offer management](https://github.com/deimar10/miits/blob/master/src/pages/enterprise/Management.tsx): `src/pages/enterprise/Management.tsx`
- [Enterprise offers](https://github.com/deimar10/miits/blob/master/src/Components/EnterpriseOffers/EnterpriseOffers.tsx): `src/Components/EnterpriseOffers/EnterpriseOffers.tsx`
- [Create offer](https://github.com/deimar10/miits/blob/master/src/pages/enterprise/CreateOffer.tsx): `src/pages/enterprise/CreateOffer.tsx`
- [Edit offer](https://github.com/deimar10/miits/blob/master/src/pages/enterprise/EditOffer.tsx): `src/pages/enterprise/EditOffer.tsx`
- [Admin panel](https://github.com/deimar10/miits/blob/master/src/pages/admin/Panel.tsx): `src/pages/admin/Panel.tsx`

### Data and integrations

- [API client](https://github.com/deimar10/miits/blob/master/src/middleware/api.ts): `src/middleware/api.ts`
- **Miits API**
- [Image storage](https://github.com/deimar10/miits/blob/master/src/firebase/config.ts): `src/firebase/config.ts`
- **Browser storage**

### Other components

- **Student**
- **Enterprise user**

## Connections

- Student → App routes: opens app (evidence: `README.md`)
- Enterprise user → App routes: opens app (evidence: `README.md`)
- App routes → Browse offers: routes to (evidence: `src/App.tsx`)
- App routes → Favorites: routes to (evidence: `src/App.tsx`)
- App routes → Offer details: routes to (evidence: `src/App.tsx`)
- App routes → Enterprise access: routes to (evidence: `src/App.tsx`)
- App routes → Offer management: routes to (evidence: `src/App.tsx`)
- App routes → Create offer: routes to (evidence: `src/App.tsx`)
- App routes → Edit offer: routes to (evidence: `src/App.tsx`)
- App routes → Admin panel: routes to (evidence: `src/App.tsx`)
- App routes → API client: loads offers (evidence: `src/App.tsx`)
- App routes → User navigation: renders
- Browse offers → API client: requests offers (evidence: `src/pages/user/Offers.tsx`)
- Browse offers → Offer cards: renders cards (evidence: `src/pages/user/Offers.tsx`)
- Offer cards → Favorites: marks favorites (evidence: `README.md`)
- Offer cards → Offer details: links details (evidence: `src/Components/Offer/Offer.tsx`)
- Offer details → API client: loads details (evidence: `src/pages/user/OfferDetails.tsx`)
- Offer details → API client: submits feedback (evidence: `src/pages/user/OfferDetails.tsx`)
- Offer details → Feedback form: presents feedback
- Offer details → Favorites: adds favorite (evidence: `README.md`)
- User navigation → Expiry alerts: shows alerts (evidence: `src/Components/Nav/Nav.tsx`)
- User navigation → Browser storage: persists theme (evidence: `README.md`)
- Favorites → Browser storage: stores favorites (evidence: `README.md`)
- Expiry alerts → Browser storage: checks favorites (evidence: `README.md`)
- Enterprise access → API client: authenticates (evidence: `src/pages/enterprise/Login.tsx`)
- Offer management → API client: loads offers (evidence: `src/pages/enterprise/Management.tsx`)
- Offer management → Enterprise offers: renders offers (evidence: `src/pages/enterprise/Management.tsx`)
- Enterprise offers → API client: deletes offers
- Offer management → Create offer: offers creation (evidence: `README.md`)
- Offer management → Edit offer: offers editing (evidence: `README.md`)
- Create offer → API client: creates offer (evidence: `src/pages/enterprise/CreateOffer.tsx`)
- Edit offer → API client: updates offer (evidence: `src/pages/enterprise/EditOffer.tsx`)
- Create offer → Image storage: uploads image (evidence: `src/pages/enterprise/CreateOffer.tsx`)
- API client → Miits API: sends requests (evidence: `src/middleware/api.ts`)
- Admin panel → API client: loads enterprises (evidence: `src/pages/admin/Panel.tsx`)
