- Node.js 20 LTS or higher
- npm or yarn
- Git
- Supabase account and project
git clone <repository-url>
cd StepFi-APInpm installCopy the example environment file:
cp .env.example .envEdit .env and configure the following variables:
# ===========================================
# SUPABASE CONFIGURATION
# ===========================================
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# ===========================================
# PORT
# ===========================================
PORT=4000This project uses Supabase remote instance only. You must have a Supabase project set up.
-
Create or access your Supabase project at supabase.com
-
Get your project credentials:
- Go to your project → Settings → API
- Copy the following:
- Project URL →
SUPABASE_URL - anon public key →
SUPABASE_ANON_KEY - service_role secret key →
SUPABASE_SERVICE_ROLE_KEY
- Project URL →
-
Update your
.envfile with the credentials:SUPABASE_URL=https://your-project.supabase.co SUPABASE_ANON_KEY=your_anon_key_here SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_here
-
Access Supabase Dashboard: Go to your project dashboard on supabase.com
Note: Migrations require Supabase CLI. Install it and login:
npm install -g supabase
supabase loginsupabase link --project-ref your-project-refYou can find your project ref in your Supabase project settings.
supabase migration new migration_nameThis creates a new file in supabase/migrations/ with timestamp format: YYYYMMDDHHMMSS_migration_name.sql
supabase db pushThis applies migrations to your remote Supabase project.
supabase migration repair --status reverted migration_nameIf you need Redis for local development:
docker run -d -p 6379:6379 redis:7brew install redis
brew services start redisnpm run start:devThe API will be available at http://localhost:4000
npm run build
npm run start:prod# Unit tests
npm run test
# Watch mode
npm run test:watch
# E2E tests
npm run test:e2e
# Coverage
npm run test:cov# Lint
npm run lint
# Format
npm run formatSee Architecture Documentation for detailed information about the project structure.
Please review the following documents before contributing:
- Naming Conventions
- Controllers Structure
- Services Structure
- Response Standards
- Error Handling
- Logging Standards
- DTO Standards
- Testing Structure
- Verify credentials in
.envmatch your Supabase project settings - Check that your Supabase project is active
- Ensure you're using the correct project URL and keys
- Verify your project is linked:
supabase link --project-ref your-project-ref
- Ensure Redis is running:
redis-cli ping - Verify
REDIS_HOSTandREDIS_PORTin.env
- Change
PORTin.envto a different port - Or kill the process using port 4000
- Check existing documentation in
docs/ - Review code examples in the codebase
- Open an issue for questions or problems