Skip to main content

Frontend Overview

Tech Stack

TechnologyPurpose
Next.js 14React framework with App Router + RSC
React 18UI library
Tailwind CSS 3Utility-first styling
shadcn/uiRadix-based component library
Apollo Client 3GraphQL client (HTTP + auth middleware)
NextAuth.js 4GitHub OAuth authentication
xterm.jsBrowser terminal emulator
react-use-websocketWebSocket for SSH sessions
react-hook-form + zodForm validation

Directory Structure

frontend/src/
├── app/ # Next.js App Router pages
│ ├── layout.tsx # Root layout (providers)
│ ├── globals.css # Tailwind + CSS variables
│ ├── (app)/ # Authenticated routes
│ │ ├── layout.tsx # Navbar wrapper
│ │ ├── page.tsx # Dashboard
│ │ ├── new/ # New project wizard
│ │ ├── project/[username]/ # Project detail
│ │ ├── projects/ # Project listing
│ │ └── settings/ # User settings + billing
│ ├── (auth)/ # Auth routes
│ │ └── login/
│ └── api/auth/[...nextauth]/ # NextAuth API
├── action/ # Server Actions
│ ├── auth.ts # authenticateAction, logoutAction
│ ├── project.ts # pauseProject, resumeProject
│ └── rollback.ts
├── components/
│ ├── internal/ # App-specific components
│ │ ├── common/ # Navbar, theme toggle, logout
│ │ ├── forms/ # Form components
│ │ ├── new/ # New project wizard
│ │ ├── project/ # Project detail
│ │ ├── settings/ # Settings panels
│ │ ├── tabs/ # Build/Container/Terminal
│ │ └── wrapper/ # Apollo, Session, Theme providers
│ └── ui/ # shadcn/ui primitives
├── data/ # Data fetching + GraphQL queries
├── hooks/ # Custom hooks (useAuth)
└── lib/ # Utilities
├── graphql.ts # Apollo client (browser)
├── server-utils.ts # Apollo client (SSR) + auth
└── utils.ts # cn(), parseEnv(), etc.

Layout Hierarchy

Routing

RouteLayoutPurpose
/(app)Dashboard / project listing
/login(auth)GitHub OAuth login
/new(app)New project creation wizard
/new/build-args(app)Docker build arguments
/new/environment(app)Environment variables
/new/meta-data(app)Project metadata
/projects(app)All projects list
/project/[username](app)Project detail page
/settings(app)User settings
/settings/billing(app)Billing settings