Spaces:
Sleeping
Sleeping
BRIDGE Platform Agent
refactor(naming): modul → modules across metadata, wordmarks, headers, docs
195092e |
Download CODEBASE_MAP.md from sitcod3/BRIDGE_Modul-S_prod: direct link, hf CLI and curl.
- Browser
- Download file 4.46 kB
-
https://huggingface.co/spaces/sitcod3/BRIDGE_Modul-S_prod/resolve/main/CODEBASE_MAP.md
- Command line
-
hf download hf://spaces/sitcod3/BRIDGE_Modul-S_prod/CODEBASE_MAP.md
-
curl -L -o CODEBASE_MAP.md https://huggingface.co/spaces/sitcod3/BRIDGE_Modul-S_prod/resolve/main/CODEBASE_MAP.md
4.46 kB
| # CODEBASE_MAP.md — BRIDGE Platform (Modules E & S) | |
| > PHASE 1 deliverable. Covers both module repositories, shared architecture, integration target. | |
| ## 1. Repositories | |
| | Repo | Role | Metadata name | Live target | | |
| |------|------|---------------|-------------| | |
| | `sitcod3lab-git/BRIDGE_Modul-E_Instantly_GREENTHEME-test` | Module E (green/mint theme, superset app, tests) | `BRIDGEModulE` | HF Space `sitcod3/BRIDGE_Modul-S_prod` | | |
| | `sitcod3lab-git/BRIDGE_Modul-E_Instantly-prod` | **Module S (prod)** — metadata declares `BRIDGE ModulS`; the brief's URL `uranusmediaconnection-dot/BRIDGE_Modul-S_prod` does not exist (404 verified with two tokens); this repo is the actual Module S prod source | `BRIDGE ModulS` | HF Space `sitcod3/BRIDGE_Modul-S_prod` (same space) | | |
| ⚠️ **Blocker logged (least-invasive resolution):** both repos' CI (`hf-docker-space-deploy.yml`) force-push to the **same** HF Space `sitcod3/BRIDGE_Modul-S_prod`. The Space therefore IS the BRIDGE platform. The converged platform build is delivered to **both** repos so the Space serves the complete app regardless of which pipeline runs last. | |
| ## 2. Shared stack (identical in both repos) | |
| - **Frontend:** React 19 + Vite 6 + TypeScript, Tailwind CSS v4 (`@tailwindcss/vite`, `@theme` tokens in `src/index.css`), `motion/react` v12, `@tanstack/react-query` v5, `react-router-dom` v7, `react-hook-form` + `zod`, `recharts` v3, `react-hot-toast`, `lucide-react`. | |
| - **Backend:** single-file Express BFF (`server.ts`, ~1 100 lines) — Smartlead proxy (`server.smartlead.ai/api/v1`), AI research, webhook receiver, static serving; Docker on HF port 7860. | |
| - **Data:** `ApiKeyContext` (local key vault), `supabaseClient`, Stripe billing (E only). | |
| ## 3. Routing (current, E repo) | |
| `/` Dashboard · `/campaigns` · `/campaigns/:id` · `/leads` · `/email-accounts` · `/warmup` · `/inbox` · `/webhooks` · `/analytics` · `/clients` · `/pricing` (E only) · `/settings` — all nested in `AppLayout` (Sidebar + TopBar + GeometricBackground + BackgroundElements). | |
| S repo: identical minus `Pricing` (10 items, label "Dashboard" vs E "Command Center"). | |
| ## 4. Design system | |
| ### Module E — "Bioluminescent Mint" (GREENTHEME) | |
| - `ThemeContext.tsx`: `MINT_THEME` (id `mint`) — accent `#00e5bc`, CSS vars `--theme-accent*`, `--theme-badge*`, `--theme-btn*`, chart colors, tagline "Keep growth **healthy.**" | |
| - `index.css` remaps Tailwind v4 vars GLOBALLY: `indigo-*`→mint, `emerald-*`→mint, `zinc-800/900/950`→`#1a1b1e/#0c0d10/#05070a`. E pages consume raw Tailwind classes that **render as mint**. | |
| - Branding: `Logo.tsx` → `BRIDGE`+accent `ModulE`, sub "Outbound Systems OS". | |
| ### Module S — "Prod Indigo" | |
| - No ThemeContext; raw Tailwind indigo/emerald on real zinc. Body: `linear-gradient(180deg,#0f172a,#000)` fixed. | |
| - Branding: `BRIDGE ModulS`. | |
| ### Shared components (diff = 0 → reuse directly) | |
| `StatusBadge`, `ConfirmModal`, `FormDrawer`, `CsvExportButton`, `RichTextEditor`, `Skeleton` (E), `AppLayout` (diff 0), `utils/cn`, `lib/apiClient`, `lib/supabaseClient`, `context/ApiKeyContext`. | |
| ### Divergent components (per-module variants) | |
| | Component | Diff | Resolution | | |
| |---|---|---| | |
| | `StatCard` | 41 lines | S variant `src/modules/s/components/StatCard.tsx` | | |
| | `AnimatedLogo` | 27 | S variant | | |
| | `GlassCard` | 6 | S variant | | |
| | `TopBar` | 363 | superseded by platform TopBar (chrome) | | |
| | `GeometricBackground` / `BackgroundElements` | 71 / 27 | platform chrome versions | | |
| ## 5. Animation source primitives (real components only) | |
| `StatCard`, `GlassCard`, `StatusBadge`, Recharts `AreaChart` frames, table/list rows (avatar dot + email + badge), `Skeleton`, ambient background layers. | |
| ## 6. Backend API surface (merged) | |
| Common Smartlead proxy + campaigns/leads/research/webhooks. E-only: `/api/billing*`. S-only: `/api/health` → **add to merged server**. Dead dep in S: `@google/genai` (not carried). | |
| ## 7. Tests & tooling (E repo) | |
| vitest + RTL + jsdom; tests render components directly (route restructure must not break contracts). Scripts: `lint = tsc --noEmit`, `test = vitest run`, `build = vite build && esbuild server.ts --bundle …`, `dev = tsx server.ts`. | |
| ## 8. Naming audit (`modul` → `modules`, case-aware) | |
| `metadata.json` names → `BRIDGE Modules`; `Logo.tsx` wordmark `ModulE/ModulS` → `ModuleE/ModuleS`; menu labels `Module E` / `Module S`; route namespace `/modules/e`, `/modules/s`; folders `src/modules/**`; docs/comments updated. | |