Skip to content

Development Setup

7sempra edited this page Apr 30, 2023 · 16 revisions

Follow these instructions if you want to start developing the roster.

1. Install dependencies and toolchain

  1. Install the "current" version of Node.js and Yarn classic.
  2. Install NPM packages:
    $ cd <project root>
    $ yarn install

Windows-specific

If you are on windows, make sure to install the windows build tools for yarn either as prompted by the installer or with yarn global add windows-build-tools from an administrator shell terminal.

2. Install Postgres

Follow the Postgres installation instructions.

3. Set up your environment variables

  1. Make a copy of env.sample and rename it to .env
  2. Set SSO_CLIENT_ID=c8567d939b65494d9a9f0caa97789c39
  3. Set SSO_SECRET_KEY=JaEeWZxu7T75tCWs3TdIpIe7GfkdO7DRUB6wfS49

Non-Linux

  1. Modify DATABASE_URL to be of the form postgres://<username>@localhost:<port>/eve_roster. <port> is probably 5432. <username> is probably your local username on the system.

Linux

  1. Comment out the DATABASE_URL line.
  2. Add DATABASE_HOST=localhost
  3. Add DATABASE_USER=postgres
  4. Add DATABASE_NAME=eve_roster
  5. Add DATABASE_PASS="secret" (where the password is what you configured when setting up Postgres).

4. Compile & initialize the server

  1. In a separate terminal, compile the server:
    $ yarn watch-server
  2. Back in your original terminal, initialize the database tables:
    $ yarn updatedb
  3. Start the server:
    $ yarn start

5. Configure the server

  1. Load up the site at http://localhost:8081
  2. Log in with one of your EVE characters. This account will be marked as an administrator.
  3. Navigate to Admin > Setup. Paste the following:
{
  "siggy": {
    "username": "your_username",
    "password": "your_password"
  },
  "corporations": [
    {
      "id": 98477920,
      "membership": "full",
      "titles": {
        "Demi-dog": "admin",
        "Junior SOUND FC": "provisional_member",
        "Official SOUND FC": "full_member",
        "Staff": "admin"
      }
    },
    {
      "id": 98240827,
      "membership": "affiliated",
      "titles": {}
    },
    {
      "id": 98465171,
      "membership": "affiliated",
      "titles": {}
    },
    {
      "id": 98237970,
      "membership": "affiliated",
      "titles": {}
    }
  ]
}
  1. Note that unless you own a character that is a Director of a corporation, roster sync will fail for that corporation. This may not matter, depending on what you're working on. If you need to test roster sync, hit up staff to make you a Director of Never Bend the Deadline (98237970).
  2. If you want to work on the SRP system, enable "Track SRP" and select a sane date to start from (past couple months should be fine).
  3. Navigate to Admin > Tasks. Run Update SDE.
  4. If you have Director privs on any corporation, consider running Sync roster and Sync combat activity. If you're working with SRP, run Sync corp killmails. These tasks will run automatically eventually, but many of them are on a 24-hour schedule.

6. Write code!

It's strongly recommended that you configure and use VS Code when developing.

More helpful information in the workflow tips.