Skip to content

ImpactMarkets/impact-markets-app

Repository files navigation

Setup

Local dependencies

  • Node.js

    The Node version required is specified in package.json and .nvmrc.

    To use the correct version, install nvm, then run those commands:

    nvm install
    nvm use

    Node versions > 16 used to cause this segmentation fault. It doesn't happen to me (Dawn) anymore even with Node 20. Lmk if you still get it.

  • docker-compose

    Linux Mint: sudo apt install docker-compose

Install project dependencies

npm install

Prepare the database

  • Set up the environment variables:
cp .env.example .env

Ask @Telofy for the Google client credentials. Put them in the .env in those two lines:

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
  • Start the database
docker-compose up -d
  • Create the database schema:
npx prisma migrate deploy

Launch the app

npm run dev

FAQ and Common Problems

  • I pulled main and now I'm getting a lot of type errors on files I didn't touch when I try to commit. How do I fix this?

Try running npx prisma generate. These may be from schema changes someone else made that haven't propagated on your local instance yet. Sometimes you also need to restart the dev server after regenerating the client.

Styles

This project uses Tailwind CSS and [Mantine] (https://mantine.dev/) to handle styles. If at all possible, please use Tailwind for styling components, even Mantine components, so we don’t incur so much complexity from mixing the two systems.

To make changes to default Tailwind CSS values, modify the tailwind.config.js file located at the root of the project.