Skip to content

Verdone/soen-422-project

Repository files navigation

SOEN 422 Project - Web Server

logo

This repository contains the web-facing portion of my Embedded Systems project for a campus-wide lab monitoring service.

Developers

Ensure that you're using Node.js v22.x (LTS):

nvm use 22

Once 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 -- --open

You will need to add the required environment variables in a .env file:

Set Up Supabase

This project uses Supabase as its backend for database and authentication.

To run Supabase locally, follow these steps:

  1. Install the Supabase CLI (as a dev dependency):

    pnpm install supabase -D
  2. Start the local Supabase development environment (this runs a local Postgres and Supabase services):

    pnpx supabase start
  3. Fetch environment variables required for local development:

    pnpx supabase status -o env

    From the output, copy and paste the necessary variables in your .env file 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.

Configure Environment Variables

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}

License

This project is available under the MIT License. See the LICENSE file here.

About

Web Server for an IoT prototype that monitors lab occupancy and noise conditions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published