-
Node 14
-
This project is a monorepo, so Yarn was chosen for better dependency management
-
Install dependencies
yarn
-
Copy
packages/api/.env.sample
topackages/api/.env.local
cp packages/api/.env.sample packages/api/.env.local
-
Run the setup script
yarn setup
This script will build any required files so that the two packages (api and web) can work together
-
Start the development server
yarn dev
When you see this success message, open the url to load the site
🚀 Listening at http://localhost:3000
The server starts before Next.js finishes compiling, so the first time may take a little bit to load
-
Start developing
-
Login to github, then at the top right click on the icon and go to settings.
-
Find the developer settings, then click on OAuth Apps, and create a new OAuth app.
-
Name the application, homepage 'URL' should be
http://localhost:3000
-
The callback
URL
should behttp://localhost:3000/api/auth/callback/github
-
Next, use the Client Id from the output of the app creation to replace the value of
GITHUB_CLIENT_ID
within your.env.local
-
Generate a Client Secret ID from GitHub and use it to replace the value of
GITHUB_SECRET
within your.env.local
-
Go to the Discord Develop Portal and log in.
-
Create a new application and name it, then go to the OAuth2 settings of the application.
-
Specify
http://localhost:3000/api/auth/discord/callback
as the redirect URL for local development. -
For production enviornments
localhost:3000
should be replaced with the correct host address and port number. -
Within the OAuth2 URL Generator, select the correct redirect URL. Specify the
identify
scope, and save your changes. -
In
.env.local
:-
Copy the Client ID and update the
DISCORD_CLIENT_ID
value. -
Reveal and copy the Client Secret and update the
DISCORD_SECRET
value.
-
- Go to the Discord App and create a new server.
- Navigate to "Invite People". This can be found in the dropdown panel next to your server name in the upper-left corner.
- In the pop-up a link is displayed. The link by default will last for 7 days.
- To create a permanent link navigate to the "Invite People" window and click on "Edit invite link" at the bottom of the window.
- Select "Never" for expiration and "No limit" for the number of uses.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
Interested in contributing to the project? Check out our Contributing Guidelines.