← Back to Home

Private Markets API

A RESTful API for managing private market funds, investors, and their investments. Built with Express 5, TypeScript (ESM), and PostgreSQL 16, fully containerised with Docker.

About This Project

This backend API manages the lifecycle of private market funds, investors, and investments. It provides endpoints for creating, reading, and updating funds and investors, as well as managing investments linked to specific funds. The API features dual-layer validation, PostgreSQL domains for enumerated types, centralised error handling, and integration tests against a real database.

Technologies

Express 5TypeScriptPostgreSQLDockerVitestREST API

API Endpoints

MethodEndpointDescription
GET/fundsList all funds
POST/fundsCreate a new fund
PUT/fundsUpdate an existing fund
GET/funds/:idGet a specific fund
GET/investorsList all investors
POST/investorsCreate a new investor
GET/funds/:fund_id/investmentsList investments for a fund
POST/funds/:fund_id/investmentsCreate an investment for a fund

Key Features

  • Dual-layer validation — application-level TypeScript checks plus PostgreSQL domain constraints
  • PostgreSQL domains for enumerated types (status, investor type, email)
  • Centralised error handler mapping PostgreSQL error codes to HTTP responses
  • Integration tests against a real database via Supertest and Vitest
  • Fully containerised with Docker Compose for one-command setup

Running Locally

The easiest way to run the project is with Docker:

git clone https://github.com/awolfen/scaling-fortnight.git
cd scaling-fortnight
docker compose up --build

The API will be available at http://localhost:3000 with sample data pre-loaded.

Source Code

The full source code is available on GitHub:

View on GitHub →