Skip to main content

Project Structure

This document describes the project structure of the Infowebplus application.

Directory Structure

infowebplus/
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── [locale]/ # Localized routes
│ │ │ ├── page.tsx # Home page
│ │ │ ├── services/ # Services page
│ │ │ ├── about/ # About page
│ │ │ ├── saas/ # SaaS page
│ │ │ ├── contact/ # Contact page
│ │ │ ├── get-a-quote/ # Quote calculator page
│ │ │ └── careers/ # Careers page
│ │ ├── api/ # API routes
│ │ │ ├── cache/ # Cache management
│ │ │ ├── quote/ # Quote system
│ │ │ ├── contact/ # Contact form
│ │ │ └── webhooks/ # Webhook handlers
│ │ ├── globals.css # Global styles
│ │ └── layout.tsx # Root layout
│ ├── components/ # React components
│ │ ├── ui/ # UI components (shadcn/ui style)
│ │ ├── layout/ # Layout components
│ │ └── sections/ # Page sections
│ ├── i18n/ # Internationalization
│ └── lib/ # Utilities and helpers
│ ├── sanity.ts # Sanity client
│ ├── cache.ts # Caching utilities
│ ├── apollo-client.ts # GraphQL client
│ └── utils.ts # General utilities
├── messages/ # Translation files
│ ├── en.json # English
│ ├── es.json # Spanish
│ └── ro.json # Romanian
├── studio/ # Sanity Studio
│ ├── schemas/ # CMS schemas
│ ├── plugins/ # Custom plugins
│ └── structure.ts # Studio structure
├── public/ # Static assets
├── docs/ # Documentation (this site)
└── scripts/ # Utility scripts

Key Directories

src/app/

Next.js App Router directory containing all pages and API routes.

  • [locale]/ - Localized pages using Next.js dynamic routes
  • api/ - Serverless API routes

src/components/

React components organized by purpose:

  • ui/ - Reusable UI components (buttons, inputs, etc.)
  • layout/ - Layout components (navbar, footer)
  • sections/ - Page-specific sections (hero, services, etc.)

src/lib/

Utility functions and client configurations:

  • sanity.ts - Sanity CMS client setup
  • cache.ts - Caching layer implementation
  • apollo-client.ts - GraphQL client for Sanity
  • utils.ts - General helper functions

studio/

Sanity Studio configuration:

  • schemas/ - Content type definitions
  • plugins/ - Custom Studio plugins
  • structure.ts - Studio navigation structure

messages/

Internationalization translation files using next-intl format.

File Naming Conventions

  • Components: PascalCase (e.g., QuoteCalculator.tsx)
  • Utilities: camelCase (e.g., cache.ts)
  • Pages: lowercase with hyphens (e.g., get-a-quote/page.tsx)
  • API Routes: lowercase (e.g., api/quote/submit/route.ts)

Next Steps