This guide will help you set up the TrustUp API development environment on your local machine.
Before you begin, ensure you have the following installed:
- Node.js: v18.x or higher (Download)
- npm: v9.x or higher (comes with Node.js)
- Git: Latest version (Download)
- PostgreSQL: v14.x or higher (for local Supabase) - Optional
- Redis: v7.x or higher (for caching) - Optional, required for Phase 4+
git clone https://github.com/TrustUp/TrustUp-API.git
cd TrustUp-APInpm installCopy the example environment file and configure it:
cp .env.example .envSee Environment Variables for detailed configuration options.
Follow the Supabase Setup Guide to configure your database.
npm run migration:runnpm run start:devThe API will be available at http://localhost:3000
curl http://localhost:3000/healthExpected response:
{
"status": "ok",
"timestamp": "2026-02-13T10:00:00.000Z"
}Open your browser and navigate to:
- Swagger UI:
http://localhost:3000/api - ReDoc:
http://localhost:3000/api-docs
Install the NestJS CLI globally for easier development:
npm install -g @nestjs/cli# Run in development mode with hot-reload
npm run start:dev
# Run in production mode
npm run start:prod
# Run tests
npm run test
# Run tests with coverage
npm run test:cov
# Run e2e tests
npm run test:e2e
# Lint code
npm run lint
# Format code
npm run format
# Build for production
npm run buildIf you prefer using Docker:
# Build and start containers
docker-compose up -d
# View logs
docker-compose logs -f api
# Stop containers
docker-compose downIf port 3000 is already in use, change the PORT in your .env file:
PORT=3001- Verify your Supabase credentials in
.env - Check if Supabase project is active
- Ensure your IP is allowed in Supabase settings
Clear cache and reinstall:
rm -rf node_modules package-lock.json
npm installAfter installation:
- Review the Architecture Overview
- Read the Development Guidelines
- Check the Roadmap for current development phase
- See Contributing Guidelines to start contributing
Last Updated: 2026-02-13