# ahad0245/fecorporation architecture

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

- Interactive diagram: https://gitdiagram.com/ahad0245/fecorporation
- Repository: https://github.com/ahad0245/fecorporation

## Overview

1. **Repository shape**
   - This is primarily a **single-page frontend application** built with **React + TypeScript + Vite**.
   - The repo also contains a small **Supabase serverless backend** for contact-form handling, so the architecture is mostly client-side with one isolated backend boundary.

2. **App bootstrap and shell**
   - `src/main.tsx` is the browser entry point that mounts the React app.
   - `src/App.tsx` is the top-level composition layer, with `src/App.css` and `src/index.css` providing app-wide styling.
   - `index.html` is the Vite HTML shell; `build/index.html` and `build/assets/*` are the compiled output artifacts.

3. **UI and feature components**
   - The app’s functional UI is split into small reusable components under `src/components/`.
   - Notable pieces are:
     - `ContactForm.tsx` for user input and submission
     - `ErrorBoundary.tsx` for runtime failure containment
     - `TeamMemberPage.tsx` for an individual team-member view or detail panel
   - This suggests the app is organized around a presentation layer rather than a heavy business-logic layer.

4. **Content/data layer**
   - `src/lib/team.ts` is the main source of structured team data used by the UI.
   - `src/lib/utils.ts` likely provides shared helpers used across components.
   - This is a lightweight internal data boundary: the app appears to source most content from local TypeScript modules rather than a database or CMS.

5. **Responsive behavior**
   - `src/hooks/use-mobile.tsx` indicates a custom viewport/responsiveness hook.
   - The UI likely adapts layout and interaction patterns based on screen size, which matters for any architecture diagram showing client-side conditional rendering.

6. **Contact submission path**
   - The main explicit client-to-server flow is the **contact form**.
   - The form component in the browser likely sends submission data to the Supabase function rather than directly embedding server credentials in the frontend.
   - This creates a clear boundary between anonymous public UI traffic and trusted backend processing.

7. **Supabase backend boundary**
   - `supabase/functions/contact-form/index.ts` is a **Deno-based Supabase Edge Function**.
   - `supabase/config.toml` and the function’s own `deno.json` show that serverless deployment is handled separately from the frontend build.
   - This function is the only visible backend subsystem; there is no evidence of a custom API server or database schema in the tree.

8. **Static assets and media**
   - Public-facing images and documents live under `public/images/`, including team/project images and a PDF asset.
   - Vite copies `public/` directly into the build, so these assets are served as static files rather than imported from a backend.
   - The presence of `build/images/*` confirms the final deployment is asset-heavy and mostly static.

9. **Styling and UI system**
   - `tailwind.config.js`, `postcss.config.js`, and `components.json` indicate a Tailwind-centered styling setup, likely with generated or convention-based UI components.
   - Styling is therefore a frontend concern, not a separate service.

10. **Error handling and runtime resilience**
   - `ErrorBoundary.tsx` gives the client app a local recovery boundary for React rendering failures.
   - This is important in the diagram as a browser-side guardrail around the component tree, independent of the Supabase function.

11. **Build and delivery model**
   - The presence of `build/` alongside Vite config files shows the repo is designed for **static deployment of the frontend** plus separately deployed edge functions.
   - The frontend can be hosted on a static host/CDN, while the contact-form logic is deployed through Supabase’s serverless runtime.

12. **Tooling boundaries**
   - `eslint.config.js` and the various `tsconfig*.json` files define the development-time type/lint boundary.
   - `package.json`/lockfiles and `vite.config.ts` define the frontend build toolchain; they do not appear to support a traditional multi-service backend.

Overall, the architecture is best drawn as: **browser-based React app + static assets**, with a **single Supabase edge-function backend for contact submission**, and no other visible persistent server-side subsystem.

Main entry points: [`src/App.tsx`](https://github.com/ahad0245/fecorporation/blob/main/src/App.tsx) (App shell), [`package.json`](https://github.com/ahad0245/fecorporation/blob/main/package.json) (Package manifest), [`src/components/ContactForm.tsx`](https://github.com/ahad0245/fecorporation/blob/main/src/components/ContactForm.tsx) (Contact form), [`src/components/TeamMemberPage.tsx`](https://github.com/ahad0245/fecorporation/blob/main/src/components/TeamMemberPage.tsx) (Team page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend app"]
  node_html_shell["HTML shell<br/>vite entry shell<br/>[index.html]"]
  node_main_entry["Main entry<br/>react bootstrap<br/>[main.tsx]"]
  node_app_shell["App shell<br/>react composition<br/>[App.tsx]"]
  node_app_styles["App styles<br/>global css<br/>[App.css]"]
  node_base_styles["Base styles<br/>global css<br/>[index.css]"]
  node_contact_form["Contact form<br/>ui component<br/>[ContactForm.tsx]"]
  node_error_boundary["Error boundary<br/>react guard<br/>[ErrorBoundary.tsx]"]
  node_team_page["Team page<br/>ui component<br/>[TeamMemberPage.tsx]"]
  node_team_data["Team data<br/>content module<br/>[team.ts]"]
  node_utils_lib["Utilities<br/>shared helpers<br/>[utils.ts]"]
  node_mobile_hook["Mobile hook<br/>viewport hook<br/>[use-mobile.tsx]"]
end

subgraph group_backend["Supabase backend"]
  node_contact_fn["Contact function<br/>supabase edge function<br/>[index.ts]"]
  node_supabase_cfg["Supabase config<br/>deployment config<br/>[config.toml]"]
end

subgraph group_assets["Static assets"]
  node_public_media["Public media<br/>static assets"]
  node_build_output["Build output<br/>compiled frontend<br/>[index.html]"]
end

subgraph group_tooling["Build tooling"]
  node_vite_cfg["Vite config<br/>bundler config<br/>[vite.config.ts]"]
  node_package_manifest["Package manifest<br/>tooling manifest<br/>[package.json]"]
  node_tailwind_cfg["Tailwind config<br/>style config<br/>[tailwind.config.js]"]
  node_eslint_cfg["Lint config<br/>quality config<br/>[eslint.config.js]"]
end

node_html_shell -->|"loads"| node_main_entry
node_main_entry -->|"mounts"| node_app_shell
node_app_shell -->|"renders"| node_contact_form
node_app_shell -->|"wraps"| node_error_boundary
node_app_shell -->|"renders"| node_team_page
node_team_page -->|"reads"| node_team_data
node_contact_form -->|"submits to"| node_contact_fn
node_contact_fn -->|"deployed by"| node_supabase_cfg
node_app_shell -->|"adapts with"| node_mobile_hook
node_team_page -->|"uses"| node_utils_lib
node_contact_form -->|"uses"| node_utils_lib
node_app_shell -->|"styles"| node_app_styles
node_app_shell -->|"styles"| node_base_styles
node_html_shell -->|"serves"| node_public_media
node_vite_cfg -->|"produces"| node_build_output
node_package_manifest -->|"drives"| node_vite_cfg
node_package_manifest -->|"drives"| node_tailwind_cfg
node_package_manifest -->|"drives"| node_eslint_cfg
node_build_output -->|"contains"| node_public_media
node_app_shell -.->|"bundled into"| node_build_output

click node_html_shell "https://github.com/ahad0245/fecorporation/blob/main/index.html"
click node_main_entry "https://github.com/ahad0245/fecorporation/blob/main/src/main.tsx"
click node_app_shell "https://github.com/ahad0245/fecorporation/blob/main/src/App.tsx"
click node_app_styles "https://github.com/ahad0245/fecorporation/blob/main/src/App.css"
click node_base_styles "https://github.com/ahad0245/fecorporation/blob/main/src/index.css"
click node_contact_form "https://github.com/ahad0245/fecorporation/blob/main/src/components/ContactForm.tsx"
click node_error_boundary "https://github.com/ahad0245/fecorporation/blob/main/src/components/ErrorBoundary.tsx"
click node_team_page "https://github.com/ahad0245/fecorporation/blob/main/src/components/TeamMemberPage.tsx"
click node_team_data "https://github.com/ahad0245/fecorporation/blob/main/src/lib/team.ts"
click node_utils_lib "https://github.com/ahad0245/fecorporation/blob/main/src/lib/utils.ts"
click node_mobile_hook "https://github.com/ahad0245/fecorporation/blob/main/src/hooks/use-mobile.tsx"
click node_public_media "https://github.com/ahad0245/fecorporation/blob/main/public/images/Engineering_Global_Liquidity.pdf"
click node_build_output "https://github.com/ahad0245/fecorporation/blob/main/build/index.html"
click node_contact_fn "https://github.com/ahad0245/fecorporation/blob/main/supabase/functions/contact-form/index.ts"
click node_supabase_cfg "https://github.com/ahad0245/fecorporation/blob/main/supabase/config.toml"
click node_vite_cfg "https://github.com/ahad0245/fecorporation/blob/main/vite.config.ts"
click node_package_manifest "https://github.com/ahad0245/fecorporation/blob/main/package.json"
click node_tailwind_cfg "https://github.com/ahad0245/fecorporation/blob/main/tailwind.config.js"
click node_eslint_cfg "https://github.com/ahad0245/fecorporation/blob/main/eslint.config.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_html_shell,node_main_entry,node_app_shell,node_app_styles,node_base_styles,node_contact_form,node_error_boundary,node_team_page,node_team_data,node_utils_lib,node_mobile_hook toneBlue
class node_contact_fn,node_supabase_cfg toneAmber
class node_public_media,node_build_output toneMint
class node_vite_cfg,node_package_manifest,node_tailwind_cfg,node_eslint_cfg toneRose
```

## Components

### Frontend app

React + TypeScript Vite client

- [HTML shell](https://github.com/ahad0245/fecorporation/blob/main/index.html): vite entry shell · Browser document that hosts the app · `index.html`
- [Main entry](https://github.com/ahad0245/fecorporation/blob/main/src/main.tsx): react bootstrap · Mounts the React application · `src/main.tsx`
- [App shell](https://github.com/ahad0245/fecorporation/blob/main/src/App.tsx): react composition · Top-level application composition and routing surface · `src/App.tsx`
- [App styles](https://github.com/ahad0245/fecorporation/blob/main/src/App.css): global css · Application-wide styling rules · `src/App.css`
- [Base styles](https://github.com/ahad0245/fecorporation/blob/main/src/index.css): global css · Shared baseline stylesheet · `src/index.css`
- [Contact form](https://github.com/ahad0245/fecorporation/blob/main/src/components/ContactForm.tsx): ui component · Collects and submits user messages · `src/components/ContactForm.tsx`
- [Error boundary](https://github.com/ahad0245/fecorporation/blob/main/src/components/ErrorBoundary.tsx): react guard · Contains runtime rendering failures · `src/components/ErrorBoundary.tsx`
- [Team page](https://github.com/ahad0245/fecorporation/blob/main/src/components/TeamMemberPage.tsx): ui component · Displays individual team member content · `src/components/TeamMemberPage.tsx`
- [Team data](https://github.com/ahad0245/fecorporation/blob/main/src/lib/team.ts): content module · Structured team content used by the UI · `src/lib/team.ts`
- [Utilities](https://github.com/ahad0245/fecorporation/blob/main/src/lib/utils.ts): shared helpers · Common helper functions · `src/lib/utils.ts`
- [Mobile hook](https://github.com/ahad0245/fecorporation/blob/main/src/hooks/use-mobile.tsx): viewport hook · Responsive behavior based on screen size · `src/hooks/use-mobile.tsx`

### Supabase backend

Serverless contact submission boundary

- [Contact function](https://github.com/ahad0245/fecorporation/blob/main/supabase/functions/contact-form/index.ts): supabase edge function · Serverless handler for form submissions · `supabase/functions/contact-form/index.ts`
- [Supabase config](https://github.com/ahad0245/fecorporation/blob/main/supabase/config.toml): deployment config · Supabase project and function deployment settings · `supabase/config.toml`

### Static assets

Public and built media files

- [Public media](https://github.com/ahad0245/fecorporation/blob/main/public/images/Engineering_Global_Liquidity.pdf): static assets · Source images and downloadable files · `public/images/Engineering_Global_Liquidity.pdf`
- [Build output](https://github.com/ahad0245/fecorporation/blob/main/build/index.html): compiled frontend · Generated static site assets · `build/index.html`

### Build tooling

Development and bundling configuration

- [Vite config](https://github.com/ahad0245/fecorporation/blob/main/vite.config.ts): bundler config · Frontend dev server and build configuration · `vite.config.ts`
- [Package manifest](https://github.com/ahad0245/fecorporation/blob/main/package.json): tooling manifest · Dependencies and scripts for the client build · `package.json`
- [Tailwind config](https://github.com/ahad0245/fecorporation/blob/main/tailwind.config.js): style config · Utility-first styling configuration · `tailwind.config.js`
- [Lint config](https://github.com/ahad0245/fecorporation/blob/main/eslint.config.js): quality config · TypeScript and React linting rules · `eslint.config.js`

## Connections

- HTML shell → Main entry: loads · Vite injects the browser entrypoint
- Main entry → App shell: mounts · Bootstraps the root React tree
- App shell → Contact form: renders · Composes the contact form into the UI
- App shell → Error boundary: wraps · Protects the component tree from render failures
- App shell → Team page: renders · Shows team-member content in the app
- Team page → Team data: reads · Uses local structured team content
- Contact form → Contact function: submits to · Sends public form data to the edge function
- Contact function → Supabase config: deployed by · Function is managed as part of Supabase config
- App shell → Mobile hook: adapts with · Switches layout/behavior for smaller screens
- Team page → Utilities: uses · Shared helper logic
- Contact form → Utilities: uses · Shared helper logic
- App shell → App styles: styles · Application-specific stylesheet
- App shell → Base styles: styles · Global base stylesheet
- HTML shell → Public media: serves · Static assets are copied into the site build
- Vite config → Build output: produces · Bundler generates the static frontend artifacts
- Package manifest → Vite config: drives · Project scripts and dependencies support Vite
- Package manifest → Tailwind config: drives · Frontend styling pipeline
- Package manifest → Lint config: drives · Development-time linting and checks
- Build output → Public media: contains · Built site includes copied public assets
- App shell → Build output: bundled into · Client app is compiled into static deployment artifacts
