Prerequisites
Before you begin, ensure you have:- Node.js (version 18 or higher)
- npm (included with Node.js)
- A Supabase project with the required schema
- Git (for cloning the repository)
Install dependencies
Clone the repository and install all required npm packages:This will install all dependencies listed in
package.json, including:- React 19
- Vite 6.2
- Supabase JS client
- Tailwind CSS
- And other runtime dependencies
Configure environment variables
Copy the example environment file to create your local configuration:Edit See the Environment Variables page for detailed descriptions of all available variables.
.env and configure the required environment variables. At minimum, you need:.env
Development Server Details
Port Configuration
The dev server runs on port 3000 by default, configured inpackage.json:7:
--host=0.0.0.0 flag makes the server accessible from your network, useful for testing on mobile devices.
Hot Module Replacement
Vite provides fast hot reload functionality:- CSS changes apply instantly without page refresh
- React components reload while preserving state
- TypeScript compilation happens on-demand
Route Aliases
The dev server is configured with route aliases for the SPA:/- Root entry point (auth shell)/app- Main application/admin- Admin dashboard/profile- User profile
Additional Commands
Type Checking
Run TypeScript type checking without emitting files:Build Preview
Build the application and preview it locally:Run Tests
Execute the test suite:Supabase Configuration
Ensure your Supabase project has the required schema migrations applied. Check
supabase/migrations/ for the necessary migration files.Auth Provider Setup
-
Email Provider (Magic Link):
- Enable in Supabase Dashboard → Authentication → Providers → Email
-
Google OAuth:
- Configure Google provider credentials in Supabase Dashboard → Authentication → Providers → Google
-
Redirect URLs:
- Set
SITE_URLto include/approute (e.g.,https://your-domain.com/app) - Add redirect URLs for each environment in Authentication → URL Configuration
- Set
Troubleshooting
Port Already in Use
If port 3000 is already in use, either:- Stop the process using port 3000
- Modify the dev script in
package.jsonto use a different port