/decentdebates

A place where all sorts of topics are debated in a respectful and constructive manner.

Primary LanguageTypeScript

Decent Debates

More about this project, including the movations behind it and some demo pictures, can be found here.

Setting up

The root .env file

These variables are going to be used to configure the local Postgres instance.

# Ensure you're in the root folder.
cp .env.example .env

The api .env file

Here the cookie secret should be provided.

# Ensure you're in the `api` directory.
cp .env.example .env

Spinning up the application

  1. Start the containers

    # Ensure you're in the root folder.
    docker-compose up
  2. Start the Next.js application

    cd next
    npm run dev

    You can also run in debug mode by selecting the Next.js configuration before starting up the debugging process.

  3. Start the Nest.js application

    # From the root folder.
    cd api
    
    npm run start:dev

    You can also run in debug mode by selecting the Nest.js configuration before starting up the debugging process.


Working on the application

Dealing with DB schema changes

Quickly reload the Postgres instance with the new changes:

docker compose down -v && docker compose up

Seeding the database

# Ensure you're in the `api` folder.
npx knex seed:run

My Research

I came up with many questions while working on this project:

UML

UML