From 3630d584fa2a9e640ddc48e45512be3206fb92b2 Mon Sep 17 00:00:00 2001 From: Dhravya Shah Date: Thu, 30 Jan 2025 20:48:51 -0700 Subject: initial docs setup --- apps/docs/changelog/overview.mdx | 11 +++ apps/docs/development.mdx | 106 ---------------------- apps/docs/favicon.png | Bin 0 -> 23616 bytes apps/docs/favicon.svg | 49 ---------- apps/docs/images/hero-dark.svg | 169 +++++------------------------------ apps/docs/images/hero-light.svg | 163 +++++---------------------------- apps/docs/logo/dark.svg | 56 +----------- apps/docs/logo/light.svg | 52 +---------- apps/docs/mint.json | 58 ++++++------ apps/docs/self-hosting.mdx | 94 +++++++++++++++++++ apps/docs/snippets/snippet-intro.mdx | 5 +- apps/web/assets/logo-dark.svg | 14 --- apps/web/assets/logo-light.svg | 11 --- 13 files changed, 180 insertions(+), 608 deletions(-) create mode 100644 apps/docs/changelog/overview.mdx delete mode 100644 apps/docs/development.mdx create mode 100644 apps/docs/favicon.png delete mode 100644 apps/docs/favicon.svg create mode 100644 apps/docs/self-hosting.mdx delete mode 100644 apps/web/assets/logo-dark.svg delete mode 100644 apps/web/assets/logo-light.svg diff --git a/apps/docs/changelog/overview.mdx b/apps/docs/changelog/overview.mdx new file mode 100644 index 00000000..c04403dd --- /dev/null +++ b/apps/docs/changelog/overview.mdx @@ -0,0 +1,11 @@ +--- +title: "Product Updates" +description: "New updates and improvements" +mode: "center" +icon: "rocket" +--- + + + This is how you use a changelog with a label + and a description. + diff --git a/apps/docs/development.mdx b/apps/docs/development.mdx deleted file mode 100644 index c2f2ccda..00000000 --- a/apps/docs/development.mdx +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: 'Development' -description: 'Preview changes locally to update your docs' ---- - - - **Prerequisite**: Please install Node.js (version 19 or higher) before proceeding. - - -Follow these steps to install and run Mintlify on your operating system: - -**Step 1**: Install Mintlify: - - - - ```bash npm - npm i -g mintlify - ``` - -```bash yarn -yarn global add mintlify -``` - - - -**Step 2**: Navigate to the docs directory (where the `mint.json` file is located) and execute the following command: - -```bash -mintlify dev -``` - -A local preview of your documentation will be available at `http://localhost:3000`. - -### Custom Ports - -By default, Mintlify uses port 3000. You can customize the port Mintlify runs on by using the `--port` flag. To run Mintlify on port 3333, for instance, use this command: - -```bash -mintlify dev --port 3333 -``` - -If you attempt to run Mintlify on a port that's already in use, it will use the next available port: - -```md -Port 3000 is already in use. Trying 3001 instead. -``` - -## Mintlify Versions - -Please note that each CLI release is associated with a specific version of Mintlify. If your local website doesn't align with the production version, please update the CLI: - - - -```bash npm -npm i -g mintlify@latest -``` - -```bash yarn -yarn global upgrade mintlify -``` - - - -## Validating Links - -The CLI can assist with validating reference links made in your documentation. To identify any broken links, use the following command: - -```bash -mintlify broken-links -``` - -## Deployment - - - Unlimited editors available under the [Pro - Plan](https://mintlify.com/pricing) and above. - - -If the deployment is successful, you should see the following: - - - - - -## Code Formatting - -We suggest using extensions on your IDE to recognize and format MDX. If you're a VSCode user, consider the [MDX VSCode extension](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) for syntax highlighting, and [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for code formatting. - -## Troubleshooting - - - - - This may be due to an outdated version of node. Try the following: - 1. Remove the currently-installed version of mintlify: `npm remove -g mintlify` - 2. Upgrade to Node v19 or higher. - 3. Reinstall mintlify: `npm install -g mintlify` - - - - - Solution: Go to the root of your device and delete the \~/.mintlify folder. Afterwards, run `mintlify dev` again. - - - -Curious about what changed in the CLI version? [Check out the CLI changelog.](https://www.npmjs.com/package/mintlify?activeTab=versions) diff --git a/apps/docs/favicon.png b/apps/docs/favicon.png new file mode 100644 index 00000000..fd3dd8d3 Binary files /dev/null and b/apps/docs/favicon.png differ diff --git a/apps/docs/favicon.svg b/apps/docs/favicon.svg deleted file mode 100644 index 6a323326..00000000 --- a/apps/docs/favicon.svg +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/docs/images/hero-dark.svg b/apps/docs/images/hero-dark.svg index c6a30e88..b2c2bcee 100644 --- a/apps/docs/images/hero-dark.svg +++ b/apps/docs/images/hero-dark.svg @@ -1,161 +1,32 @@ - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - + - + - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/apps/docs/images/hero-light.svg b/apps/docs/images/hero-light.svg index 297d68fb..4d347b2a 100644 --- a/apps/docs/images/hero-light.svg +++ b/apps/docs/images/hero-light.svg @@ -1,155 +1,32 @@ - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - - - - - - - - - - - - + + + + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/apps/docs/logo/dark.svg b/apps/docs/logo/dark.svg index a6283786..513d7685 100644 --- a/apps/docs/logo/dark.svg +++ b/apps/docs/logo/dark.svg @@ -1,55 +1,3 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/apps/docs/logo/light.svg b/apps/docs/logo/light.svg index 582b3b95..96ae2b7b 100644 --- a/apps/docs/logo/light.svg +++ b/apps/docs/logo/light.svg @@ -1,51 +1,3 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/apps/docs/mint.json b/apps/docs/mint.json index 2799bba0..3964580b 100644 --- a/apps/docs/mint.json +++ b/apps/docs/mint.json @@ -1,61 +1,61 @@ { "$schema": "https://mintlify.com/schema.json", - "name": "Starter Kit", + "name": "Supermemory | Memory API for the AI era", "logo": { "dark": "/logo/dark.svg", "light": "/logo/light.svg" }, - "favicon": "/favicon.svg", + "favicon": "/favicon.png", "colors": { - "primary": "#0D9373", - "light": "#07C983", - "dark": "#0D9373", + "primary": "#1E3A8A", + "light": "#3B82F6", + "dark": "#1E3A8A", "anchors": { - "from": "#0D9373", - "to": "#07C983" + "from": "#1E3A8A", + "to": "#3B82F6" } }, "topbarLinks": [ { "name": "Support", - "url": "mailto:hi@mintlify.com" + "url": "mailto:dhravya@supermemory.com" } ], "topbarCtaButton": { "name": "Dashboard", - "url": "https://dashboard.mintlify.com" + "url": "https://supermemory.ai" }, "tabs": [ { "name": "API Reference", "url": "api-reference" + }, + { + "name": "Changelog", + "url": "changelog/overview" } ], "anchors": [ { - "name": "Documentation", - "icon": "book-open-cover", - "url": "https://mintlify.com/docs" + "name": "Github", + "icon": "github", + "url": "https://git.new/memory" }, { "name": "Community", - "icon": "slack", - "url": "https://mintlify.com/community" + "icon": "discord", + "url": "https://discord.gg/supermemory" }, { - "name": "Blog", - "icon": "newspaper", - "url": "https://mintlify.com/blog" + "name": "X (Twitter)", + "icon": "twitter", + "url": "https://x.com/supermemoryai" } ], "navigation": [ { "group": "Get Started", - "pages": [ - "introduction", - "quickstart", - "development" - ] + "pages": ["introduction", "quickstart", "self-hosting"] }, { "group": "Essentials", @@ -70,9 +70,7 @@ }, { "group": "API Documentation", - "pages": [ - "api-reference/introduction" - ] + "pages": ["api-reference/introduction"] }, { "group": "Endpoint Examples", @@ -81,11 +79,15 @@ "api-reference/endpoint/create", "api-reference/endpoint/delete" ] + }, + { + "group": "Changelog", + "pages": ["changelog/overview"] } ], "footerSocials": { - "x": "https://x.com/mintlify", - "github": "https://github.com/mintlify", - "linkedin": "https://linkedin.com/company/mintlify" + "x": "https://x.com/supermemoryai", + "github": "https://github.com/supermemoryai", + "linkedin": "https://linkedin.com/company/supermemoryai" } } diff --git a/apps/docs/self-hosting.mdx b/apps/docs/self-hosting.mdx new file mode 100644 index 00000000..efac8170 --- /dev/null +++ b/apps/docs/self-hosting.mdx @@ -0,0 +1,94 @@ +--- +title: "Self-hosting" +description: "Self-host Supermemory on your own infrastructure" +--- + +## Local Setup + + + + ```bash + git clone https://github.com/supermemoryai/supermemory.git + cd supermemory + npm i -g bun + bun install + ``` + + + + To spin up the database locally, use Docker Compose: + + ```bash + docker-compose up -d + ``` + + This will start a PostgreSQL database with pgvector extension at `localhost:5432`. + + To generate and apply migrations: + ```bash + bun run generate-migration + bun run migrate:local + ``` + + > Note: When coding or making changes, you MUST use the drizzle-orm functions exported from `packages/db` for interacting with the database. Not using them will cause type errors that are hard to debug. + + + + #### Backend (`apps/backend/.env` and `apps/backend/.dev.vars`): + + ```env + WORKOS_API_KEY=your_workos_api_key + WORKOS_CLIENT_ID=your_workos_client_id + WORKOS_COOKIE_PASSWORD=your_cookie_password + DATABASE_URL="postgresql://postgres:postgres@localhost:5432/supermemorylocal" + CONTENT_WORKFLOW=your_content_workflow + GEMINI_API_KEY=your_gemini_api_key + NODE_ENV=development + OPEN_AI_API_KEY=your_openai_api_key + BRAINTRUST_API_KEY=your_braintrust_api_key + RESEND_API_KEY=your_resend_api_key + TURNSTILE_SECRET_KEY=your_turnstile_secret_key + ``` + + #### Web (`apps/web/.env` and `apps/web/.dev.vars`): + + ```env + WORKOS_CLIENT_ID=your_workos_client_id + WORKOS_API_KEY=your_workos_api_key + WORKOS_REDIRECT_URI="http://localhost:3000/callback" + WORKOS_COOKIE_PASSWORD=your_cookie_password + DATABASE_URL="postgresql://postgres:postgres@localhost:5432/supermemorylocal" + + CLOUDFLARE_ACCOUNT_ID=your_cloudflare_account_id + R2_ACCESS_KEY_ID=your_r2_access_key_id + R2_SECRET_ACCESS_KEY=your_r2_secret_access_key + + BACKEND_URL=http://localhost:8787 + OPENAI_API_KEY=your_openai_api_key + NOTION_CLIENT_ID=your_notion_client_id + NOTION_CLIENT_SECRET=your_notion_client_secret + + NODE_ENV=development + STRIPE_CHECKOUT_KEY=your_stripe_checkout_key + STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret + ``` + + You also need to update the Wrangler config for the web app and backend to your own account's resources on Cloudflare. + + + + To edit the database schema, modify the files in `packages/db/schema.ts`, and then repeat the migration steps from the Database Setup section. + + + + 1. Install dependencies: + ```bash + bun install + ``` + + 2. Start the development servers: + ```bash + bun run dev + ``` + + diff --git a/apps/docs/snippets/snippet-intro.mdx b/apps/docs/snippets/snippet-intro.mdx index c57e7c75..32f95c0d 100644 --- a/apps/docs/snippets/snippet-intro.mdx +++ b/apps/docs/snippets/snippet-intro.mdx @@ -1,4 +1 @@ -One of the core principles of software development is DRY (Don't Repeat -Yourself). This is a principle that apply to documentation as -well. If you find yourself repeating the same content in multiple places, you -should consider creating a custom snippet to keep your content in sync. +hi \ No newline at end of file diff --git a/apps/web/assets/logo-dark.svg b/apps/web/assets/logo-dark.svg deleted file mode 100644 index 246f2163..00000000 --- a/apps/web/assets/logo-dark.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - \ No newline at end of file diff --git a/apps/web/assets/logo-light.svg b/apps/web/assets/logo-light.svg deleted file mode 100644 index 5ca15922..00000000 --- a/apps/web/assets/logo-light.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - \ No newline at end of file -- cgit v1.2.3