Generated: 2026-01-08 Part: main Type: React Router v7 Web Application
OCOBO website is a React Router v7 (formerly Remix) application with internationalization support, implementing a modern full-stack React architecture with server-side rendering and edge deployment capabilities.
| Category | Technology | Version | Justification |
|---|---|---|---|
| Framework | React Router v7 | ^7.8.1 | Full-stack React with SSR, file-based routing, evolved from Remix |
| Language | TypeScript | ^5.9.2 | Type safety, better DX, modern JavaScript features |
| Runtime | Node.js | >=22.0.0 | Latest LTS, required for React Router v7 features |
| Package Manager | pnpm | latest | Fast, efficient, disk space optimization |
| Styling | Panda CSS | ^1.8.1 | CSS-in-JS with atomic CSS generation, type-safe |
| UI Components | Ark UI | ^5.30.0 | Accessible, unstyled component primitives (migrated from Radix) |
| Content | Markdoc | ^0.5.4 | Markdown processing for blog/content pages |
| Internationalization | React i18next | ^15.6.1 | French/English support with SSR compatibility |
| Testing | Vitest | ^3.2.4 | Fast unit testing with coverage reporting |
| Code Quality | Biome | 1.9.4 | Fast linting and formatting |
| Deployment | Vercel | N/A | Edge deployment with global CDN |
The application follows React Router v7's file-based routing with a layered component architecture:
┌─────────────────────────────────────────┐
│ Presentation Layer │
│ • Routes (file-based) │
│ • UI Components (Ark UI + Custom) │
│ • Layout Components │
└─────────────────────────────────────────┘
┌─────────────────────────────────────────┐
│ Business Layer │
│ • Route Loaders (data fetching) │
│ • Content Processing │
│ • Form Actions │
└─────────────────────────────────────────┘
┌─────────────────────────────────────────┐
│ Data Layer │
│ • GitHub API Integration │
│ • Filesystem Operations │
│ • Cache Management │
└─────────────────────────────────────────┘
-
Server-Side Rendering (SSR)
- React Router v7 loader functions
- SEO optimization
- Progressive enhancement
-
File-Based Routing
- Convention over configuration
- Automatic code splitting
- Nested layouts
-
Content-Driven Architecture
- GitHub-based content management
- Markdoc processing pipeline
- Dual source support (local/remote)
-
Edge-First Design
- Vercel Edge Runtime compatibility
- Global content caching
- Optimal performance worldwide
Hybrid Content Sources:
- Development: Local filesystem (
~/projects/ocobo-posts/) - Production: GitHub API with branch targeting
- Caching: Vercel Edge Cache for external sources
Content Types:
- Blog posts (Markdown with frontmatter)
- Client stories (Markdown with metadata)
- Static pages (React components)
- Legal documents (Markdown)
Content Processing Pipeline:
GitHub/Filesystem → Markdoc Parser → React Components → SSR → Client
Client-Side State:
- React Context for theme/language
- Local component state
- Form state management
Server-Side State:
- Route loaders for data fetching
- Session management (i18next)
- Content cache coordination
preset/ # Panda CSS Design System
├── tokens/ # Design tokens (colors, spacing, typography)
├── recipes/ # Component variants (button, input, etc.)
├── patterns/ # Layout patterns (flex, grid, container)
├── slot-recipes/ # Multi-part components (accordion, select)
└── utilities/ # Custom utilities
@ocobo/styled-system/ # Generated CSS-in-JS outputs
├── css/ # Core CSS utilities
├── jsx/ # Styled JSX components
├── patterns/ # Pattern components
├── recipes/ # Recipe components
└── types/ # TypeScript definitions
app/components/
├── ui/ # Base UI components (Button, Input, Card)
├── homepage/ # Page-specific components
├── blog/ # Blog-related components
├── stories/ # Client stories components
├── projects/ # Projects page components
├── strategy/ # Strategy page components
└── icons/ # Icon components
-
Base UI Components (
ui/)- Atomic components (Button, Input, Label)
- Layout components (Container, Card)
- Interaction components (Carousel, Accordion)
-
Feature Components
- Page-specific business logic
- Content-aware components
- Integration-specific UI
-
Layout Components
- Main layout structure
- Header/Footer components
- Navigation systems
Public Routes:
/ # Homepage (with optional language param)
/($lang)/ # Internationalized routes
/blog/ # Blog listing
/blog/$slug # Individual blog posts
/clients/ # Client stories listing
/clients/$slug # Individual client stories
/contact # Contact form
/projets-revops # Projects page
/strategies-revenue-operations # Strategy page
System Routes:
/robots.txt # SEO robots file
/sitemap.xml # XML sitemap
/legal/$slug # Legal documents
/media/$slug # Media files
Route Loaders:
// Example: Blog listing loader
export const loader = createHybridLoader(
async ({ request }) => {
const [status, _state, posts] = await fetchBlogposts();
if (status !== 200) return { posts: [], error: true };
return { posts: posts || [] };
},
'blogPost' // Cache strategy
);Content Fetching:
- Abstracted content API (
app/modules/content/) - Source-agnostic interface
- Built-in caching and error handling
- Setup:
pnpm install && pnpm prepare - Development:
pnpm dev(filesystem content) orpnpm dev:github - Quality:
pnpm check && pnpm test - Build:
pnpm buildfor production testing
Pre-commit Checks:
- Biome linting and formatting
- TypeScript type checking
- Unit test execution
- Style system generation
CI/CD Pipeline:
- Automated testing on push/PR
- Multi-job validation (lint, format, test)
- Coverage reporting
Infrastructure:
- Global edge network
- Automatic scaling
- Zero-config deployment
Environment Configuration:
Production: CONTENT_SOURCE=github, GITHUB_BRANCH=main
Preview: CONTENT_SOURCE=github, GITHUB_BRANCH=offers
Development: CONTENT_SOURCE=locale
Caching Strategy:
- Edge caching for GitHub content
- No caching for local development
- Cache bypass via
?refresh=1
-
Build Optimizations
- Automatic code splitting
- Tree shaking
- Bundle analysis available
-
Runtime Optimizations
- Server-side rendering
- Progressive enhancement
- Edge caching
-
Content Optimizations
- Markdown processing at build time
- Image optimization (Vercel)
- Asset optimization
- Framework: Vitest with coverage
- Coverage Target: Critical business logic
- Test Location: Co-located with source files
- API Testing: Content fetching validation
- Component Testing: UI component behavior
- Route Testing: Loader and action validation
- Static Analysis: Biome linting
- Type Safety: TypeScript strict mode
- Code Coverage: Automated reporting
- Languages: French (default), English
- Route Structure:
/(French),/en/(English) - Translation Files:
locales/fr/,locales/en/ - Detection: Browser language detection with override
- Language-aware content fetching
- Metadata localization
- URL generation for language switching
- GitHub token-based API access
- Environment variable protection
- Content validation and sanitization
- Environment variable isolation
- HTTPS enforcement
- Vercel platform security features
- Vercel Analytics integration
- Core Web Vitals tracking
- Function execution monitoring
- Route-level error boundaries
- Graceful degradation for content failures
- Development vs production error handling
This architecture supports the OCOBO website's requirements for a fast, maintainable, and globally accessible web presence with robust content management and internationalization capabilities.