Installing Dependencies
Install npm packages
next(v14.2.15) - React frameworkreact&react-dom- React core libraries@mantine/core- UI component library@mantine/*- Mantine ecosystem packages@supabase/supabase-js- Supabase client@tabler/icons-react- Icon librarytypescript- TypeScript support
Configure environment variables
Create a
.env.local file in the frontend directory. See Environment Variables for Supabase configuration.Mantine UI Setup
Highway uses Mantine v7 for its UI components. The configuration is handled in the root layout:Theme Configuration
The app uses a dark theme with custom color palette:src/app/layout.tsx
MantineProvider Setup
src/app/layout.tsx
Installed Mantine Packages
Highway includes the full Mantine ecosystem:@mantine/core- Core components@mantine/hooks- Useful React hooks@mantine/form- Form management@mantine/notifications- Toast notifications@mantine/modals- Modal dialogs@mantine/dates- Date picker components@mantine/charts- Chart components (with Recharts)@mantine/carousel- Carousel component@mantine/dropzone- File upload@mantine/spotlight- Command palette@mantine/code-highlight- Code highlighting@mantine/tiptap- Rich text editor@mantine/nprogress- Progress bar
Directory Structure
The frontend follows Next.js App Router structure:Key Directories
src/app/ - Application pages and layouts- Uses Next.js 14 App Router
- Server and client components
- File-based routing
- UI components
- Shared layout components
- Supabase client configuration (
client.ts,server.ts,middleware.ts) - API helper functions (
api.ts)
Starting the Dev Server
The development server includes hot module replacement (HMR) for instant updates.
Building for Production
Create production build
- Compiles TypeScript
- Optimizes React components
- Generates static pages
- Creates production bundles
Theme Customization
Color Palette
The dark theme uses a custom gray-blue palette:| Shade | Color | Usage |
|---|---|---|
| 0 | #d5d7e0 | Lightest text |
| 1 | #acaebf | Secondary text |
| 2 | #8c8fa3 | Muted text |
| 6 | #2b2c3d | Borders |
| 7 | #1d1e30 | Navbar background |
| 8 | #0c0d21 | Main background |
| 9 | #01010a | Darkest shade |
AppShell Configuration
The layout uses Mantine’s AppShell component:Custom Fonts
Highway uses Geist fonts:- Geist Sans - Primary UI font
- Geist Mono - Monospace font
PostCSS Configuration
The app uses PostCSS with Mantine preset:postcss.config.cjs
TypeScript Configuration
TypeScript is configured with Next.js-optimized settings:tsconfig.json
Linting
Run ESLint to check code quality:Verification
Test your frontend setup:Test navigation
- Click “Dashboard” in the sidebar
- Click “Verification Call Logs”
- Verify navigation works correctly
Next Steps
Environment Variables
Configure Supabase and other frontend variables
Deployment
Deploy your frontend to production