Skip to content

Incorporating setup documentation for local environment #36

@woojiahao

Description

@woojiahao

Encountered a few setup issues that took a while to dig through to figure out while working on an issue with CATcher. I think it would benefit first time contributors if the documentation covered the steps to set up the local dev environment were more detailed.

Here's a sample of the new documentation. As of this moment, I'm not entirely sure how to override the default environment.gen.ts with local fields (i.e. step 5) so would love to understand the team's stance on this as I was modifying the fields directly while leaving the file changes uncommitted.

Screenshot 2024-03-28 at 23 56 33
## Creating your local development environment

1. Set up [Gatekeeper](https://github.com/CATcher-org/gatekeeper), a local server used to enable
  client-side applications to perform OAuth with GitHub. Follow the instructions on the repository.
2. Create a new GitHub organization to store all your repositories. More details can be found
  [here.](../ug/instructors.md)
3. Create a new GitHub OAuth application under the new GitHub organization. More details can be
  found [here.](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app)

    Set the homepage URL to your organization's
    [default homepage URL.](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites)

    Set the authorization callback's URL to `http://localhost:4200`.

4. Start Gatekeeper with `npm run start` and take note of the local address of the server.

5. Update `environment.gen.ts` with the appropriate base configuration such as:
   - `accessTokenUrl`: local Gatekeeper server address
   - `clientDataUrl`: `profiles.json` of your local `client_data` folder (see step (2) for more
    information)
   - `clientId`: client id of your GitHub app

6. Start CATcher locally with `npm run ng:serve:web`, select a profile, and login to grant CATcher
  access to your GitHub account to begin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions