This README covers how to run the project, bring up the dependent services with Docker Compose, test that everything works, and example login details for management services.
- Node 18+ (or any Node compatible with dependencies)
- Docker & Docker Compose (for running PostgreSQL, MinIO, and pgAdmin)
- Git (optional)
- Copy the example environment variables into a
.envfile at the project root (create if missing):
# Server
PORT=5000
# Postgres
POSTGRES_USER=fixpoint
POSTGRES_DB=fixpointdb
POSTGRES_PASSWORD=fixpointpass
POSTGRES_PORT=5432
# MinIO
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=minioadmin
MINIO_PORT=9000
MINIO_CONSOLE_PORT=9001
# pgAdmin (optional)
PGADMIN_DEFAULT_EMAIL=admin@fixpoint.local
PGADMIN_DEFAULT_PASSWORD=admin
PGADMIN_PORT=8080- Start required services with Docker Compose (from project root):
Basic services only:
docker compose up -dWith pgAdmin (database management UI):
docker compose --profile dev-tools up -dThis will start:
- PostgreSQL on host port 5432
- MinIO (object storage) on host port 9000
- MinIO Console on host port 9001
- pgAdmin on host port 8080 (only with dev-tools profile)
- Install Node dependencies and run the server locally:
npm install
npm run startOr for development with auto-restart:
npm run devThe server default route is: http://localhost:5000/api/.
If you are running the project for the first time or need to reset your database, follow these steps:
-
Run Migrations: Create the necessary tables in the database.
npm run db:migrate
-
Seed Data: Populate the database with demo users and branches.
npm run db:seed
To reset the entire database (Undo all migrations, remigrate, and re-seed):
npm run db:resetThe project exposes health endpoints mounted under /api/health:
GET /api/health— overall health (checks DB + storage)GET /api/health/database— database healthGET /api/health/storage— MinIO storage healthGET /api/health/ready— readiness probeGET /api/health/live— liveness probe
Using curl (command line):
# Test main endpoint
curl http://localhost:5000/api/
# Test health endpoints
curl http://localhost:5000/api/health
curl http://localhost:5000/api/health/database
curl http://localhost:5000/api/health/storage
curl http://localhost:5000/api/health/ready
curl http://localhost:5000/api/health/liveUsing web browser:
- Open http://localhost:5000/api/ in your browser
- Try the health endpoints: http://localhost:5000/api/health
Using API testing tools:
- Postman: Import endpoints and test with a GUI
- Insomnia: REST client with JSON formatting
- Thunder Client: VS Code extension for API testing
- HTTPie: Modern command-line HTTP client (
http localhost:5000/api/health)
Defaults shown above match the docker-compose.yml environment placeholders. If you used the .env example, use these credentials:
-
PostgreSQL (connect via tool like psql or pgAdmin):
- Host: fixpoint_db
- Port: 5432
- User: fixpoint
- Password: fixpointpass
- Database: fixpointdb
-
MinIO (S3 compatible):
- Endpoint: http://localhost:9000
- Access Key: minioadmin
- Secret Key: minioadmin
- Console: http://localhost:9001 (web UI)
-
pgAdmin (optional):
- URL: http://localhost:8080
- Email: admin@example.com
- Password: admin
This project includes Jest and Supertest for tests. To run tests:
npm testIf your tests require the database or MinIO, make sure Docker Compose services are up first (docker compose up -d).
- DB connection errors: ensure port 5432, user fixpoint, database fixpointdb, and password fixpointpass in
.envmatch the Docker Compose or external DB settings. - MinIO connection errors: ensure MinIO is reachable at localhost:9000 and credentials minioadmin/minioadmin are set.
- Ports already in use: change the host ports in your
.envto unused ports and restart Docker Compose.
- Docker containers running:
docker ps --filter "name=fixpoint_"- Server process started and listening:
ss -ltnp | grep node- Health endpoint returns 200 when services are up:
curl -s -o /dev/null -w "%{http_code}\n" http://localhost:5000/api/