Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/JulietaEM/EdgeTimer/llms.txt

Use this file to discover all available pages before exploring further.

The EdgeTimer backend requires Node.js, a Supabase project, and a small set of environment variables. The steps below walk through cloning the repository, installing dependencies, wiring up Supabase credentials, and starting the server in both development and production modes.
1

Clone the repo and navigate to the backend

git clone https://github.com/JulietaEM/EdgeTimer.git
cd EdgeTimer/backend
2

Install dependencies

npm install
This installs NestJS 11, the Supabase JS client, and all dev dependencies including the NestJS CLI, TypeScript, and Jest.
3

Configure environment variables

Create a .env file in the backend/ directory. At a minimum you need the three Supabase connection variables:
.env
SUPABASE_URL=https://<your-project-ref>.supabase.co
SUPABASE_KEY=<your-anon-public-key>
SUPABASE_SERVICE_ROLE_KEY=<your-service-role-key>
The application throws at startup if any of these three are missing. See Environment variables for the full variable reference including optional storage bucket names.
Find SUPABASE_URL and SUPABASE_KEY under Project Settings → API in the Supabase dashboard. The SUPABASE_SERVICE_ROLE_KEY is listed in the same section under Service role.
4

Start the development server

npm run start:dev
This runs nest start --watch, which recompiles on every file change. The server listens on http://localhost:3000 by default.
5

Build and run for production

npm run build
npm run build compiles TypeScript to dist/ using the NestJS CLI. npm run start:prod runs the compiled output directly with node dist/main.js. This is the same sequence the Procfile uses on Heroku.

Available scripts

All scripts are defined in package.json and invoked via npm run <script>.
ScriptCommandDescription
startnest startStart without file watching
start:devnest start --watchStart with hot reload
start:debugnest start --debug --watchStart with Node.js debugger attached
start:prodnode dist/main.jsRun the compiled output
buildnest buildCompile TypeScript to dist/
testjestRun unit tests
test:e2ejest --config ./test/jest-e2e.jsonRun end-to-end tests
# Hot-reloading server
npm run start:dev

# Debugger on port 9229
npm run start:debug

Build docs developers (and LLMs) love