From 689a20dca247b3e1bc9cf989b1b5afff0b054a77 Mon Sep 17 00:00:00 2001 From: Tuan Dang Date: Sun, 30 Apr 2023 14:54:54 +0300 Subject: [PATCH] Begin adding guides to docs --- .../getting-started}/cli.mdx | 0 .../getting-started}/docker.mdx | 0 .../getting-started/introduction.mdx | 37 ++++-- .../getting-started}/kubernetes.mdx | 0 .../getting-started}/platform.mdx | 0 .../getting-started}/sdks.mdx | 9 +- docs/documentation/guides/introduction.mdx | 41 +++++++ docs/documentation/guides/nextjs-vercel.mdx | 4 + docs/documentation/guides/node.mdx | 19 +++ docs/documentation/guides/python.mdx | 4 + .../platform}/audit-logs.mdx | 0 .../platform}/create-account.mdx | 0 .../platform}/integrations.mdx | 0 .../platform}/mfa.mdx | 0 .../platform}/organization.mdx | 0 .../platform}/pit-recovery.mdx | 0 .../platform}/project.mdx | 0 .../platform}/secret-versioning.mdx | 0 .../platform}/token.mdx | 0 docs/getting-started/features.mdx | 30 ----- docs/getting-started/quickstart.mdx | 116 ------------------ docs/integrations/overview.mdx | 2 +- docs/mint.json | 35 ++++-- docs/sdks/overview.mdx | 69 +++++++++-- 24 files changed, 181 insertions(+), 185 deletions(-) rename docs/{getting-started/quickstarts => documentation/getting-started}/cli.mdx (100%) rename docs/{getting-started/quickstarts => documentation/getting-started}/docker.mdx (100%) rename docs/{ => documentation}/getting-started/introduction.mdx (71%) rename docs/{getting-started/quickstarts => documentation/getting-started}/kubernetes.mdx (100%) rename docs/{getting-started/quickstarts => documentation/getting-started}/platform.mdx (100%) rename docs/{getting-started/quickstarts => documentation/getting-started}/sdks.mdx (96%) create mode 100644 docs/documentation/guides/introduction.mdx create mode 100644 docs/documentation/guides/nextjs-vercel.mdx create mode 100644 docs/documentation/guides/node.mdx create mode 100644 docs/documentation/guides/python.mdx rename docs/{getting-started/dashboard => documentation/platform}/audit-logs.mdx (100%) rename docs/{getting-started/dashboard => documentation/platform}/create-account.mdx (100%) rename docs/{getting-started/dashboard => documentation/platform}/integrations.mdx (100%) rename docs/{getting-started/dashboard => documentation/platform}/mfa.mdx (100%) rename docs/{getting-started/dashboard => documentation/platform}/organization.mdx (100%) rename docs/{getting-started/dashboard => documentation/platform}/pit-recovery.mdx (100%) rename docs/{getting-started/dashboard => documentation/platform}/project.mdx (100%) rename docs/{getting-started/dashboard => documentation/platform}/secret-versioning.mdx (100%) rename docs/{getting-started/dashboard => documentation/platform}/token.mdx (100%) delete mode 100644 docs/getting-started/features.mdx delete mode 100644 docs/getting-started/quickstart.mdx diff --git a/docs/getting-started/quickstarts/cli.mdx b/docs/documentation/getting-started/cli.mdx similarity index 100% rename from docs/getting-started/quickstarts/cli.mdx rename to docs/documentation/getting-started/cli.mdx diff --git a/docs/getting-started/quickstarts/docker.mdx b/docs/documentation/getting-started/docker.mdx similarity index 100% rename from docs/getting-started/quickstarts/docker.mdx rename to docs/documentation/getting-started/docker.mdx diff --git a/docs/getting-started/introduction.mdx b/docs/documentation/getting-started/introduction.mdx similarity index 71% rename from docs/getting-started/introduction.mdx rename to docs/documentation/getting-started/introduction.mdx index a8b3b7c27..705ab3698 100644 --- a/docs/getting-started/introduction.mdx +++ b/docs/documentation/getting-started/introduction.mdx @@ -46,23 +46,30 @@ Start syncing environment variables with [Infisical Cloud](https://app.infisical ## Resources - - Learn how to configure and deploy Infisical. - - + + Learn how to configure and deploy Infisical + + + Explore guides for every language and stack + - Explore integrations for GitHub, Vercel, Netlify, and more. + Explore integrations for GitHub, Vercel, Netlify, and more - Explore integrations for Next.js, Express, Django, and more. + Explore integrations for Next.js, Express, Django, and more + + + Questions? Need help setting up? Book a 1x1 meeting with us diff --git a/docs/getting-started/quickstarts/kubernetes.mdx b/docs/documentation/getting-started/kubernetes.mdx similarity index 100% rename from docs/getting-started/quickstarts/kubernetes.mdx rename to docs/documentation/getting-started/kubernetes.mdx diff --git a/docs/getting-started/quickstarts/platform.mdx b/docs/documentation/getting-started/platform.mdx similarity index 100% rename from docs/getting-started/quickstarts/platform.mdx rename to docs/documentation/getting-started/platform.mdx diff --git a/docs/getting-started/quickstarts/sdks.mdx b/docs/documentation/getting-started/sdks.mdx similarity index 96% rename from docs/getting-started/quickstarts/sdks.mdx rename to docs/documentation/getting-started/sdks.mdx index f7dbae6ab..1d3add56e 100644 --- a/docs/getting-started/quickstarts/sdks.mdx +++ b/docs/documentation/getting-started/sdks.mdx @@ -9,11 +9,12 @@ Prerequisites: - Have a project with secrets ready in [Infisical Cloud](https://app.infisical.com). - Create an [Infisical Token](/getting-started/dashboard/token) scoped to an environment in your project in Infisical. +## Installation + +Follow the instructions for your language to install the SDK for it. + - - - ## Installation Run `npm` to add [infisical-node](https://github.com/Infisical/infisical-node) to your project. @@ -134,7 +135,7 @@ Prerequisites: - [Rust](https://github.com/Infisical/infisical/issues/437) - [PHP](https://github.com/Infisical/infisical/issues/531) - Missing a language? Throw in a [request](https://github.com/Infisical/infisical/issues). + Missing a language? [Throw in a request](https://github.com/Infisical/infisical/issues). diff --git a/docs/documentation/guides/introduction.mdx b/docs/documentation/guides/introduction.mdx new file mode 100644 index 000000000..d2ffc2e30 --- /dev/null +++ b/docs/documentation/guides/introduction.mdx @@ -0,0 +1,41 @@ +--- +title: "Introduction" +--- + +Whether you're running a Node application on Heroku, Next.js application with Vercel, or Kubernetes on AWS, Infisical has a secret management strategy from local development to production for you. + +## Guides by Language + + + + Manage secrets across your Node stack + + + Manage secrets across your Python stack + + + +## Guides by Stack + + + + Manage secrets for your Next.js + Vercel stack + + + +Want a guide? [Throw in a request](https://github.com/Infisical/infisical/issues). \ No newline at end of file diff --git a/docs/documentation/guides/nextjs-vercel.mdx b/docs/documentation/guides/nextjs-vercel.mdx new file mode 100644 index 000000000..a9b6c90f3 --- /dev/null +++ b/docs/documentation/guides/nextjs-vercel.mdx @@ -0,0 +1,4 @@ +--- +title: "Next.js + Vercel" +description: "Manage secrets across your Next.js + Vercel stack" +--- diff --git a/docs/documentation/guides/node.mdx b/docs/documentation/guides/node.mdx new file mode 100644 index 000000000..e64a06054 --- /dev/null +++ b/docs/documentation/guides/node.mdx @@ -0,0 +1,19 @@ +--- +title: "Node" +--- + +This guide demonstrates how to manage secrets for your Node stack from local development to production. It uses: + +- Infisical (you can use [Infisical Cloud](https://app.infisical.com) or a [self-hosted instance of Infisical](https://infisical.com/docs/self-hosting/overview)) to store your secrets. +- The [infisical-node](https://github.com/Infisical/infisical-node) client SDK to fetch secrets back to your Node application on demand. + +## Video Guide + +TODO: insert video + + + If you get stuck while working through this guide, refer to the [full example on GitHub](). + + +## Project Setup + diff --git a/docs/documentation/guides/python.mdx b/docs/documentation/guides/python.mdx new file mode 100644 index 000000000..d0cc77f1e --- /dev/null +++ b/docs/documentation/guides/python.mdx @@ -0,0 +1,4 @@ +--- +title: "Python" +description: "Manage secrets across your Python stack" +--- \ No newline at end of file diff --git a/docs/getting-started/dashboard/audit-logs.mdx b/docs/documentation/platform/audit-logs.mdx similarity index 100% rename from docs/getting-started/dashboard/audit-logs.mdx rename to docs/documentation/platform/audit-logs.mdx diff --git a/docs/getting-started/dashboard/create-account.mdx b/docs/documentation/platform/create-account.mdx similarity index 100% rename from docs/getting-started/dashboard/create-account.mdx rename to docs/documentation/platform/create-account.mdx diff --git a/docs/getting-started/dashboard/integrations.mdx b/docs/documentation/platform/integrations.mdx similarity index 100% rename from docs/getting-started/dashboard/integrations.mdx rename to docs/documentation/platform/integrations.mdx diff --git a/docs/getting-started/dashboard/mfa.mdx b/docs/documentation/platform/mfa.mdx similarity index 100% rename from docs/getting-started/dashboard/mfa.mdx rename to docs/documentation/platform/mfa.mdx diff --git a/docs/getting-started/dashboard/organization.mdx b/docs/documentation/platform/organization.mdx similarity index 100% rename from docs/getting-started/dashboard/organization.mdx rename to docs/documentation/platform/organization.mdx diff --git a/docs/getting-started/dashboard/pit-recovery.mdx b/docs/documentation/platform/pit-recovery.mdx similarity index 100% rename from docs/getting-started/dashboard/pit-recovery.mdx rename to docs/documentation/platform/pit-recovery.mdx diff --git a/docs/getting-started/dashboard/project.mdx b/docs/documentation/platform/project.mdx similarity index 100% rename from docs/getting-started/dashboard/project.mdx rename to docs/documentation/platform/project.mdx diff --git a/docs/getting-started/dashboard/secret-versioning.mdx b/docs/documentation/platform/secret-versioning.mdx similarity index 100% rename from docs/getting-started/dashboard/secret-versioning.mdx rename to docs/documentation/platform/secret-versioning.mdx diff --git a/docs/getting-started/dashboard/token.mdx b/docs/documentation/platform/token.mdx similarity index 100% rename from docs/getting-started/dashboard/token.mdx rename to docs/documentation/platform/token.mdx diff --git a/docs/getting-started/features.mdx b/docs/getting-started/features.mdx deleted file mode 100644 index 9eb1d4faf..000000000 --- a/docs/getting-started/features.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "Features" -description: "A non-exhaustive list of features that Infisical has to offer." ---- - -## Platform - -- Provision members access to organizations and projects. -- Manage secrets by adding, deleting, updating them across environments; search, sort, hide/un-hide, export/import them. -- Sync secrets to platforms via integrations to platforms like GitHub, Vercel, and Netlify. -- Rollback secrets to any point in time. -- Rollback each secrets to any version. -- Track actions through audit logs. - -## CLI - -The [CLI](/cli/overview) is used to inject environment variables into applications and infrastructure. - -- Inject environment variables. -- Inject environment variables into containers via service tokens for Docker. - -## SDKs - -[SDKs](/sdks/overview) enable apps to fetch back secrets using an [Infisical Token](/getting-started/dashboard/token) scoped to a project and environment. - -## Roadmap - -We're building the future of secret management, one that's comprehensive and accessible to all. Check out our [roadmap](https://www.notion.so/infisical/be2d2585a6694e40889b03aef96ea36b?v=5b19a8127d1a4060b54769567a8785fa). - -Interested in contributing? Check out the [guide](/contributing/overview). diff --git a/docs/getting-started/quickstart.mdx b/docs/getting-started/quickstart.mdx deleted file mode 100644 index bcc364262..000000000 --- a/docs/getting-started/quickstart.mdx +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: "Quickstarts" -description: "Start managing developer secrets and configs with Infisical in minutes." ---- - -These examples demonstrate how to store and fetch environment variables from [Infisical Cloud](https://app.infisical.com) into your application. - -## Set up Infisical Cloud - -1. Login or create an account at `app.infisical.com`. -2. Create a new project. -3. Keep the default environment variables or populate them as in the image below. - -![project quickstart](../images/project-quickstart.png) - -## Fetch Secrets for Your App - - - - - The Infisical CLI is platform-agnostic and enables you to inject environment variables into your app across many tech stacks and frameworks. - - ### Set up the CLI - - 1. Follow the instructions to [install our platform-agnostic CLI](/cli/overview). - - 2. Initialize Infisical for your project. - - ```bash - # move to your project - cd /path/to/project - - # initialize infisical - infisical init - ``` - - ### Start your app with environment variables injected - - ```bash - # inject environment variables into app - infisical run -- [your application start command] - ``` - - Your app should now be running with the environment variables injected. - - Check out our [integrations](/integrations/overview) for injecting environment variables into frameworks and platforms like Docker. - - - - [Infisical SDKs](/sdks/overview) let your app fetch back secrets using an [Infisical Token](/getting-started/dashboard/token) that is scoped to a project and environment in Infisical. In this example, we demonstrate how to use the [Node SDK](/sdks/languages/node). - - Using Python? We have a [Python SDK](/sdks/languages/python) as well. - - ### Obtain an [Infisical Token](/getting-started/dashboard/token) - - Head to your project settings to create a token scoped to the project and environment you wish to fetch secrets from. - - ![token add](../images/project-token-add.png) - - ### Install the SDK - - ```bash - npm install infisical-node --save - ``` - - ### Initialize the Infisical client - - ```js - import InfisicalClient from "infisical-node"; - - const client = new InfisicalClient({ - token: "your_infisical_token", - }); - ``` - - ### Get a value - - ```js - const value = await client.getSecret("SOME_KEY"); - ``` - - ### Example with Express - - ```js - import InfisicalClient from "infisical-node"; - import express from "express"; - const app = express(); - const PORT = 3000; - - const client = InfisicalClient({ - token: "st.xxx.xxx", - }); - - // your application logic - - app.get("/", async (req, res) => { - const name = await client.getSecret("NAME"); - res.send(`Hello! My name is: ${name.secretValue}`); - }); - - app.listen(PORT, async () => { - console.log(`App listening on port ${port}`); - }); - ``` - - - We do not recommend hardcoding your [Infisical - Token](/getting-started/dashboard/token). Setting it as an environment - variable would be best. - - - - Check out our [SDKs](/sdks/overview) for other language SDKs. - - - diff --git a/docs/integrations/overview.mdx b/docs/integrations/overview.mdx index dcbdf44b8..69b7e9a97 100644 --- a/docs/integrations/overview.mdx +++ b/docs/integrations/overview.mdx @@ -5,7 +5,7 @@ description: "How to use Infisical to inject secrets and configs into various 3- Integrations allow environment variables to be synced from Infisical into your local development workflow, CI/CD pipelines, and production infrastructure. -Missing an integration? Throw in a [request](https://github.com/Infisical/infisical/issues). +Missing an integration? [Throw in a request](https://github.com/Infisical/infisical/issues). | Integration | Type | Status | | -------------------------------------------------------------- | --------- | ----------- | diff --git a/docs/mint.json b/docs/mint.json index 05ee74159..bdecac766 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -82,12 +82,21 @@ { "group": "Getting Started", "pages": [ - "getting-started/introduction", - "getting-started/quickstarts/platform", - "getting-started/quickstarts/sdks", - "getting-started/quickstarts/cli", - "getting-started/quickstarts/docker", - "getting-started/quickstarts/kubernetes" + "documentation/getting-started/introduction", + "documentation/getting-started/platform", + "documentation/getting-started/sdks", + "documentation/getting-started/cli", + "documentation/getting-started/docker", + "documentation/getting-started/kubernetes" + ] + }, + { + "group": "Guides", + "pages": [ + "documentation/guides/introduction", + "documentation/guides/node", + "documentation/guides/python", + "documentation/guides/nextjs-vercel" ] } ] @@ -95,13 +104,13 @@ { "group": "Platform", "pages": [ - "getting-started/dashboard/organization", - "getting-started/dashboard/project", - "getting-started/dashboard/pit-recovery", - "getting-started/dashboard/secret-versioning", - "getting-started/dashboard/audit-logs", - "getting-started/dashboard/mfa", - "getting-started/dashboard/token" + "documentation/platform/organization", + "documentation/platform/project", + "documentation/platform/pit-recovery", + "documentation/platform/secret-versioning", + "documentation/platform/audit-logs", + "documentation/platform/mfa", + "documentation/platform/token" ] }, { diff --git a/docs/sdks/overview.mdx b/docs/sdks/overview.mdx index 8c38498b5..16314cd93 100644 --- a/docs/sdks/overview.mdx +++ b/docs/sdks/overview.mdx @@ -3,14 +3,63 @@ title: "Overview" description: "How to use Infisical SDKs to fetch back secrets for your app" --- -Whether it be for local development or production, Infisical SDKs provide the easiest way for your app to fetch back secrets using an [Infisical Token](/getting-started/dashboard/token). +Whether it be for local development or production, Infisical SDKs provide the easiest way for your app to fetch back secrets from Infisical on demand. -We currently have the [Node SDK](https://github.com/Infisical/infisical-node) and [Python SDK](https://github.com/Infisical/infisical-python) available with more language SDKs coming out soon: - -- [Node](https://github.com/Infisical/infisical-node) -- [Python](https://github.com/Infisical/infisical-python) -- [Java](/sdks/languages/java) -- [Ruby](/sdks/languages/ruby) -- [Go](/sdks/languages/go) -- [Rust](/sdks/languages/rust) -- [PHP](/sdks/languages/php) + + + Manage secrets for your Node application on demand + + + Manage secrets for your Python application on demand + + + Manage secrets for your Java application on demand + + + Manage secrets for your Ruby application on demand + + + Manage secrets for your Go application on demand + + + Manage secrets for your Rust application on demand + + + Manage secrets for your PHP application on demand + + \ No newline at end of file