Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Taykl12/Classify/llms.txt

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

This guide walks you through running Classify locally from scratch. You will start the Express 5 API server on port 3001 and the Vite frontend on port 5173. In development, Vite transparently proxies all /api/* requests to Express, so no cross-origin configuration is needed on your machine.
You need an active Supabase project before starting. Create one at supabase.com and collect your Project URL, anon key, and service role key from the Supabase Dashboard under Settings → API. You also need Node.js ≥ 18 and pnpm ≥ 9 installed globally.
1

Clone the repository and install dependencies

Clone the Classify monorepo and install all workspace dependencies with a single pnpm install. pnpm workspaces will hoist shared packages and link the classify-server package automatically.
git clone https://github.com/your-org/classify.git
cd classify
pnpm install
The workspace root contains both the React frontend (src/) and the Express backend (server/). You do not need to cd into subdirectories to install — pnpm handles every workspace in one pass.
2

Configure server environment variables

The Express server reads its configuration from server/.env. Copy the provided example file and fill in your Supabase credentials and other required values.
cp server/.env.example server/.env
Open server/.env in your editor and set the following variables:
# server/.env

# Your Supabase project URL
SUPABASE_URL=https://<your-project-ref>.supabase.co

# Supabase anon key — safe to use in server-side requests
SUPABASE_ANON_KEY=<your-anon-key>

# Supabase service role key — used only by admin routes, never exposed to clients
SUPABASE_SERVICE_ROLE_KEY=<your-service-role-key>

# Express listen port (default: 3001)
PORT=3001

# Allowed CORS origin — must match the Vite dev server URL
APP_ORIGIN=http://localhost:5173

# Shared secret for ESP32 device authentication
ESP32_DEVICE_TOKEN=dev-esp32-token
Never commit server/.env to version control. The SUPABASE_SERVICE_ROLE_KEY bypasses all Row-Level Security policies and must be kept secret. Rotate it immediately if it is ever exposed.
3

Start the Express API server

Run the backend in watch mode using tsx. The server will restart automatically whenever you save a file inside server/src/.
pnpm run dev:server
You should see output similar to:
🚀 Classify API listening on port 3001
Confirm the server is healthy by visiting http://localhost:3001 or running:
curl http://localhost:3001/api/health
4

Start the Vite frontend

In a second terminal, start the Vite development server. It will automatically proxy any request whose path begins with /api to http://localhost:3001, so your React app never makes cross-origin requests during development.
pnpm run dev
Vite will print:
VITE v6.x.x  ready in Xms

➜  Local:   http://localhost:5173/
➜  Network: use --host to expose
On Windows you can use start-dev.bat to launch both the API and Vite servers in separate console windows with a single double-click.
5

Open the app and log in

Navigate to http://localhost:5173 in your browser. You will be redirected to /login if you are not authenticated.Enter the credentials of a seeded user (or one you created directly in the Supabase dashboard). On successful login, the server issues a JWT that is stored as classify_access_token in localStorage. Every subsequent API call includes this token as a Bearer header.
http://localhost:5173/login
After logging in you will land on the /dashboard. From there you can navigate to:
PathDescription
/dashboardHome overview
/proyectosProject list
/calendarioAcademic calendar
/proyectos/:id/configProject settings
If you receive a 401 Unauthorized response at any point, Classify will automatically clear the stored token and redirect you back to /login. The apiFetchWithRetry helper retries requests up to 3 times on 502, 503, and 504 gateway errors before surfacing the failure to the UI.

Next Steps

Architecture

Explore the monorepo layout, the Vite proxy configuration, Express middleware chain, and how Supabase RLS policies protect your data.

Authentication API

Learn how Classify issues and validates JWTs, handles token refresh, and protects role-restricted API routes.

Build docs developers (and LLMs) love