From ff5a7c7848fa5febc074c4fe6d1e7fb190003bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 9 Oct 2023 15:54:38 +0100 Subject: [PATCH 1/2] Updates README --- README.md | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/README.md b/README.md index c4033664..5905cc34 100644 --- a/README.md +++ b/README.md @@ -1,36 +1 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +# shape-docs From 16b677e0507f2b15c2d752b0780da014bd760493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 9 Oct 2023 16:11:52 +0100 Subject: [PATCH 2/2] Updates README --- README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/README.md b/README.md index 5905cc34..95e30aa4 100644 --- a/README.md +++ b/README.md @@ -1 +1,37 @@ # shape-docs + +Portal displaying our projects that are documented with OpenAPI. + +[![Test](https://github.com/shapehq/shape-docs/actions/workflows/test.yml/badge.svg)](https://github.com/shapehq/shape-docs/actions/workflows/test.yml) + +## Running the App Locally + +Create a file named `.env.local` in the root of the project with the following contents. Make sure to replace any placeholders and generate a random secret using OpenSSL. + +AUTH0_SECRET='use [openssl rand -hex 32] to generate a 32 bytes value' +AUTH0_BASE_URL='http://dev.local:3000' +AUTH0_ISSUER_BASE_URL='https://shape-docs-dev.eu.auth0.com' +AUTH0_CLIENT_ID='Your client ID' +AUTH0_CLIENT_SECRET='Your client secret' +AUTH0_MANAGEMENT_DOMAIN='shape-docs-dev.eu.auth0.com' +AUTH0_MANAGEMENT_CLIENT_ID='Your client ID' +AUTH0_MANAGEMENT_CLIENT_SECRET='Your client secret' + +Note that you need to Auth0 apps: + +- **Regular Web Application**: This is used to authenticate the user. +- **Machine to Machine Application**: This is used for making requests to [Auth0's Management API](https://auth0.com/docs/api/management/v2) to retrieve the access token for the identity provider that the user authorized with. + +Modify your `/etc/hosts` file to add the following entry: + +``` +127.0.0.1 dev.local +``` + +We visit our local website by opening https://dev.local:3000 instead of https://localhost:3000 as this ensures that Auth0's flow will work correctly. Auth0 does some extra checks when localhost is included in the URL and we are generally not interested in those as they give a false impression of the flow the user will see. + +Run the app using the following command: + +``` +npm run dev +```