{"id":15046773,"url":"https://github.com/auth0/yearincode","last_synced_at":"2025-09-01T08:12:08.301Z","repository":{"id":38425770,"uuid":"300700170","full_name":"auth0/YearInCode","owner":"auth0","description":"An experience for developers to see their career in space/time","archived":false,"fork":false,"pushed_at":"2023-10-06T09:32:03.000Z","size":60029,"stargazers_count":8,"open_issues_count":30,"forks_count":4,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-06T03:51:02.572Z","etag":null,"topics":["contributions","open-source","serverless"],"latest_commit_sha":null,"homepage":"http://yearincode.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/auth0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-02T18:15:45.000Z","updated_at":"2022-05-03T19:41:42.000Z","dependencies_parsed_at":"2024-09-27T23:31:08.018Z","dependency_job_id":null,"html_url":"https://github.com/auth0/YearInCode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/auth0/YearInCode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2FYearInCode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2FYearInCode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2FYearInCode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2FYearInCode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/auth0","download_url":"https://codeload.github.com/auth0/YearInCode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2FYearInCode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273093960,"owners_count":25044438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["contributions","open-source","serverless"],"created_at":"2024-09-24T20:53:33.797Z","updated_at":"2025-09-01T08:12:08.277Z","avatar_url":"https://github.com/auth0.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Year In Code\n\nAn experience for developers built with ❤️ by Auth0\n\n## Development\n\n### Requirements\n\n- [Docker](https://docs.docker.com/get-docker/)\n- [Docker Compose](https://docs.docker.com/compose/)\n- [Java](https://openjdk.java.net/install/index.html)\n- [Serverless Framework](https://www.serverless.com/framework/docs/getting-started/)\n\n## Configuring Auth0\n\n1. Go to the [Auth0 dashboard](https://manage.auth0.com/) and create a new\n   application of type _Regular Web Applications_ and make sure to configure the\n   following\n2. Go to the settings page of the application\n3. Configure the following settings:\n\n- _Allowed Callback URLs_: Should be set to `http://localhost:3000/api/callback`\n  when testing locally or typically to `https://myapp.com/api/callback` when\n  deploying your application.\n- _Allowed Logout URLs_: Should be set to `http://localhost:3000/` when testing\n  locally or typically to `https://myapp.com/` when deploying your application.\n\n4. Save the settings\n5. Head into _APIs_, and click on _Auth0 Management API_\n6. Click on _Machine to Machine Applications_ and authorize your newly created application.\n7. Open the authorized application dropdown and select the following permissions: `read:users` and `read:user_idp_tokens`.\n8. Save the settings by clicking on update.\n\n## Setting up Auth0 OAuth\n\n1. Go to `Connections -\u003e Social` in your [Auth0 dashboard](https://manage.auth0.com/).\n2. Click on _create connection_  and select GitHub.\n3. Go back to your connections and click on GitHub.\n4. Head into [Auth0 documentation](https://auth0.com/docs/connections/social/github) on how to get your `Client ID` and `Client Secret`.\n5. Fill the `Client ID` and `Client Secret`.\n6. Enable the `Email address` attribute.\n7. Save your settings.\n8. Head into _Applications tab_  and authorize your created application.\n9. Head into your application in _Applications_ and click on _Connections_.\n10. Disable `Username-Password-Authentication` and enable only `GitHub`.\n\n### Set up environment variables\n\nCopy the `.env.local.sample` file in this directory to `.env.local` (which will\nbe ignored by Git):\n\n```bash\ncp .env.local.example .env.local\n```\n\nThen, open `.env.local` and add the missing environment variables:\n\n- `NEXT_PUBLIC_AUTH0_DOMAIN` - Can be found in the Auth0 dashboard under\n  `settings`.\n- `NEXT_PUBLIC_AUTH0_CLIENT_ID` - Can be found in the Auth0 dashboard under\n  `settings`.\n- `AUTH0_CLIENT_SECRET` - Can be found in the Auth0 dashboard under `settings`.\n- `NEXT_PUBLIC_REDIRECT_URI` - The url where Auth0 redirects back to, make sure\n  a consistent url is used here.\n- `NEXT_PUBLIC_POST_LOGOUT_REDIRECT_URI` - Where to redirect after logging out\n- `SESSION_COOKIE_SECRET` - A unique secret used to encrypt the cookies, has to\n  be at least 32 characters. You can use\n  [this generator](https://generate-secret.now.sh/32) to generate a value. Value\n  is in seconds.\n- `WEBSOCKET_PAYLOAD_SECRET` - A unique secret used to encrypt the websocket\n  payload, has to be at least 32 characters. You can use\n  [this generator](https://generate-secret.now.sh/32) to generate a value.\n- `SESSION_COOKIE_LIFETIME` - How long a session lasts in seconds. The default\n  is 2 hours.\n- `NEXT_PUBLIC_API_URL` - The url of Next.js serverless functions\n- `NEXT_PUBLIC_API_WEBSOCKET_URL` - The url for websocket API in AWS.\n- `NEXT_PUBLIC_CLOUDFRONT_URL` - AWS Cloudfront url\n- `NEXT_PUBLIC_CLOUDFLARE_ANALYTICS_ID` - The token for Cloudflare analytics that can be retrieved from the [dashboard](https://dash.cloudflare.com).\n- `LAMBDA_API_URL` - AWS API Gateway url\n- `JWKS_URI` - The url for Auth0 public keys. Normally has the following\n  structure `https://your-tenant.auth0.com/.well-known/jwks.json`\n- `JWT_TOKEN_ISSUER` - The Auth0 tenant. Normally has the following structure\n  `https://your-tenant.auth0.com/`\n- `AWS_SOURCE_EMAIL` - Email address where local emails will be sent from. Make\n  sure to verify the email in the AWS SES dashboard.\n- `NEXT_PUBLIC_FACEBOOK_ID` - Facebook APP ID. You can get it\n  [here](https://developers.facebook.com/docs/development/create-an-app).\n- `AUTH0_AUDIENCE` - The url for Auth0 audience. Normally has the following structure `https://your-tenant.auth0.com/api/v2/`\n- `SEND_POSTER_ANALYTICS_RECIPIENTS` - A comma separated list of emails that will receive the emails with the poster statistics\n\n\n### Set Up Serveless Offline\n\nTo use Serverless Pro, please login with the following command:\n\n```bash\nserverless login\n```\n\n#### Create Credentials Profiles\n\nTo learn how to create profiles in AWS please refer to this\n[guide](https://www.serverless.com/framework/docs/providers/aws/guide/credentials/).\n\nNebula has the following profiles for each stage:\n\n- `nebulaDev`\n- `nebulaStaging`\n- `nebulaProduction`\n\n### Select profile for deployment or development\n\nTo switch between profiles use the following command:\n\n```bash\nexport AWS_PROFILE=\"nebulaDev\"\n```\n\n### Development\n\nIn the development environment the following servers are run:\n\n- Next.js dev server on port `3000`\n- Serverless Offline on port `1337`\n- Serverless Offline SES on port `9001`\n- Serverless Offline S3 on port `4569`\n- DynamoDB on port `8000`\n- elasticmq on port `9324`\n\nTo run all of these servers concurrently, run the dev command.\n\n```\nyarn dev\n# or\nnpm run dev\n```\n\n## Deploy on Vercel\n\nYou can deploy this app to the cloud with\n[Vercel](https://vercel.com?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=next-example)\n([Documentation](https://nextjs.org/docs/deployment)).\n\n**Important**: When you import your project on Vercel, make sure to click on\n**Environment Variables** and set them to match your `.env.local` file.\n\n## Deploy on AWS\n\nTo deploy on AWS please set up the following environment variables in the\nParameter Store:\n\n| Name                              | Value                                                                                                 | Encrypted |\n| --------------------------------- | ----------------------------------------------------------------------------------------------------- | --------- |\n| /{stage}/auth0/audience           | Same as `AUTH0_AUDIENCE`                                                                              |           |\n| /{stage}/auth0/client_id          | Same as `NEXT_PUBLIC_AUTH0_CLIENT_ID`                                                                 |           |\n| /{stage}/auth0/client_secret      | Same as `AUTH0_CLIENT_SECRET`                                                                         | true      |\n| /{stage}/auth0/domain             | Same as `NEXT_PUBLIC_AUTH0_DOMAIN`                                                                    |           |\n| /{stage}/jwt/jwks_uri             | Same as `JWKS_URI`                                                                                    |           |\n| /{stage}/jwt/token_issuer         | Same as `JWT_TOKEN_ISSUER`                                                                            |           |\n| /{stage}/websocket/payload_secret | Same as `WEBSOCKET_PAYLOAD_SECRET`                                                                    | true      |\n| /{stage}/site/url                 | Same as `NEXT_PUBLIC_POST_LOGOUT_REDIRECT_URI`                                                        |           |\n| /{stage}/ses/source_email         | Email address where emails will be sent from. Make sure to verify the email in the AWS SES dashboard. |           |\n\n### Manual Deployment\n\n\u003e Before manually deploying, please make sure to have the correct profile\n\u003e selected.\n\nTo deploy to dev environment please run the following command:\n\n```bash\nserverless deploy\n```\n\nTo deploy to other stages run:\n\n```bash\nserverless deploy --stage staging\n# or\nserverless deploy --stage prod\n```\n\nTo deploy a single function run:\n\n```\nserverless deploy --stage stage -f functionName\n```\n\n## Testing GitHub Actions\n\nTo run GitHub Actions locally please install\n[act runner](https://github.com/nektos/act).\n\nThen, add this action to the `integration-and-e2e-test` steps:\n\n```\n  - name: Install Cypress dependencies\n    run:\n      apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev\n      libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb\n```\n\nfinally, run the following command:\n\n```\nact -P ubuntu-latest=nektos/act-environments-ubuntu:18.04\n```\n\n⚠️ `WARNING: this will run a Docker container with \u003e18 GB file size`\n\nA lean build can be run, but Cypress has to be excluded. Like this:\n\n```\nact --job unit-test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauth0%2Fyearincode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauth0%2Fyearincode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauth0%2Fyearincode/lists"}