Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Copy .env.example file to .env:

    Copy the contents of the .env.example file at the root of the repo to a new file called .env.

  2. Setting up Neon:

    Neon is a hosting service for PostgreSQL.

    1. Install the Neon CLI.

    2. Run neonctl auth and follow the on-screen prompts to login or create an account.

    3. Run neonctl projects create --name planner-dev to create a Neon project for Planner.

    4. Copy the string listed under 'Connection Uri' (ex: postgres://my-user:my-password@my-project-id.us-east-2.aws.neon.tech/neondb) and update the DATABASE_URL and DIRECT_DATABASE_URL variables in your .env file, as shown below.

      Code Block
      languagebash
      # Prisma
      DATABASE_URL="<your connection uri here>"
      DIRECT_DATABASE_URL="<your connection uri here>"
  3. Apply database migrations:

    Code Block
    languagebash
    npx prisma migrate dev
  4. Request PLATFORM_DATABASE_URL from someone on the team.

  5. Set the NEXTAUTH_URL to httpshttp://localhost:3000 NEXTAUTH_SECRET to abc123.

  6. Setting up an auth provider. You need at least one of these to log in. We recommend you only add Discord for convenience.

...

  1. Run and configure validator

    1. Create a virtual environment:

      Code Block
      cd validator
      python3.10 -m venv venv # Create virtual environment
    2. Activate the virtual environment:
      - Windows: venv\Scripts\activate
      - Linux/macOS: source venv/bin/activate

    3. Install dependencies:

      Code Block
      pip install -r requirements.txt
    4. Run the validator:

      Code Block
      flask --app api run
    5. Add the validator to .env:

      Code Block
      # DEGREE VALIDATOR
      VALIDATOR=<httphttp://localhost:50020>127.0.0.1:5000
  1. For any unused variables in your .env file, just leave them blank.

  2. Generate Prisma client and run web server:

...