Frontend Setup
This guide walks you through setting up the Maybern React frontend for local development.All commands in this guide should be run from within the
frontend/ directory unless otherwise specified.Set Up Node.js with nvm
1
Install nvm
Install Node Version Manager via Homebrew:
2
Add nvm to shell configuration
Add nvm to your
.zshrc:3
Install the project Node version
Install the Node.js version specified in
.nvmrc:4
Activate the Node version
Use the project’s Node version:
Set Up pnpm Package Manager
Install pnpm globally:Set Up Environment Variables with direnv
1
Install direnv
2
Add direnv hook to shell
3
Reload shell configuration
Open a new shell or reload your configuration:
4
Allow direnv for the project
Allow direnv to load the
.envrc file:Generate API Clients
Generate the TypeScript API clients from the backend OpenAPI specification:orval.config.ts.
Run this command whenever the backend API changes to keep the frontend clients in sync.
Run the Frontend (Basic)
Start the development server:http://localhost:3000.
Run with HTTPS and Subdomains (Recommended)
For full functionality including customer-specific subdomains, set up HTTPS locally.1
Set up local DNS resolution
Install and configure dnsmasq to resolve
.test domains locally:2
Set up local certificate authority
Install mkcert and create a local CA for HTTPS:
3
Start with subdomains
Start the development server with HTTPS and subdomain support:
4
Open the app
Navigate to https://app.maybern.test:3000 in your browser.
You should see the Maybern login page. If you see a certificate warning, you may need to trust the mkcert CA in your browser.
Test a Production Build
To verify the production build works correctly:IDE Setup (VS Code / Cursor)
Install the recommended extensions:- ESLint: JavaScript/TypeScript linting
- Prettier: Code formatting
settings.json: