# arasue-corp/arasue-horizon architecture

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

- Interactive diagram: https://gitdiagram.com/arasue-corp/arasue-horizon
- Repository: https://github.com/arasue-corp/arasue-horizon

## Overview

1. This is a multilingual Next.js App Router site organized as a portfolio of branded microsites rather than a single generic web app. The URL space is split by locale (`[lang]`) and by business line: holding, forge, labs, studios, protection, and workshop.

2. The top-level request entry is the App Router in `src/app`. The root route (`src/app/page.tsx`) and the localized tree under `src/app/[lang]/...` determine which brand experience is rendered. The route groups like `(holding)` and `(forge)` are important boundaries: they isolate layouts, navigation, and page composition for each brand.

3. Each brand area has its own layout and page set. For example, holding includes about/contact/investors/newsroom/privacy/terms, forge includes services/pricing/portfolio/contact, labs includes story/shop/contact, studios includes services/work/contact/creators, protection has a calculator-focused product page, and workshop contains demo galleries. This strongly suggests a content-heavy marketing/lead-gen architecture with multiple independent funnels.

4. Most page logic is composed from reusable section components under `src/components/<brand>`. These are mostly presentational blocks such as hero sections, feature grids, FAQs, case studies, testimonials, calculators, and contact forms. The pages assemble these components, so the diagram should show “route → page → branded section components” as the core rendering flow.

5. Shared UI primitives live in `src/components/ui` and include generic controls like buttons, cards, accordion, menus, sheets, and the logo. These are the lowest-level design-system boundary and are reused across brands to keep visual consistency while allowing different page compositions.

6. There is a clear client/server split for interactive features. Client-side components exist for calculators, galleries, motion-heavy sections, and dynamic demos, while server-side rendering is the default for the page routes. The `Motion.tsx` and multiple `*Client.tsx` files indicate a deliberate boundary where only interactive sections opt into client execution.

7. Form submission and lead capture are centralized in `src/app/actions/lead.ts` plus dedicated form components in the brand folders. That suggests a server-action-based ingestion path for contact/inquiry data, with forms embedded in multiple microsites rather than each site having its own backend.

8. Internationalization is implemented with static dictionaries in `src/i18n/dictionaries/en.json` and `es.json`, wired through `src/i18n/dictionaries.ts`. The locale segment in the route tree means the same pages render in multiple languages from shared component logic, with text/content selected at the boundary of routing and composition.

9. Static content and assets are locally bundled in `public/`, including leadership materials and images. This indicates the site is primarily self-contained content delivery, with no obvious external CMS or database in the repository structure.

10. The `src/app/robots.ts` and `src/app/sitemap.ts` routes generate SEO metadata dynamically from the app structure. That matters architecturally because the route map is part of the content model and should be shown as generated from the same application boundary, not as separate infrastructure.

11. The deployment/runtime layer is Cloudflare-oriented. The presence of `.open-next`, `.wrangler`, `functions/[[path]].js`, and OpenNext build outputs shows that the Next.js app is adapted for Cloudflare Workers/Pages deployment rather than a plain Node server. In the diagram, this should appear as “Next.js source → OpenNext build → Cloudflare runtime.”

12. Middleware and edge behavior are part of the deployment path. The repo contains middleware build artifacts and scripts for adding/removing edge runtime settings, which implies request rewriting, locale handling, or runtime compatibility is handled at the edge layer before the route renders.

13. The repository includes a number of maintenance scripts (`fix-*`, `add-*`, `remove-*`, `update_dicts.js`, `scaffold_pages.js`) that appear to support bulk refactoring and content generation. These are not runtime subsystems, but they explain how the app’s repeated microsite structure and locale content are maintained.

14. Overall architecture: localized requests enter the edge/runtime layer, route into one of several brand-specific App Router subtrees, render pages assembled from shared UI and brand components, and optionally submit leads through server actions. The main boundaries to diagram are routing/localization, brand microsites, shared component library, interactive client-only widgets, and Cloudflare/OpenNext deployment.

Main entry points: [`src/app/[lang]`](https://github.com/arasue-corp/arasue-horizon/tree/main/src/app/[lang]) (Locale tree), [`src/components/forge`](https://github.com/arasue-corp/arasue-horizon/tree/main/src/components/forge) (Brand sections), [`src/app/actions/lead.ts`](https://github.com/arasue-corp/arasue-horizon/blob/main/src/app/actions/lead.ts) (Lead action), [`src/app`](https://github.com/arasue-corp/arasue-horizon/tree/main/src/app) (App Router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Routing & locale"]
  node_app_root["App Router<br/>next app"]
  node_lang_tree["Locale tree<br/>locale routes"]
  node_seo_routes["SEO routes<br/>meta routes<br/>[robots.ts]"]
  node_home_page["Home page<br/>landing page<br/>[page.tsx]"]
  node_lead_action["Lead action<br/>server action<br/>[lead.ts]"]
  node_dicts["Dictionaries<br/>i18n store<br/>[en.json]"]
  node_dict_loader["Locale loader<br/>i18n wiring<br/>[dictionaries.ts]"]
end

subgraph group_brands["Brand microsites"]
  node_holding_route["Holding<br/>microsite route"]
  node_forge_route["Forge<br/>microsite route"]
  node_labs_route["Labs<br/>microsite route"]
  node_studios_route["Studios<br/>microsite route"]
  node_protection_route["Protection<br/>product route"]
  node_workshop_route["Workshop<br/>demo route"]
end

subgraph group_shared["Shared UI"]
  node_brand_ui["Brand sections"]
  node_ui_primitives["UI primitives<br/>design system"]
  node_motion["Motion<br/>client wrapper<br/>[Motion.tsx]"]
  node_client_widgets["Client widgets<br/>interactive components"]
end

subgraph group_runtime["Deployment runtime"]
  node_edge_runtime["Edge runtime<br/>cloudflare edge<br/>[[[path]].js]"]
  node_open_next["OpenNext build<br/>deploy build<br/>[handler.mjs]"]
  node_cloudflare_worker["Cloudflare worker<br/>runtime target<br/>[worker.js]"]
end

node_app_root -->|"renders"| node_home_page
node_app_root -->|"delegates"| node_lang_tree
node_lang_tree -->|"contains"| node_holding_route
node_lang_tree -->|"contains"| node_forge_route
node_lang_tree -->|"contains"| node_labs_route
node_lang_tree -->|"contains"| node_studios_route
node_lang_tree -->|"contains"| node_protection_route
node_lang_tree -->|"contains"| node_workshop_route
node_lang_tree -->|"loads"| node_dict_loader
node_dict_loader -->|"reads"| node_dicts
node_holding_route -->|"assembles"| node_brand_ui
node_forge_route -->|"assembles"| node_brand_ui
node_labs_route -->|"assembles"| node_brand_ui
node_studios_route -->|"assembles"| node_brand_ui
node_protection_route -->|"uses"| node_client_widgets
node_workshop_route -->|"uses"| node_client_widgets
node_brand_ui -->|"built on"| node_ui_primitives
node_brand_ui -->|"enhanced by"| node_motion
node_holding_route -->|"submits"| node_lead_action
node_forge_route -->|"submits"| node_lead_action
node_labs_route -->|"submits"| node_lead_action
node_studios_route -->|"submits"| node_lead_action
node_protection_route -->|"submits"| node_lead_action
node_app_root -->|"generates"| node_seo_routes
node_edge_runtime -->|"builds to"| node_open_next
node_open_next -->|"deploys to"| node_cloudflare_worker
node_app_root -->|"served via"| node_edge_runtime

click node_app_root "https://github.com/arasue-corp/arasue-horizon/tree/main/src/app"
click node_lang_tree "https://github.com/arasue-corp/arasue-horizon/tree/main/src/app/[lang]"
click node_seo_routes "https://github.com/arasue-corp/arasue-horizon/blob/main/src/app/robots.ts"
click node_home_page "https://github.com/arasue-corp/arasue-horizon/blob/main/src/app/page.tsx"
click node_holding_route "https://github.com/arasue-corp/arasue-horizon/tree/main/src/app/[lang]/(holding)"
click node_forge_route "https://github.com/arasue-corp/arasue-horizon/tree/main/src/app/[lang]/(forge)"
click node_labs_route "https://github.com/arasue-corp/arasue-horizon/tree/main/src/app/[lang]/(labs)"
click node_studios_route "https://github.com/arasue-corp/arasue-horizon/tree/main/src/app/[lang]/(studios)"
click node_protection_route "https://github.com/arasue-corp/arasue-horizon/tree/main/src/app/[lang]/(protection)"
click node_workshop_route "https://github.com/arasue-corp/arasue-horizon/tree/main/src/app/[lang]/(workshop)"
click node_lead_action "https://github.com/arasue-corp/arasue-horizon/blob/main/src/app/actions/lead.ts"
click node_dicts "https://github.com/arasue-corp/arasue-horizon/blob/main/src/i18n/dictionaries/en.json"
click node_dict_loader "https://github.com/arasue-corp/arasue-horizon/blob/main/src/i18n/dictionaries.ts"
click node_brand_ui "https://github.com/arasue-corp/arasue-horizon/tree/main/src/components/forge"
click node_ui_primitives "https://github.com/arasue-corp/arasue-horizon/tree/main/src/components/ui"
click node_motion "https://github.com/arasue-corp/arasue-horizon/blob/main/src/components/Motion.tsx"
click node_client_widgets "https://github.com/arasue-corp/arasue-horizon/blob/main/src/components/protection/ProtectionCalculator.tsx"
click node_edge_runtime "https://github.com/arasue-corp/arasue-horizon/blob/main/functions/[[path]].js"
click node_open_next "https://github.com/arasue-corp/arasue-horizon/blob/main/.open-next/server-functions/default/handler.mjs"
click node_cloudflare_worker "https://github.com/arasue-corp/arasue-horizon/blob/main/.open-next/worker.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_root,node_lang_tree,node_seo_routes,node_home_page,node_lead_action,node_dicts,node_dict_loader toneBlue
class node_holding_route,node_forge_route,node_labs_route,node_studios_route,node_protection_route,node_workshop_route toneAmber
class node_brand_ui,node_ui_primitives,node_motion,node_client_widgets toneMint
class node_edge_runtime,node_open_next,node_cloudflare_worker toneRose
```

## Components

### Routing & locale

App Router entrypoints, locale segmentation, and SEO routes

- [App Router](https://github.com/arasue-corp/arasue-horizon/tree/main/src/app): next app · Top-level application entry and route composition · `src/app`
- [Locale tree](https://github.com/arasue-corp/arasue-horizon/tree/main/src/app/[lang]): locale routes · Localized route boundary for all brand microsites · `src/app/[lang]`
- [SEO routes](https://github.com/arasue-corp/arasue-horizon/blob/main/src/app/robots.ts): meta routes · Generated robots and sitemap endpoints · `src/app/robots.ts`
- [Home page](https://github.com/arasue-corp/arasue-horizon/blob/main/src/app/page.tsx): landing page · Root route for the portfolio experience · `src/app/page.tsx`
- [Lead action](https://github.com/arasue-corp/arasue-horizon/blob/main/src/app/actions/lead.ts): server action · Central lead capture and inquiry ingestion · `src/app/actions/lead.ts`
- [Dictionaries](https://github.com/arasue-corp/arasue-horizon/blob/main/src/i18n/dictionaries/en.json): i18n store · Static locale content for English and Spanish · `src/i18n/dictionaries/en.json`
- [Locale loader](https://github.com/arasue-corp/arasue-horizon/blob/main/src/i18n/dictionaries.ts): i18n wiring · Dictionary access layer used by routed pages · `src/i18n/dictionaries.ts`

### Brand microsites

Independent brand areas rendered from the localized route tree

- [Holding](https://github.com/arasue-corp/arasue-horizon/tree/main/src/app/[lang]/(holding)): microsite route · Corporate/holding brand subtree · `src/app/[lang]/(holding)`
- [Forge](https://github.com/arasue-corp/arasue-horizon/tree/main/src/app/[lang]/(forge)): microsite route · Agency/services brand subtree · `src/app/[lang]/(forge)`
- [Labs](https://github.com/arasue-corp/arasue-horizon/tree/main/src/app/[lang]/(labs)): microsite route · Experimental/shop brand subtree · `src/app/[lang]/(labs)`
- [Studios](https://github.com/arasue-corp/arasue-horizon/tree/main/src/app/[lang]/(studios)): microsite route · Creative/services brand subtree · `src/app/[lang]/(studios)`
- [Protection](https://github.com/arasue-corp/arasue-horizon/tree/main/src/app/[lang]/(protection)): product route · Calculator-focused product subtree · `src/app/[lang]/(protection)`
- [Workshop](https://github.com/arasue-corp/arasue-horizon/tree/main/src/app/[lang]/(workshop)): demo route · Demo gallery and showcase subtree · `src/app/[lang]/(workshop)`

### Shared UI

Reusable components and design-system primitives

- [Brand sections](https://github.com/arasue-corp/arasue-horizon/tree/main/src/components/forge): sections · Reusable presentational blocks assembled by pages · `src/components/forge`
- [UI primitives](https://github.com/arasue-corp/arasue-horizon/tree/main/src/components/ui): design system · Shared buttons, cards, menus, sheets, accordion, and logo · `src/components/ui`
- [Motion](https://github.com/arasue-corp/arasue-horizon/blob/main/src/components/Motion.tsx): client wrapper · Shared client-side animation boundary · `src/components/Motion.tsx`
- [Client widgets](https://github.com/arasue-corp/arasue-horizon/blob/main/src/components/protection/ProtectionCalculator.tsx): interactive components · Client-only calculators, galleries, and dynamic demos · `src/components/protection/ProtectionCalculator.tsx`

### Deployment runtime

Cloudflare/OpenNext build and edge execution layer

- [Edge runtime](https://github.com/arasue-corp/arasue-horizon/blob/main/functions/[[path]].js): cloudflare edge · Middleware and Cloudflare-compatible request handling · `functions/[[path]].js`
- [OpenNext build](https://github.com/arasue-corp/arasue-horizon/blob/main/.open-next/server-functions/default/handler.mjs): deploy build · Generated Next.js-to-Cloudflare build output · `.open-next/server-functions/default/handler.mjs`
- [Cloudflare worker](https://github.com/arasue-corp/arasue-horizon/blob/main/.open-next/worker.js): runtime target · Deployed worker entry produced from the build pipeline · `.open-next/worker.js`

## Connections

- App Router → Home page: renders · Root route resolves the main landing experience
- App Router → Locale tree: delegates · Localized requests are routed into the language segment
- Locale tree → Holding: contains · Locale tree includes the holding microsite
- Locale tree → Forge: contains · Locale tree includes the forge microsite
- Locale tree → Labs: contains · Locale tree includes the labs microsite
- Locale tree → Studios: contains · Locale tree includes the studios microsite
- Locale tree → Protection: contains · Locale tree includes the protection product route
- Locale tree → Workshop: contains · Locale tree includes the workshop demo route
- Locale tree → Locale loader: loads · Pages resolve locale text through the dictionary boundary
- Locale loader → Dictionaries: reads · Dictionary wiring reads static language content
- Holding → Brand sections: assembles · Holding pages compose branded section components
- Forge → Brand sections: assembles · Forge pages compose branded section components
- Labs → Brand sections: assembles · Labs pages compose branded section components
- Studios → Brand sections: assembles · Studios pages compose branded section components
- Protection → Client widgets: uses · Protection centers an interactive calculator widget
- Workshop → Client widgets: uses · Workshop renders client-only gallery/demo experiences
- Brand sections → UI primitives: built on · Brand sections reuse shared design-system primitives
- Brand sections → Motion: enhanced by · Motion wrapper supports animated sections
- Holding → Lead action: submits · Holding contact and investor flows post leads centrally
- Forge → Lead action: submits · Forge contact and estimator flows post leads centrally
- Labs → Lead action: submits · Labs contact and commerce flows post leads centrally
- Studios → Lead action: submits · Studios contact and inquiry flows post leads centrally
- Protection → Lead action: submits · Protection inquiries can be captured through server actions
- App Router → SEO routes: generates · Application structure feeds robots and sitemap endpoints
- Edge runtime → OpenNext build: builds to · Edge-compatible request handling is packaged by OpenNext
- OpenNext build → Cloudflare worker: deploys to · OpenNext output becomes the Cloudflare runtime artifact
- App Router → Edge runtime: served via · Requests pass through the edge/runtime layer before rendering
