← 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
| Method | Endpoint | Description |
|---|---|---|
| GET | /funds | List all funds |
| POST | /funds | Create a new fund |
| PUT | /funds | Update an existing fund |
| GET | /funds/:id | Get a specific fund |
| GET | /investors | List all investors |
| POST | /investors | Create a new investor |
| GET | /funds/:fund_id/investments | List investments for a fund |
| POST | /funds/:fund_id/investments | Create 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 --buildThe 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 →