Nexium Media Docs
DevelopmentFrontend

Project Structure

Architectural layout of files, directories, and route patterns across our frontend applications.

Frontend Project Structure

We follow the Next.js App Router conventions with clear separation of concerns across layouts, route segments, and shared UI libraries.

Directory Layout

layout.tsx
page.tsx
globals.css
header.tsx
sidebar.tsx

Architectural Conventions

1. Colocation

Keep styles, unit tests, and helper functions close to the components that consume them.

2. Path Aliases

Always use @/ alias for root relative imports:

import { Button } from '@/components/ui/button';
import { cn } from '@/lib/utils';

3. Server vs Client Boundaries

Structure components with pure Server Components as orchestrators, passing data down into minimal Client Components for interactivity.

Was this page helpful?

Let us know how we can make our documentation better.

Edit on GitHub

Last updated on

On this page