How arasue-corp/arasue-horizon works
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: [lang] Locale tree · forge Brand sections · lead.ts Lead action · app App Router
Components 20
Routing & locale
App Router entrypoints, locale segmentation, and SEO routes
- App Router · Top-level application entry and route composition
src/app - Locale tree · Localized route boundary for all brand microsites
src/app/[lang] - SEO routes · Generated robots and sitemap endpoints
src/app/robots.ts - Home page · Root route for the portfolio experience
src/app/page.tsx - Lead action · Central lead capture and inquiry ingestion
src/app/actions/lead.ts - Dictionaries · Static locale content for English and Spanish
src/i18n/dictionaries/en.json - Locale loader · Dictionary access layer used by routed pages
src/i18n/dictionaries.ts
Brand microsites
Independent brand areas rendered from the localized route tree
- Holding · Corporate/holding brand subtree
src/app/[lang]/(holding) - Forge · Agency/services brand subtree
src/app/[lang]/(forge) - Labs · Experimental/shop brand subtree
src/app/[lang]/(labs) - Studios · Creative/services brand subtree
src/app/[lang]/(studios) - Protection · Calculator-focused product subtree
src/app/[lang]/(protection) - Workshop · Demo gallery and showcase subtree
src/app/[lang]/(workshop)
Shared UI
Reusable components and design-system primitives
- Brand sections · Reusable presentational blocks assembled by pages
src/components/forge - UI primitives · Shared buttons, cards, menus, sheets, accordion, and logo
src/components/ui - Motion · Shared client-side animation boundary
src/components/Motion.tsx - Client widgets · Client-only calculators, galleries, and dynamic demos
src/components/protection/ProtectionCalculator.tsx
Deployment runtime
Cloudflare/OpenNext build and edge execution layer
- Edge runtime · Middleware and Cloudflare-compatible request handling
functions/[[path]].js - OpenNext build · Generated Next.js-to-Cloudflare build output
.open-next/server-functions/default/handler.mjs - Cloudflare worker · Deployed worker entry produced from the build pipeline
.open-next/worker.js
Connections 27
- 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