Built with Next.js.
- Node.js v18+
- Docker
- Clone this repository.
- Generate your development certificates.
- On Mac, run
npm run certs:mac
. You need Homebrew to be installed. - On Windows, run
npm run certs:win
. You need Chocolatey to be installed. - On any other platform, see Generating Dev Certs.
- Once your certs are generated, you do not need to run this command again unless you delete the certs or they expire.
- On Mac, run
- Run
npm i
. - Run
npm run dev
to start the dev servers.- Access the dev site at https://dev.pictogrammers.com.
- Access the dev API at https://dev-api.pictogrammers.com.
- The dev MySQL instance will come up at http://localhost:3306.
The site and API will hot-reload as you make changes.
See https://pictogrammers.com/docs/contribute/website/ for more details about contributing to the site.
If you are not using Mac or Windows, you will need to follow the instructions on the mkcert
GitHub page to install the version for your platform.
You need to generate certs for the following two domains:
dev.pictogrammers.com
dev-api.pictogrammers.com
Place these certifications in the .dev/certs
directory. Then start the application.
As part of the site's build process, information is pulled from GitHub about our contributors. This data is required for the site to build.
- Create a classic GitHub personal access token.
- Required permissions:
public_repo
,read:org
,read:user
,user:email
- Create a
.env
file in the root of the repository. - Add
API_KEY_GITHUB
to the.env
file with your token. - Restart the dev server.
To test and debug any part of the site behind authentication, you will need to create a GitHub OAuth application and provide the Client ID and Secret in the environment file.
This is not required to work on public facing areas of the site. You will be unable to log in/out or access areas of the site behind authentication.
- Create a GitHub OAuth App.
- Use
https://dev-api.pictogrammers.com/auth/github/callback
as the "Authorization callback URL". - Create a
.env
file in the root of the repository. - Copy and paste your client ID and secret into the env file.
GITHUB_CLIENT_ID={YOUR_CLIENT_ID} GITHUB_CLIENT_SECRET={YOUR_CLIENT_SECRET}
- Restart the dev server.
Before opening a PR with your changes, be sure to run npm run lint
and correct any linting errors. These jobs will also run on the PR, informing you of failures that will need to be addressed before your PR can be merged.
You shouldn't need to build locally. This information is provided for advanced troubleshooting cases.
- Run
npm build
to build the site and API. - The built assets will be located in the following folders:
- Client:
/client/dist
- API:
/api/dist
© Copyright 2023 Pictogrammers.