Skip to content

TeseySTD/betterstack

Repository files navigation

betterstack logo

betterstack

Node.js npm Docker PostgreSQL Next.js Nest.js TypeORM Tailwind CSS Last commit

Overview

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.

Tech Stack

  • Frontend: Next.js 16.1.6, Tailwind CSS.
  • Backend: NestJS 11, TypeORM, PostgreSQL.
  • Infrastructure: Docker and Docker Compose for local development.

Project Structure

betterstack/
├── backend/          # NestJS API — categories, criteria, software, users
├── frontend/         # Next.js UI
└── docker-compose.yml

Development

Prerequisites

  • Node.js 22+ and npm 10+
  • Docker and Docker Compose (required for the database)

Set up .env files

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.

Option A — Everything in Docker (recommended for a clean start)

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 down

Option B — DB in Docker, apps on the host

Useful when you want native Node.js performance and direct access to logs.

  1. Start only PostgreSQL:

    npm run db:local:up
  2. Install dependencies (once):

    npm install
  3. (Optional) Seed the database with sample data:

    npm run db:seed:dev
  4. 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.

  1. Stop PostgreSQL when done:

    npm run db:local:down

Database Migrations

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

Dev Seeding

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:dev

Note

Requires the database to be running. Pending migrations are applied automatically when the backend starts.

About

Dev soft comparer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors