Skip to content

dump-hr/ddays-app

Repository files navigation

DUMP Days App

Env CI status
Production Deploy Lint

Development

Dependencies

  • Node.js >=18 and yarn
  • PostgreSQL >= 15 or Docker for running PostgreSQL in container

Setup environment

  1. Run docker compose up in separate terminal or follow steps below if you already have postgres server running locally.

    If you use local postgres db server, create manually new database named ddays-app

  2. Create .env.local file that can override configuration options from .env in web/api apps.

Install dependencies

Run command from workspace level

yarn

Generate new database migrations (after adding models)

yarn db:generate

Run database migrations

yarn db:migrate

or just restart development server

Run development server

yarn dev

App is now accessible on http://localhost:3000/. API routes are prefixed with /api, Admin app is prefixed with /admin and Sponsor app is prefixed with /sponsor.

Cookbook

Add new dependency

yarn workspace <workspace> add <package>

example: add drizzle-kit library to api app

yarn workspace api add drizzle-kit

Useful resources