An experience for developers to see their career in space/time
MIT License
An experience for developers built with ❤️ by Auth0
http://localhost:3000/api/callback
https://myapp.com/api/callback
whenhttp://localhost:3000/
when testinghttps://myapp.com/
when deploying your application.read:users
and read:user_idp_tokens
.Connections -> Social
in your Auth0 dashboard.Client ID
and Client Secret
.Client ID
and Client Secret
.Email address
attribute.Username-Password-Authentication
and enable only GitHub
.Copy the .env.local.sample
file in this directory to .env.local
(which will
be ignored by Git):
cp .env.local.example .env.local
Then, open .env.local
and add the missing environment variables:
NEXT_PUBLIC_AUTH0_DOMAIN
- Can be found in the Auth0 dashboard undersettings
.NEXT_PUBLIC_AUTH0_CLIENT_ID
- Can be found in the Auth0 dashboard undersettings
.AUTH0_CLIENT_SECRET
- Can be found in the Auth0 dashboard under settings
.NEXT_PUBLIC_REDIRECT_URI
- The url where Auth0 redirects back to, make sureNEXT_PUBLIC_POST_LOGOUT_REDIRECT_URI
- Where to redirect after logging outSESSION_COOKIE_SECRET
- A unique secret used to encrypt the cookies, has toWEBSOCKET_PAYLOAD_SECRET
- A unique secret used to encrypt the websocketSESSION_COOKIE_LIFETIME
- How long a session lasts in seconds. The defaultNEXT_PUBLIC_API_URL
- The url of Next.js serverless functionsNEXT_PUBLIC_API_WEBSOCKET_URL
- The url for websocket API in AWS.NEXT_PUBLIC_CLOUDFRONT_URL
- AWS Cloudfront urlNEXT_PUBLIC_CLOUDFLARE_ANALYTICS_ID
- The token for Cloudflare analytics that can be retrieved from the dashboard.LAMBDA_API_URL
- AWS API Gateway urlJWKS_URI
- The url for Auth0 public keys. Normally has the followinghttps://your-tenant.auth0.com/.well-known/jwks.json
JWT_TOKEN_ISSUER
- The Auth0 tenant. Normally has the following structurehttps://your-tenant.auth0.com/
AWS_SOURCE_EMAIL
- Email address where local emails will be sent from. MakeNEXT_PUBLIC_FACEBOOK_ID
- Facebook APP ID. You can get itAUTH0_AUDIENCE
- The url for Auth0 audience. Normally has the following structure https://your-tenant.auth0.com/api/v2/
SEND_POSTER_ANALYTICS_RECIPIENTS
- A comma separated list of emails that will receive the emails with the poster statisticsTo use Serverless Pro, please login with the following command:
serverless login
To learn how to create profiles in AWS please refer to this guide.
Nebula has the following profiles for each stage:
nebulaDev
nebulaStaging
nebulaProduction
To switch between profiles use the following command:
export AWS_PROFILE="nebulaDev"
In the development environment the following servers are run:
3000
1337
9001
4569
8000
9324
To run all of these servers concurrently, run the dev command.
yarn dev
# or
npm run dev
You can deploy this app to the cloud with Vercel (Documentation).
Important: When you import your project on Vercel, make sure to click on
Environment Variables and set them to match your .env.local
file.
To deploy on AWS please set up the following environment variables in the Parameter Store:
Name | Value | Encrypted |
---|---|---|
/{stage}/auth0/audience | Same as AUTH0_AUDIENCE
|
|
/{stage}/auth0/client_id | Same as NEXT_PUBLIC_AUTH0_CLIENT_ID
|
|
/{stage}/auth0/client_secret | Same as AUTH0_CLIENT_SECRET
|
true |
/{stage}/auth0/domain | Same as NEXT_PUBLIC_AUTH0_DOMAIN
|
|
/{stage}/jwt/jwks_uri | Same as JWKS_URI
|
|
/{stage}/jwt/token_issuer | Same as JWT_TOKEN_ISSUER
|
|
/{stage}/websocket/payload_secret | Same as WEBSOCKET_PAYLOAD_SECRET
|
true |
/{stage}/site/url | Same as NEXT_PUBLIC_POST_LOGOUT_REDIRECT_URI
|
|
/{stage}/ses/source_email | Email address where emails will be sent from. Make sure to verify the email in the AWS SES dashboard. |
Before manually deploying, please make sure to have the correct profile selected.
To deploy to dev environment please run the following command:
serverless deploy
To deploy to other stages run:
serverless deploy --stage staging
# or
serverless deploy --stage prod
To deploy a single function run:
serverless deploy --stage stage -f functionName
To run GitHub Actions locally please install act runner.
Then, add this action to the integration-and-e2e-test
steps:
- name: Install Cypress dependencies
run:
apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev
libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
finally, run the following command:
act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04
⚠️ WARNING: this will run a Docker container with >18 GB file size
A lean build can be run, but Cypress has to be excluded. Like this:
act --job unit-test