This repository contains the web-facing portion of my Embedded Systems project for a campus-wide lab monitoring service.
Ensure that you're using Node.js v22.x (LTS):
nvm use 22Once you've installed dependencies with pnpm install, start a development server:
pnpm run dev
# or start the server and open the app in a new browser tab
pnpm run dev -- --openYou will need to add the required environment variables in a .env file:
This project uses Supabase as its backend for database and authentication.
To run Supabase locally, follow these steps:
-
Install the Supabase CLI (as a dev dependency):
pnpm install supabase -D
-
Start the local Supabase development environment (this runs a local Postgres and Supabase services):
pnpx supabase start
-
Fetch environment variables required for local development:
pnpx supabase status -o env
From the output, copy and paste the necessary variables in your
.envfile at the root of the project.
Once Supabase is running locally and environment variables are set, the web app can interact with your local Supabase instance during development.
Secrets and other configuration values are managed through environment variables. When developing locally, they can be
configured by creating a .env file in the project's root.
Important
Environment variables prefixed by PUBLIC_ are intended to be visible client-side.
The following variables can be configured:
| VAR | DESC | DEFAULT |
|---|---|---|
| PUBLIC_BASE_URL | Base URL of the project | http://localhost:5173 |
| SUPABASE_SERVICE_ROLE_KEY | Supabase service role key (server-only) | {YOUR_SERVICE_ROLE_KEY} |
| PUBLIC_SUPABASE_URL | Supabase project URL | {YOUR_PUBLIC_SUPABASE_URL} |
| SUPABASE_DB_URL | Direct Postgres connection URL | {YOUR_SUPABASE_DB_URL} |
| SUPABASE_ANON_KEY | Supabase anon client key | {YOUR_SUPABASE_ANON_KEY} |
This project is available under the MIT License. See the LICENSE file here.