Prerequisites
Before you begin, make sure you have the following installed:- Node.js 20 or higher
- PostgreSQL 16
- npm (comes with Node.js)
- Git
Setup steps
1
Clone the repository
2
Configure environment variables
Copy the example environment file and fill in your values:Open
.env and set the following variables:.env
3
Install dependencies
4
Create the database and run migrations
First, create the PostgreSQL database:Then run the migrations to create all tables:This runs all migration files in the
src/database/migrations/ directory, creating the users, tasks, challenges, and related tables.5
Start the development server
http://localhost:3000. You should see output indicating the server is listening.6
Test that it works
Create your first account with a signup request:A successful response returns a JWT token and your user profile:Save your token — you’ll need it for all subsequent requests via the
Authorization: Bearer <token> header.Available npm scripts
Next steps
Authentication
Learn how to use your JWT token to access protected endpoints.
API Reference
Explore the full API documentation for all endpoints.
Gamification
Understand how points and streaks work.
Configuration
Full reference for all environment variables.