betterstack is a software comparison platform designed for developers. The application provides a structured way to evaluate and compare different software tools based on defined criteria and categories. It features a robust backend for managing data and a modern frontend for a seamless user experience.
- Frontend: Next.js 16.1.6, Tailwind CSS.
- Backend: NestJS 11, TypeORM, PostgreSQL.
- Infrastructure: Docker and Docker Compose for local development.
betterstack/
├── backend/ # NestJS API — categories, criteria, software, users
├── frontend/ # Next.js UI
└── docker-compose.yml
- Node.js 22+ and npm 10+
- Docker and Docker Compose (required for the database)
The applications require backend/.env.development and frontend/.env.development
to run. These files are git-ignored, so you need to create them manually.
You can use the contents of backend/.env.development.example and
frontend/.env.development.example as a starting point.
Starts the frontend, backend, and PostgreSQL in containers with hot reload via volume mounts:
docker-compose up -d| Service | URL |
|---|---|
| Frontend | http://localhost:3000 |
| Backend | http://localhost:3010 |
| PostgreSQL | localhost:5432 |
Stop all services:
docker-compose downUseful when you want native Node.js performance and direct access to logs.
-
Start only PostgreSQL:
npm run db:local:up
-
Install dependencies (once):
npm install
-
(Optional) Seed the database with sample data:
npm run db:seed:dev
-
Start backend and frontend concurrently with hot reload:
npm run dev
Or start them separately:
npm run be:dev # NestJS on port 3010 npm run fe:dev # Next.js on port 3000
Note
Pending migrations are applied automatically when the backend starts.
-
Stop PostgreSQL when done:
npm run db:local:down
Migrations are plain JS files tracked in backend/database/migrations/.
The TypeORM data-source is at backend/database/data-source.js.
Note
Build the backend before generating a migration so the data-source reads up-to-date compiled entities:
npm run build| Command | Description |
|---|---|
npm run db:migration:gen -- database/migrations/MyName |
Generate a migration from entity diff |
npm run db:migration:rev |
Revert the last migration |
The backend/database/dev-seed.js script populates a development database
with a representative graph of sample data. It is idempotent — re-running
it skips any entity that already exists by its unique key.
npm run db:seed:devNote
Requires the database to be running. Pending migrations are applied automatically when the backend starts.