docs: added cloud documentation project (#12711)

This commit is contained in:
Shahed Nasser
2025-06-12 11:29:14 +03:00
committed by GitHub
parent bd6d9777c5
commit 8a88748982
85 changed files with 1463 additions and 19 deletions

View File

@@ -334,6 +334,63 @@ jobs:
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
vale-cloud:
if: ${{ startsWith(github.head_ref, 'docs/') }}
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Dependencies
run: yarn
- name: Build Dependencies
run: yarn build
- name: Install www/utils Dependencies
run: yarn
working-directory: www/utils
- name: Build packages
run: yarn build
working-directory: www/utils
# reviewdog throws an error when the number
# of file changes in a PR is > 300, so
# we retrieve the number of changed files
# and only run the linter if the number is
# less than 300. This is to avoid a PR hanging in
# an error state
- name: Get PR files number
working-directory: www/utils/packages/scripts
run: "yarn check:pr-files-count ${{ github.ref_name }}"
id: pr-files
- name: Get Directories to Scan
working-directory: www/vale
run: ./get-files.sh cloud/app
id: directories
- name: Vale Linter
uses: errata-ai/vale-action@reviewdog
if: ${{ steps.pr-files.outputs.files_lt_threshold == 'true' }}
with:
files: ${{ steps.directories.outputs.LIST }}
fail_on_error: true
vale_flags: "--minAlertLevel=error"
reporter: github-pr-check
token: ${{ github.token }}
filter_mode: nofilter
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
content-eslint:
if: ${{ startsWith(github.head_ref, 'docs/') }}
runs-on: ubuntu-latest

View File

@@ -10,6 +10,7 @@ NEXT_PUBLIC_DOCS_URL=
NEXT_PUBLIC_UI_URL=
NEXT_PUBLIC_RESOURCES_URL=
NEXT_PUBLIC_USER_GUIDE_URL=
NEXT_PUBLIC_CLOUD_URL=
NEXT_PUBLIC_DOCS_V1_URL=
NEXT_PUBLIC_API_V1_URL=
ALGOLIA_WRITE_API_KEY=

View File

@@ -7,6 +7,7 @@ NEXT_PUBLIC_ENV=
NEXT_PUBLIC_BASE_URL=
NEXT_PUBLIC_RESOURCES_URL=
NEXT_PUBLIC_USER_GUIDE_URL=
NEXT_PUBLIC_CLOUD_URL=
NEXT_PUBLIC_UI_URL=
NEXT_PUBLIC_API_URL=
NEXT_PUBLIC_DOCS_V1_URL=

View File

@@ -10,13 +10,13 @@ In this document, you'll learn the general steps to deploy your Medusa applicati
Find how-to guides for specific platforms in [this documentation](!resources!/deployment).
<Note title="Deploy with Medusa Cloud" type="success">
<Note title="Deploy with Cloud" type="success">
Want Medusa to manage and maintain your infrastructure? [Sign up and learn more about Medusa Cloud](https://medusajs.com/pricing)
Want Medusa to manage and maintain your infrastructure? [Sign up and learn more about Cloud](https://medusajs.com/pricing)
Medusa Cloud is our managed services offering that makes deploying and operating Medusa applications possible without having to worry about configuring, scaling, and maintaining infrastructure. Medusa Cloud hosts your server, Admin dashboard, database, and Redis instance.
Cloud is our managed services offering that makes deploying and operating Medusa applications possible without having to worry about configuring, scaling, and maintaining infrastructure. Cloud hosts your server, Admin dashboard, database, and Redis instance.
With Medusa Cloud, you maintain full customization control as you deploy your own modules and customizations directly from GitHub:
With Cloud, you maintain full customization control as you deploy your own modules and customizations directly from GitHub:
- Push to deploy.
- Multiple testing environments.

View File

@@ -46,16 +46,16 @@ Learn more about worker modes and how to configure them in the [Worker Mode chap
### How to Deploy Medusa?
Medusa Cloud is our managed services offering that makes deploying and operating Medusa applications possible without having to worry about configuring, scaling, and maintaining infrastructure. Medusa Cloud hosts your server, Admin dashboard, database, and Redis instance.
Cloud is our managed services offering that makes deploying and operating Medusa applications possible without having to worry about configuring, scaling, and maintaining infrastructure. Cloud hosts your server, Admin dashboard, database, and Redis instance.
With Medusa Cloud, you maintain full customization control as you deploy your own modules and customizations directly from GitHub:
With Cloud, you maintain full customization control as you deploy your own modules and customizations directly from GitHub:
- Push to deploy.
- Multiple testing environments.
- Preview environments for new PRs.
- Test on production-like data.
[Sign up and learn more about Medusa Cloud](https://medusajs.com/pricing)
[Sign up and learn more about Cloud](https://medusajs.com/pricing)
To self-host Medusa, the [next chapter](./general/page.mdx) explains the general steps to deploy your Medusa application. Refer to [this reference](!resources!/deployment) to find how-to deployment guides for general and specific hosting providers.

View File

@@ -0,0 +1,155 @@
import prettier from "eslint-plugin-prettier"
import markdown from "eslint-plugin-markdown"
import globals from "globals"
import babelParser from "@babel/eslint-parser"
import typescriptEslintEslintPlugin from "@typescript-eslint/eslint-plugin"
import tsParser from "@typescript-eslint/parser"
import path from "node:path"
import { fileURLToPath } from "node:url"
import js from "@eslint/js"
import { FlatCompat } from "@eslint/eslintrc"
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
})
export default [
{
ignores: ["**/references/**/*"],
},
{
plugins: {
prettier,
markdown,
},
languageOptions: {
globals: {
...globals.node,
},
parser: babelParser,
ecmaVersion: 13,
sourceType: "module",
parserOptions: {
requireConfigFile: false,
ecmaFeatures: {
experimentalDecorators: true,
modules: true,
},
},
},
settings: {
react: {
version: "detect",
},
},
rules: {
"no-undef": "off",
"no-unused-expressions": "off",
"no-unused-vars": "off",
"no-unused-labels": "off",
"no-console": "off",
curly: ["error", "all"],
"new-cap": "off",
"require-jsdoc": "off",
camelcase: "off",
"no-invalid-this": "off",
"max-len": [
"warn",
{
code: 64,
},
],
semi: ["error", "never"],
quotes: [
"error",
"double",
{
allowTemplateLiterals: true,
},
],
"comma-dangle": [
"error",
{
arrays: "always-multiline",
objects: "always-multiline",
imports: "always-multiline",
exports: "always-multiline",
functions: "never",
},
],
"object-curly-spacing": ["error", "always"],
"arrow-parens": ["error", "always"],
"linebreak-style": 0,
"no-confusing-arrow": [
"error",
{
allowParens: false,
},
],
"space-before-function-paren": [
"error",
{
anonymous: "always",
named: "never",
asyncArrow: "always",
},
],
"space-infix-ops": "off",
"eol-last": ["error", "always"],
"react/prop-types": "off",
"react/jsx-no-undef": "off",
},
},
{
files: ["**/*.md", "**/*.mdx"],
processor: "markdown/markdown",
},
{
files: ["**/*.md/*.js", "**/*.mdx/*.js", "**/*.md/*.jsx", "**/*.mdx/*.jsx"],
},
...compat.extends("plugin:@typescript-eslint/recommended").map((config) => ({
...config,
files: ["**/*.md/*.ts", "**/*.mdx/*.ts", "**/*.md/*.tsx", "**/*.mdx/*.tsx"],
})),
{
files: ["**/*.md/*.ts", "**/*.mdx/*.ts", "**/*.md/*.tsx", "**/*.mdx/*.tsx"],
plugins: {
"@typescript-eslint": typescriptEslintEslintPlugin,
},
languageOptions: {
parser: tsParser,
},
rules: {
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-var-requires": "off",
"prefer-rest-params": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
"@typescript-eslint/ban-types": "off",
},
},
]

View File

@@ -0,0 +1,20 @@
NEXT_PUBLIC_SEGMENT_API_KEY=
NEXT_PUBLIC_DOCS_ALGOLIA_INDEX_NAME=
NEXT_PUBLIC_API_ALGOLIA_INDEX_NAME=
NEXT_PUBLIC_ALGOLIA_API_KEY=
NEXT_PUBLIC_ALGOLIA_APP_ID=
NEXT_PUBLIC_ENV=
NEXT_PUBLIC_BASE_URL=
NEXT_PUBLIC_BASE_PATH=
NEXT_PUBLIC_DOCS_URL=
NEXT_PUBLIC_RESOURCES_URL=
NEXT_PUBLIC_UI_URL=
NEXT_PUBLIC_API_URL=
NEXT_PUBLIC_USER_GUIDE_URL=
ALGOLIA_WRITE_API_KEY=
ANALYZE_BUNDLE=
NEXT_PUBLIC_AI_ASSISTANT_URL=
NEXT_PUBLIC_AI_WEBSITE_ID=
NEXT_PUBLIC_AI_API_ASSISTANT_RECAPTCHA_SITE_KEY=
CLOUDINARY_CLOUD_NAME=
NEXT_PUBLIC_GA_ID=

36
www/apps/cloud/.gitignore vendored Normal file
View File

@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env*.local
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts

36
www/apps/cloud/README.md Normal file
View File

@@ -0,0 +1,36 @@
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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

View File

@@ -0,0 +1,43 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
html {
@apply antialiased;
text-rendering: optimizeLegibility;
}
body {
@apply overflow-x-hidden;
}
*::selection {
@apply bg-medusa-bg-highlight;
}
*:not(.code-block-elm) {
scrollbar-color: var(--docs-border-base) var(--docs-bg-base);
}
.code-block-elm {
scrollbar-color: var(--docs-contrast-border-base) transparent;
}
aside * {
scrollbar-color: var(--docs-border-base) var(--docs-bg-subtle);
}
body[data-modal="opened"] {
@apply !overflow-hidden;
}
.text-wrap {
text-wrap: wrap;
}
}
.grecaptcha-badge {
visibility: hidden;
}

BIN
www/apps/cloud/app/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

View File

@@ -0,0 +1,70 @@
import type { Metadata } from "next"
import { Inter, Roboto_Mono } from "next/font/google"
import Providers from "@/providers"
import "./globals.css"
import { BareboneLayout, TightLayout } from "docs-ui"
import { config } from "@/config"
import clsx from "clsx"
import Footer from "../components/Footer"
const ogImage =
"https://res.cloudinary.com/dza7lstvk/image/upload/v1732200992/Medusa%20Resources/opengraph-image_daq6nx.jpg"
export const metadata: Metadata = {
title: {
template: `%s - ${config.titleSuffix}`,
default: config.titleSuffix || "",
},
description: "Explore and learn how to use the Medusa Admin.",
metadataBase: new URL(
process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
),
openGraph: {
images: [
{
url: ogImage,
type: "image/jpeg",
height: "1260",
width: "2400",
},
],
},
twitter: {
images: [
{
url: ogImage,
type: "image/jpeg",
height: "1260",
width: "2400",
},
],
},
}
export const inter = Inter({
subsets: ["latin"],
variable: "--font-inter",
weight: ["400", "500"],
})
export const robotoMono = Roboto_Mono({
subsets: ["latin"],
variable: "--font-roboto-mono",
})
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<BareboneLayout
htmlClassName={clsx(inter.variable, robotoMono.variable)}
gaId={process.env.NEXT_PUBLIC_GA_ID}
>
<TightLayout ProvidersComponent={Providers} footerComponent={<Footer />}>
{children}
</TightLayout>
</BareboneLayout>
)
}

View File

@@ -0,0 +1,47 @@
---
hide_content_menu: true
---
import { CardList, H1 } from "docs-ui"
import {
BookOpen,
AcademicCapSolid,
ComputerDesktopSolid,
BuildingStorefront
} from "@medusajs/icons"
export const metadata = {
title: `Page Not Found`,
}
# {metadata.title}
The page you were looking for isn't available.
If you think this is a mistake, please [report this issue on GitHub](https://github.com/medusajs/medusa/issues/new?assignees=&labels=type%3A+docs&template=docs.yml).
<CardList
itemsPerRow={2}
items={[
{
title: "Get Started Docs",
href: "/",
icon: BookOpen
},
{
title: "Commerce Modules",
href: "!resources!/commerce-modules",
icon: AcademicCapSolid
},
{
title: "Admin API reference",
href: "!api!/admin",
icon: ComputerDesktopSolid
},
{
title: "Store API reference",
href: "!api!/store",
icon: BuildingStorefront
}
]}
/>

View File

@@ -0,0 +1,7 @@
export const metadata = {
title: `Cloud Documentation`,
}
# {metadata.title}
Welcome to the Cloud documentation!

View File

@@ -0,0 +1,13 @@
import { retrieveMdxPages } from "build-scripts"
import type { MetadataRoute } from "next"
import path from "path"
import { config } from "../config"
import { basePathUrl } from "../utils/base-path-url"
export default function sitemap(): MetadataRoute.Sitemap {
return retrieveMdxPages({
basePath: path.resolve("app"),
}).map((filePath) => ({
url: `${config.baseUrl}${basePathUrl(filePath)}`,
}))
}

View File

@@ -0,0 +1,37 @@
"use client"
import { EditButton as UiEditButton } from "docs-ui"
import { usePathname } from "next/navigation"
import { useCallback, useEffect, useState } from "react"
const EditButton = () => {
const pathname = usePathname()
const [editDate, setEditDate] = useState<string | undefined>()
const loadEditDate = useCallback(async () => {
const generatedEditDates = (await import("../../generated/edit-dates.mjs"))
.generatedEditDates
setEditDate(
(generatedEditDates as Record<string, string>)[
`app${pathname.replace(/\/$/, "")}/page.mdx`
]
)
}, [pathname])
useEffect(() => {
void loadEditDate()
}, [loadEditDate])
if (!editDate) {
return <></>
}
return (
<UiEditButton
filePath={`/www/apps/cloud/app${pathname.replace(/\/$/, "")}/page.mdx`}
editDate={editDate}
/>
)
}
export default EditButton

View File

@@ -0,0 +1,28 @@
"use client"
import {
Feedback as UiFeedback,
FeedbackProps as UiFeedbackProps,
} from "docs-ui"
import { usePathname } from "next/navigation"
import { basePathUrl } from "../../utils/base-path-url"
import { useMemo } from "react"
type FeedbackProps = Omit<UiFeedbackProps, "event" | "pathName">
const Feedback = (props: FeedbackProps) => {
const pathname = usePathname()
const feedbackPathname = useMemo(() => basePathUrl(pathname), [pathname])
return (
<UiFeedback
event="survey"
pathName={feedbackPathname}
question="Was this guide helpful?"
{...props}
/>
)
}
export default Feedback

View File

@@ -0,0 +1,17 @@
"use client"
import { Footer as UiFooter } from "docs-ui"
import Feedback from "../Feedback"
import EditButton from "../EditButton"
const Footer = () => {
return (
<UiFooter
showPagination={true}
feedbackComponent={<Feedback className="my-2" />}
editComponent={<EditButton />}
/>
)
}
export default Footer

View File

@@ -0,0 +1,16 @@
import type { MDXComponents as MDXComponentsType } from "mdx/types"
import {
Link,
MDXComponents as UiMdxComponents,
InlineThemeImage,
InlineIcon,
} from "docs-ui"
const MDXComponents: MDXComponentsType = {
...UiMdxComponents,
a: Link,
InlineThemeImage,
InlineIcon,
}
export default MDXComponents

View File

@@ -0,0 +1,34 @@
import { DocsConfig, Sidebar } from "types"
import { generatedSidebars } from "@/generated/sidebar.mjs"
import { globalConfig } from "docs-ui"
import { basePathUrl } from "../utils/base-path-url"
const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
export const config: DocsConfig = {
...globalConfig,
titleSuffix: "Medusa Cloud Documentation",
baseUrl,
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
sidebars: generatedSidebars as Sidebar.Sidebar[],
project: {
title: "Cloud",
key: "cloud",
},
logo: `${process.env.NEXT_PUBLIC_BASE_PATH}/images/logo.png`,
breadcrumbOptions: {
startItems: [
{
title: "Documentation",
link: baseUrl,
},
],
},
version: {
...globalConfig.version,
bannerImage: {
light: basePathUrl("/images/get-started-card.png"),
dark: basePathUrl("/images/get-started-card-dark.png"),
},
},
}

View File

@@ -0,0 +1,210 @@
import prettier from "eslint-plugin-prettier/recommended"
import globals from "globals"
import babelParser from "@babel/eslint-parser"
import typescriptEslintEslintPlugin from "@typescript-eslint/eslint-plugin"
import tsParser from "@typescript-eslint/parser"
import path from "node:path"
import { fileURLToPath } from "node:url"
import js from "@eslint/js"
import { FlatCompat } from "@eslint/eslintrc"
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
})
export default [
prettier,
{
ignores: [
"**/eslint-config-docs",
"**/.eslintrc.js",
"**/dist",
"**/next.config.js",
"**/spec",
"**/node_modules",
"**/public",
"**/.eslintrc.js",
"generated",
],
},
...compat.extends(
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:@next/next/recommended"
),
{
languageOptions: {
globals: {
...globals.node,
...globals.jest,
...globals.browser,
},
parser: babelParser,
ecmaVersion: 13,
sourceType: "module",
parserOptions: {
requireConfigFile: false,
ecmaFeatures: {
experimentalDecorators: true,
jsx: true,
modules: true,
},
project: true,
},
},
settings: {
react: {
version: "detect",
},
},
rules: {
curly: ["error", "all"],
"new-cap": "off",
"require-jsdoc": "off",
"no-unused-expressions": "off",
"no-unused-vars": "off",
camelcase: "off",
"no-invalid-this": "off",
"max-len": [
"error",
{
code: 80,
ignoreStrings: true,
ignoreRegExpLiterals: true,
ignoreComments: true,
ignoreTrailingComments: true,
ignoreUrls: true,
ignoreTemplateLiterals: true,
},
],
semi: ["error", "never"],
quotes: [
"error",
"double",
{
allowTemplateLiterals: true,
},
],
"comma-dangle": [
"error",
{
arrays: "always-multiline",
objects: "always-multiline",
imports: "always-multiline",
exports: "always-multiline",
functions: "never",
},
],
"object-curly-spacing": ["error", "always"],
"arrow-parens": ["error", "always"],
"linebreak-style": 0,
"no-confusing-arrow": [
"error",
{
allowParens: false,
},
],
"space-before-function-paren": [
"error",
{
anonymous: "always",
named: "never",
asyncArrow: "always",
},
],
"space-infix-ops": "error",
"eol-last": ["error", "always"],
"no-console": [
"error",
{
allow: ["error", "warn"],
},
],
"react/prop-types": [
2,
{
ignore: ["className"],
},
],
},
},
...compat
.extends(
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended"
)
.map((config) => ({
...config,
files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
})),
{
files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
plugins: {
"@typescript-eslint": typescriptEslintEslintPlugin,
},
languageOptions: {
parser: tsParser,
ecmaVersion: 13,
sourceType: "module",
parserOptions: {
project: "./tsconfig.json",
},
},
settings: {
next: {
rootDir: ".",
},
},
rules: {
"react/react-in-jsx-scope": "off",
"@typescript-eslint/prefer-ts-expect-error": "off",
"valid-jsdoc": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/promise-function-async": "error",
"@/keyword-spacing": "error",
"@/space-before-function-paren": [
"error",
{
anonymous: "always",
named: "never",
asyncArrow: "always",
},
],
"@/space-infix-ops": "error",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": "warn",
},
},
]

View File

@@ -0,0 +1,3 @@
export const generatedEditDates = {
"app/page.mdx": "2025-06-12T07:37:21.748Z"
}

View File

@@ -0,0 +1,16 @@
export const generatedSidebars = [
{
"sidebar_id": "cloud",
"title": "Cloud",
"items": [
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/",
"title": "Introduction",
"children": []
}
]
}
]

View File

@@ -0,0 +1,17 @@
import type { MDXComponents } from "mdx/types"
import CustomMDXComponents from "./components/MDXComponents"
// This file allows you to provide custom React components
// to be used in MDX files. You can import and use any
// React component you want, including components from
// other libraries.
// This file is required to use MDX in `app` directory.
export function useMDXComponents(components: MDXComponents): MDXComponents {
return {
// Allows customizing built-in components, e.g. to add styling.
// h1: ({ children }) => <h1 style={{ fontSize: "100px" }}>{children}</h1>,
...components,
...CustomMDXComponents,
}
}

View File

@@ -0,0 +1,15 @@
import { NextResponse } from "next/server"
import type { NextRequest } from "next/server"
export function middleware(request: NextRequest) {
return NextResponse.rewrite(
new URL(
`${request.nextUrl.basePath}/md-content${request.nextUrl.pathname.replace("/index.html.md", "")}`,
request.url
)
)
}
export const config = {
matcher: "/:path*/index.html.md",
}

View File

@@ -0,0 +1,139 @@
import mdx from "@next/mdx"
import path from "path"
import rehypeMdxCodeProps from "rehype-mdx-code-props"
import rehypeSlug from "rehype-slug"
import remarkDirective from "remark-directive"
import remarkFrontmatter from "remark-frontmatter"
import {
brokenLinkCheckerPlugin,
localLinksRehypePlugin,
cloudinaryImgRehypePlugin,
resolveAdmonitionsPlugin,
crossProjectLinksPlugin,
prerequisitesLinkFixerPlugin,
remarkAttachFrontmatterDataPlugin,
recmaInjectMdxDataPlugin,
} from "remark-rehype-plugins"
import bundleAnalyzer from "@next/bundle-analyzer"
import withExtractedTableOfContents from "@stefanprobst/rehype-extract-toc"
const withMDX = mdx({
extension: /\.mdx?$/,
options: {
rehypePlugins: [
[
brokenLinkCheckerPlugin,
{
crossProjects: {
docs: {
projectPath: path.resolve("..", "book"),
},
ui: {
projectPath: path.resolve("..", "ui"),
contentPath: "src/content/docs",
},
resources: {
projectPath: path.resolve("..", "resources"),
hasGeneratedSlugs: true,
},
api: {
projectPath: path.resolve("..", "api-reference"),
skipSlugValidation: true,
},
"user-guide": {
projectPath: path.resolve("..", "user-guide"),
},
},
},
],
[
crossProjectLinksPlugin,
{
baseUrl: process.env.NEXT_PUBLIC_BASE_URL,
projectUrls: {
docs: {
url: process.env.NEXT_PUBLIC_DOCS_URL,
path: "",
},
resources: {
url: process.env.NEXT_PUBLIC_RESOURCES_URL,
},
ui: {
url: process.env.NEXT_PUBLIC_UI_URL,
},
api: {
url: process.env.NEXT_PUBLIC_API_URL,
},
"user-guide": {
url: process.env.NEXT_PUBLIC_USER_GUIDE_URL,
},
},
useBaseUrl:
process.env.NODE_ENV === "production" ||
process.env.VERCEL_ENV === "production",
},
],
[localLinksRehypePlugin],
[
rehypeMdxCodeProps,
{
tagName: "code",
},
],
[rehypeSlug],
[
cloudinaryImgRehypePlugin,
{
cloudinaryConfig: {
cloudName: process.env.CLOUDINARY_CLOUD_NAME || "",
flags: ["fl_lossy", "f_auto"],
resize: {
action: "pad",
aspectRatio: "16:9",
},
roundCorners: 16,
},
},
],
[
prerequisitesLinkFixerPlugin,
{
checkLinksType: "value",
},
],
[withExtractedTableOfContents],
],
remarkPlugins: [
[remarkFrontmatter],
[remarkDirective],
[resolveAdmonitionsPlugin],
[remarkAttachFrontmatterDataPlugin],
],
recmaPlugins: [[recmaInjectMdxDataPlugin]],
jsx: true,
},
})
/** @type {import('next').NextConfig} */
const nextConfig = {
// Configure `pageExtensions` to include MDX files
pageExtensions: ["js", "jsx", "mdx", "ts", "tsx"],
transpilePackages: ["docs-ui"],
basePath: process.env.NEXT_PUBLIC_BASE_PATH || "/cloud",
outputFileTracingIncludes: {
"/md\\-content/\\[\\[\\.\\.\\.slug\\]\\]": ["./app/**/*.mdx"],
},
outputFileTracingExcludes: {
"*": ["node_modules/@medusajs/icons"],
},
experimental: {
optimizePackageImports: ["@medusajs/icons", "@medusajs/ui"],
},
}
const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === "true",
})
export default withMDX(withBundleAnalyzer(nextConfig))

View File

@@ -0,0 +1,57 @@
{
"name": "cloud",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "yarn prep && next dev",
"dev:monorepo": "yarn prep && yarn dev -p 3005",
"build": "yarn prep && next build",
"build:dev": "NODE_ENV=test yarn build",
"start": "next start",
"start:monorepo": "yarn start -p 3005",
"lint": "next lint --fix",
"lint:content": "eslint --no-config-lookup -c .content.eslintrc.mjs app/**/*.mdx --fix",
"prep": "node ./scripts/prepare.mjs"
},
"dependencies": {
"@mdx-js/loader": "^3.1.0",
"@mdx-js/react": "^3.1.0",
"@medusajs/icons": "2.8.4",
"@next/mdx": "15.0.4",
"@stefanprobst/rehype-extract-toc": "^3.0.0",
"clsx": "^2.1.0",
"docs-ui": "*",
"next": "15.0.4",
"react": "rc",
"react-dom": "rc",
"rehype-mdx-code-props": "^2.0.0",
"rehype-slug": "^6.0.0",
"remark-directive": "^3.0.0",
"remark-frontmatter": "^5.0.0",
"remark-rehype-plugins": "*"
},
"devDependencies": {
"@types/mdx": "^2.0.13",
"@types/node": "^20",
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react@rc",
"autoprefixer": "^10.0.1",
"build-scripts": "*",
"eslint": "^9.13.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react-hooks": "^5.0.0",
"postcss": "^8",
"tailwind": "*",
"tailwindcss": "^3.3.0",
"tsconfig": "*",
"types": "*",
"typescript": "^5"
},
"engines": {
"node": ">=20"
},
"overrides": {
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc"
}
}

View File

@@ -0,0 +1 @@
module.exports = require("tailwind/postcss.config")

View File

@@ -0,0 +1,77 @@
"use client"
import {
AiAssistantProvider,
AnalyticsProvider,
ColorModeProvider,
HooksLoader,
LearningPathProvider,
MobileProvider,
ModalProvider,
NotificationProvider,
PaginationProvider,
ScrollControllerProvider,
SiteConfigProvider,
} from "docs-ui"
import SidebarProvider from "./sidebar"
import SearchProvider from "./search"
import { config } from "../config"
import { MainNavProvider } from "./main-nav"
type ProvidersProps = {
children?: React.ReactNode
}
const Providers = ({ children }: ProvidersProps) => {
return (
<AnalyticsProvider writeKey={process.env.NEXT_PUBLIC_SEGMENT_API_KEY}>
<SiteConfigProvider config={config}>
<MobileProvider>
<ColorModeProvider>
<ModalProvider>
<LearningPathProvider>
<NotificationProvider>
<ScrollControllerProvider scrollableSelector="#main">
<SidebarProvider>
<PaginationProvider>
<MainNavProvider>
<SearchProvider>
<AiAssistantProvider
apiUrl={
process.env.NEXT_PUBLIC_AI_ASSISTANT_URL ||
"temp"
}
websiteId={
process.env.NEXT_PUBLIC_AI_WEBSITE_ID || "temp"
}
recaptchaSiteKey={
// eslint-disable-next-line prettier/prettier, max-len
process.env.NEXT_PUBLIC_AI_API_ASSISTANT_RECAPTCHA_SITE_KEY ||
"temp"
}
>
<HooksLoader
options={{
pageScrollManager: true,
currentLearningPath: false,
}}
>
{children}
</HooksLoader>
</AiAssistantProvider>
</SearchProvider>
</MainNavProvider>
</PaginationProvider>
</SidebarProvider>
</ScrollControllerProvider>
</NotificationProvider>
</LearningPathProvider>
</ModalProvider>
</ColorModeProvider>
</MobileProvider>
</SiteConfigProvider>
</AnalyticsProvider>
)
}
export default Providers

View File

@@ -0,0 +1,28 @@
"use client"
import {
getNavDropdownItems,
MainNavProvider as UiMainNavProvider,
} from "docs-ui"
import { useMemo } from "react"
import { config } from "../config"
type MainNavProviderProps = {
children?: React.ReactNode
}
export const MainNavProvider = ({ children }: MainNavProviderProps) => {
const navigationDropdownItems = useMemo(
() =>
getNavDropdownItems({
basePath: config.baseUrl,
}),
[]
)
return (
<UiMainNavProvider navItems={navigationDropdownItems}>
{children}
</UiMainNavProvider>
)
}

View File

@@ -0,0 +1,52 @@
"use client"
import { SearchProvider as UiSearchProvider } from "docs-ui"
import { config } from "../config"
type SearchProviderProps = {
children: React.ReactNode
}
const SearchProvider = ({ children }: SearchProviderProps) => {
return (
<UiSearchProvider
algolia={{
appId: process.env.NEXT_PUBLIC_ALGOLIA_APP_ID || "temp",
apiKey: process.env.NEXT_PUBLIC_ALGOLIA_API_KEY || "temp",
mainIndexName:
process.env.NEXT_PUBLIC_DOCS_ALGOLIA_INDEX_NAME || "temp",
}}
indices={[
{
value: process.env.NEXT_PUBLIC_DOCS_ALGOLIA_INDEX_NAME || "temp",
title: "Docs",
},
{
value: process.env.NEXT_PUBLIC_API_ALGOLIA_INDEX_NAME || "temp",
title: "Store & Admin API",
},
]}
defaultIndex={process.env.NEXT_PUBLIC_DOCS_ALGOLIA_INDEX_NAME || "temp"}
searchProps={{
isLoading: false,
suggestions: [
{
title: "Search Suggestions",
items: [
// TODO: Add more suggestions
"Manage Organizations",
"Create Project",
"Manage Environments",
"View Logs",
],
},
],
checkInternalPattern: new RegExp(`^${config.baseUrl}/cloud`),
}}
>
{children}
</UiSearchProvider>
)
}
export default SearchProvider

View File

@@ -0,0 +1,25 @@
"use client"
import {
SidebarProvider as UiSidebarProvider,
useScrollController,
} from "docs-ui"
import { config } from "@/config"
type SidebarProviderProps = {
children?: React.ReactNode
}
const SidebarProvider = ({ children }: SidebarProviderProps) => {
const { scrollableElement } = useScrollController()
return (
<UiSidebarProvider
scrollableElement={scrollableElement}
sidebars={config.sidebars}
>
{children}
</UiSidebarProvider>
)
}
export default SidebarProvider

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 921 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,5 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="magnifying-glass">
<path id="Vector" d="M17.4997 17.5001L13.1688 13.1693M13.1688 13.1693C14.341 11.9972 14.9995 10.4074 14.9995 8.74972C14.9995 7.09205 14.341 5.50228 13.1688 4.33014C11.9967 3.15799 10.4069 2.49949 8.74926 2.49949C7.09159 2.49949 5.50182 3.15799 4.32967 4.33014C3.15753 5.50228 2.49902 7.09205 2.49902 8.74972C2.49902 10.4074 3.15753 11.9972 4.32967 13.1693C5.50182 14.3414 7.09159 15 8.74926 15C10.4069 15 11.9967 14.3414 13.1688 13.1693V13.1693Z" stroke="#6E6E6E" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 666 B

View File

@@ -0,0 +1,5 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="magnifying-glass">
<path id="Vector" d="M17.4997 17.5001L13.1688 13.1693M13.1688 13.1693C14.341 11.9972 14.9995 10.4074 14.9995 8.74972C14.9995 7.09205 14.341 5.50228 13.1688 4.33014C11.9967 3.15799 10.4069 2.49949 8.74926 2.49949C7.09159 2.49949 5.50182 3.15799 4.32967 4.33014C3.15753 5.50228 2.49902 7.09205 2.49902 8.74972C2.49902 10.4074 3.15753 11.9972 4.32967 13.1693C5.50182 14.3414 7.09159 15 8.74926 15C10.4069 15 11.9967 14.3414 13.1688 13.1693V13.1693Z" stroke="#9CA3AF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 666 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,4 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.99984 8.66669L4.6665 12L7.99984 15.3334" stroke="#889096" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M15.3332 4.66669V9.33335C15.3332 10.0406 15.0522 10.7189 14.5521 11.219C14.052 11.7191 13.3737 12 12.6665 12H4.6665" stroke="#889096" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 452 B

View File

@@ -0,0 +1,4 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.99984 8.66669L4.6665 12L7.99984 15.3334" stroke="#706F78" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M15.3332 4.66669V9.33335C15.3332 10.0406 15.0522 10.7189 14.5521 11.219C14.052 11.7191 13.3737 12 12.6665 12H4.6665" stroke="#706F78" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 452 B

View File

@@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="32" height="32" rx="4" fill="#F1F3F5"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.915 7.625C10.0886 7.625 9.41943 8.295 9.41943 9.12054V22.8795C9.41943 23.705 10.0894 24.375 10.915 24.375H21.0846C21.9101 24.375 22.5801 23.705 22.5801 22.8795V16.5982C22.5801 15.8049 22.265 15.0441 21.7041 14.4832C21.1431 13.9223 20.3824 13.6071 19.5891 13.6071H18.0935C17.6969 13.6071 17.3165 13.4496 17.036 13.1691C16.7556 12.8886 16.598 12.5082 16.598 12.1116V10.6161C16.598 9.82279 16.2829 9.062 15.7219 8.50106C15.161 7.94013 14.4002 7.625 13.6069 7.625H10.915ZM12.4105 18.3929C12.4105 18.2342 12.4735 18.082 12.5857 17.9699C12.6979 17.8577 12.8501 17.7946 13.0087 17.7946H18.9909C19.1495 17.7946 19.3017 17.8577 19.4139 17.9699C19.5261 18.082 19.5891 18.2342 19.5891 18.3929C19.5891 18.5515 19.5261 18.7037 19.4139 18.8159C19.3017 18.928 19.1495 18.9911 18.9909 18.9911H13.0087C12.8501 18.9911 12.6979 18.928 12.5857 18.8159C12.4735 18.7037 12.4105 18.5515 12.4105 18.3929ZM13.0087 20.1875C12.8501 20.1875 12.6979 20.2505 12.5857 20.3627C12.4735 20.4749 12.4105 20.6271 12.4105 20.7857C12.4105 20.9444 12.4735 21.0965 12.5857 21.2087C12.6979 21.3209 12.8501 21.3839 13.0087 21.3839H15.9998C16.1584 21.3839 16.3106 21.3209 16.4228 21.2087C16.535 21.0965 16.598 20.9444 16.598 20.7857C16.598 20.6271 16.535 20.4749 16.4228 20.3627C16.3106 20.2505 16.1584 20.1875 15.9998 20.1875H13.0087Z" fill="#687076"/>
<path d="M16.7744 7.8772C17.4337 8.6373 17.796 9.61006 17.7946 10.6162V12.1118C17.7946 12.2769 17.9286 12.4109 18.0937 12.4109H19.5892C20.5954 12.4095 21.5681 12.7718 22.3282 13.431C21.9773 12.0964 21.2782 10.8789 20.3024 9.90306C19.3266 8.92724 18.1091 8.22812 16.7744 7.8772Z" fill="#687076"/>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="32" height="32" rx="4" fill="#2E2E32"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.915 7.625C10.0886 7.625 9.41943 8.295 9.41943 9.12054V22.8795C9.41943 23.705 10.0894 24.375 10.915 24.375H21.0846C21.9101 24.375 22.5801 23.705 22.5801 22.8795V16.5982C22.5801 15.8049 22.265 15.0441 21.7041 14.4832C21.1431 13.9223 20.3824 13.6071 19.5891 13.6071H18.0935C17.6969 13.6071 17.3165 13.4496 17.036 13.1691C16.7556 12.8886 16.598 12.5082 16.598 12.1116V10.6161C16.598 9.82279 16.2829 9.062 15.7219 8.50106C15.161 7.94013 14.4002 7.625 13.6069 7.625H10.915ZM12.4105 18.3929C12.4105 18.2342 12.4735 18.082 12.5857 17.9699C12.6979 17.8577 12.8501 17.7946 13.0087 17.7946H18.9909C19.1495 17.7946 19.3017 17.8577 19.4139 17.9699C19.5261 18.082 19.5891 18.2342 19.5891 18.3929C19.5891 18.5515 19.5261 18.7037 19.4139 18.8159C19.3017 18.928 19.1495 18.9911 18.9909 18.9911H13.0087C12.8501 18.9911 12.6979 18.928 12.5857 18.8159C12.4735 18.7037 12.4105 18.5515 12.4105 18.3929ZM13.0087 20.1875C12.8501 20.1875 12.6979 20.2505 12.5857 20.3627C12.4735 20.4749 12.4105 20.6271 12.4105 20.7857C12.4105 20.9444 12.4735 21.0965 12.5857 21.2087C12.6979 21.3209 12.8501 21.3839 13.0087 21.3839H15.9998C16.1584 21.3839 16.3106 21.3209 16.4228 21.2087C16.535 21.0965 16.598 20.9444 16.598 20.7857C16.598 20.6271 16.535 20.4749 16.4228 20.3627C16.3106 20.2505 16.1584 20.1875 15.9998 20.1875H13.0087Z" fill="#7E7D86"/>
<path d="M16.7744 7.8772C17.4337 8.6373 17.796 9.61006 17.7946 10.6162V12.1118C17.7946 12.2769 17.9286 12.4109 18.0937 12.4109H19.5892C20.5954 12.4095 21.5681 12.7718 22.3282 13.431C21.9773 12.0964 21.2782 10.8789 20.3024 9.90306C19.3266 8.92724 18.1091 8.22812 16.7744 7.8772Z" fill="#7E7D86"/>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,5 @@
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.8169 6.06351C10.8167 5.44855 10.9606 4.84211 11.237 4.29277C11.5134 3.74343 11.9147 3.26648 12.4086 2.90013C12.9025 2.53379 13.4754 2.28824 14.0813 2.18315C14.6872 2.07807 15.3093 2.11638 15.8978 2.29501C15.9908 2.32318 16.0749 2.37498 16.1419 2.44534C16.209 2.5157 16.2566 2.60222 16.2803 2.69649C16.3039 2.79075 16.3027 2.88952 16.2768 2.98319C16.2509 3.07686 16.2012 3.16222 16.1325 3.23095L13.6427 5.72003C13.6899 6.07626 13.8497 6.42049 14.1234 6.69422C14.3971 6.96795 14.7414 7.12769 15.0983 7.17419L17.5867 4.6851C17.6554 4.6164 17.7408 4.56668 17.8344 4.54078C17.9281 4.51489 18.0269 4.5137 18.1211 4.53734C18.2154 4.56099 18.3019 4.60864 18.3723 4.67568C18.4426 4.74271 18.4944 4.82683 18.5226 4.91984C18.7095 5.53544 18.7427 6.18746 18.6193 6.81886C18.4959 7.45026 18.2197 8.0418 17.8147 8.54174C17.4098 9.04167 16.8886 9.43477 16.2966 9.68663C15.7046 9.93849 15.0599 10.0415 14.4189 9.9865C13.6554 9.92201 13.0165 10.0615 12.6872 10.462L7.32509 16.9753C7.10554 17.2406 6.833 17.4571 6.52493 17.611C6.21686 17.7649 5.88004 17.8528 5.53606 17.869C5.19207 17.8852 4.84848 17.8294 4.52731 17.7052C4.20613 17.5809 3.91443 17.391 3.6709 17.1475C3.42737 16.904 3.23736 16.6124 3.11305 16.2912C2.98874 15.9701 2.93287 15.6265 2.94901 15.2825C2.96514 14.9385 3.05294 14.6017 3.20676 14.2936C3.36059 13.9855 3.57707 13.7129 3.84232 13.4933L10.3549 8.13037C10.7546 7.8004 10.8949 7.16219 10.8304 6.39874C10.8212 6.28723 10.8167 6.17539 10.8169 6.06351ZM4.905 15.3442C4.905 15.195 4.96426 15.0519 5.06974 14.9464C5.17523 14.8409 5.31829 14.7817 5.46746 14.7817H5.47346C5.62264 14.7817 5.7657 14.8409 5.87119 14.9464C5.97667 15.0519 6.03593 15.195 6.03593 15.3442V15.3501C6.03593 15.4993 5.97667 15.6424 5.87119 15.7479C5.7657 15.8534 5.62264 15.9126 5.47346 15.9126H5.46746C5.31829 15.9126 5.17523 15.8534 5.06974 15.7479C4.96426 15.6424 4.905 15.4993 4.905 15.3501V15.3442Z" fill="#889096"/>
<path d="M9.37377 7.48082L7.72313 5.83093V4.65651C7.72313 4.5594 7.69798 4.46395 7.65014 4.37945C7.60231 4.29495 7.53341 4.22427 7.45015 4.17429L4.63783 2.4869C4.53027 2.42242 4.40424 2.39574 4.27978 2.41109C4.15531 2.42645 4.03955 2.48296 3.95088 2.57164L3.38842 3.13411C3.29973 3.22278 3.24322 3.33854 3.22787 3.46301C3.21251 3.58747 3.23919 3.7135 3.30367 3.82106L4.99106 6.63338C5.04104 6.71663 5.11172 6.78553 5.19622 6.83337C5.28073 6.88121 5.37617 6.90635 5.47328 6.90636H6.6462L8.1926 8.45276L9.37377 7.48007V7.48082Z" fill="#889096"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.2339 13.9971L14.3709 17.1334C14.606 17.3685 14.885 17.5549 15.1921 17.6821C15.4992 17.8093 15.8283 17.8748 16.1607 17.8748C16.4931 17.8748 16.8222 17.8093 17.1293 17.6821C17.4364 17.5549 17.7154 17.3685 17.9504 17.1334C18.1855 16.8984 18.3719 16.6194 18.4991 16.3123C18.6263 16.0052 18.6918 15.6761 18.6918 15.3437C18.6918 15.0113 18.6263 14.6821 18.4991 14.3751C18.3719 14.068 18.1855 13.7889 17.9504 13.5539L15.4711 11.0753C15.0911 11.1292 14.7062 11.14 14.3237 11.1076C14.0282 11.0821 13.8122 11.1031 13.6735 11.1391C13.6296 11.1484 13.5873 11.1643 13.5482 11.1863L11.2339 13.9971ZM13.7942 12.9772C13.8997 12.8719 14.0426 12.8127 14.1917 12.8127C14.3407 12.8127 14.4837 12.8719 14.5892 12.9772L15.9953 14.3841C16.0506 14.4356 16.0949 14.4977 16.1257 14.5667C16.1564 14.6357 16.1729 14.7102 16.1743 14.7857C16.1756 14.8612 16.1617 14.9362 16.1334 15.0063C16.1051 15.0763 16.063 15.1399 16.0096 15.1933C15.9562 15.2467 15.8926 15.2888 15.8225 15.3171C15.7525 15.3454 15.6775 15.3593 15.602 15.358C15.5264 15.3566 15.452 15.3401 15.383 15.3094C15.314 15.2786 15.2519 15.2343 15.2004 15.179L13.7942 13.7729C13.6889 13.6674 13.6297 13.5245 13.6297 13.3754C13.6297 13.2264 13.6889 13.0834 13.7942 12.9779V12.9772Z" fill="#889096"/>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -0,0 +1,5 @@
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.8169 6.06351C10.8167 5.44855 10.9606 4.84211 11.237 4.29277C11.5134 3.74343 11.9147 3.26648 12.4086 2.90013C12.9025 2.53379 13.4754 2.28824 14.0813 2.18315C14.6872 2.07807 15.3093 2.11638 15.8978 2.29501C15.9908 2.32318 16.0749 2.37498 16.1419 2.44534C16.209 2.5157 16.2566 2.60222 16.2803 2.69649C16.3039 2.79075 16.3027 2.88952 16.2768 2.98319C16.2509 3.07686 16.2012 3.16222 16.1325 3.23095L13.6427 5.72003C13.6899 6.07626 13.8497 6.42049 14.1234 6.69422C14.3971 6.96795 14.7414 7.12769 15.0983 7.17419L17.5867 4.6851C17.6554 4.6164 17.7408 4.56668 17.8344 4.54078C17.9281 4.51489 18.0269 4.5137 18.1211 4.53734C18.2154 4.56099 18.3019 4.60864 18.3723 4.67568C18.4426 4.74271 18.4944 4.82683 18.5226 4.91984C18.7095 5.53544 18.7427 6.18746 18.6193 6.81886C18.4959 7.45026 18.2197 8.0418 17.8147 8.54174C17.4098 9.04167 16.8886 9.43477 16.2966 9.68663C15.7046 9.93849 15.0599 10.0415 14.4189 9.9865C13.6554 9.92201 13.0165 10.0615 12.6872 10.462L7.32509 16.9753C7.10554 17.2406 6.833 17.4571 6.52493 17.611C6.21686 17.7649 5.88004 17.8528 5.53606 17.869C5.19207 17.8852 4.84848 17.8294 4.52731 17.7052C4.20613 17.5809 3.91443 17.391 3.6709 17.1475C3.42737 16.904 3.23736 16.6124 3.11305 16.2912C2.98874 15.9701 2.93287 15.6265 2.94901 15.2825C2.96514 14.9385 3.05294 14.6017 3.20676 14.2936C3.36059 13.9855 3.57707 13.7129 3.84232 13.4933L10.3549 8.13037C10.7546 7.8004 10.8949 7.16219 10.8304 6.39874C10.8212 6.28723 10.8167 6.17539 10.8169 6.06351ZM4.905 15.3442C4.905 15.195 4.96426 15.0519 5.06974 14.9464C5.17523 14.8409 5.31829 14.7817 5.46746 14.7817H5.47346C5.62264 14.7817 5.7657 14.8409 5.87119 14.9464C5.97667 15.0519 6.03593 15.195 6.03593 15.3442V15.3501C6.03593 15.4993 5.97667 15.6424 5.87119 15.7479C5.7657 15.8534 5.62264 15.9126 5.47346 15.9126H5.46746C5.31829 15.9126 5.17523 15.8534 5.06974 15.7479C4.96426 15.6424 4.905 15.4993 4.905 15.3501V15.3442Z" fill="#706F78"/>
<path d="M9.37377 7.48082L7.72313 5.83093V4.65651C7.72313 4.5594 7.69798 4.46395 7.65014 4.37945C7.60231 4.29495 7.53341 4.22427 7.45015 4.17429L4.63783 2.4869C4.53027 2.42242 4.40424 2.39574 4.27978 2.41109C4.15531 2.42645 4.03955 2.48296 3.95088 2.57164L3.38842 3.13411C3.29973 3.22278 3.24322 3.33854 3.22787 3.46301C3.21251 3.58747 3.23919 3.7135 3.30367 3.82106L4.99106 6.63338C5.04104 6.71663 5.11172 6.78553 5.19622 6.83337C5.28073 6.88121 5.37617 6.90635 5.47328 6.90636H6.6462L8.1926 8.45276L9.37377 7.48007V7.48082Z" fill="#706F78"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.2339 13.9971L14.3709 17.1334C14.606 17.3685 14.885 17.5549 15.1921 17.6821C15.4992 17.8093 15.8283 17.8748 16.1607 17.8748C16.4931 17.8748 16.8222 17.8093 17.1293 17.6821C17.4364 17.5549 17.7154 17.3685 17.9504 17.1334C18.1855 16.8984 18.3719 16.6194 18.4991 16.3123C18.6263 16.0052 18.6918 15.6761 18.6918 15.3437C18.6918 15.0113 18.6263 14.6821 18.4991 14.3751C18.3719 14.068 18.1855 13.7889 17.9504 13.5539L15.4711 11.0753C15.0911 11.1292 14.7062 11.14 14.3237 11.1076C14.0282 11.0821 13.8122 11.1031 13.6735 11.1391C13.6296 11.1484 13.5873 11.1643 13.5482 11.1863L11.2339 13.9971ZM13.7942 12.9772C13.8997 12.8719 14.0426 12.8127 14.1917 12.8127C14.3407 12.8127 14.4837 12.8719 14.5892 12.9772L15.9953 14.3841C16.0506 14.4356 16.0949 14.4977 16.1257 14.5667C16.1564 14.6357 16.1729 14.7102 16.1743 14.7857C16.1756 14.8612 16.1617 14.9362 16.1334 15.0063C16.1051 15.0763 16.063 15.1399 16.0096 15.1933C15.9562 15.2467 15.8926 15.2888 15.8225 15.3171C15.7525 15.3454 15.6775 15.3593 15.602 15.358C15.5264 15.3566 15.452 15.3401 15.383 15.3094C15.314 15.2786 15.2519 15.2343 15.2004 15.179L13.7942 13.7729C13.6889 13.6674 13.6297 13.5245 13.6297 13.3754C13.6297 13.2264 13.6889 13.0834 13.7942 12.9779V12.9772Z" fill="#706F78"/>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 283 64"><path fill="black" d="M141 16c-11 0-19 7-19 18s9 18 20 18c7 0 13-3 16-7l-7-5c-2 3-6 4-9 4-5 0-9-3-10-7h28v-3c0-11-8-18-19-18zm-9 15c1-4 4-7 9-7s8 3 9 7h-18zm117-15c-11 0-19 7-19 18s9 18 20 18c6 0 12-3 16-7l-8-5c-2 3-5 4-8 4-5 0-9-3-11-7h28l1-3c0-11-8-18-19-18zm-10 15c2-4 5-7 10-7s8 3 9 7h-19zm-39 3c0 6 4 10 10 10 4 0 7-2 9-5l8 5c-3 5-9 8-17 8-11 0-19-7-19-18s8-18 19-18c8 0 14 3 17 8l-8 5c-2-3-5-5-9-5-6 0-10 4-10 10zm83-29v46h-9V5h9zM37 0l37 64H0L37 0zm92 5-27 48L74 5h10l18 30 17-30h10zm59 12v10l-3-1c-6 0-10 4-10 10v15h-9V17h9v9c0-5 6-9 13-9z"/></svg>

After

Width:  |  Height:  |  Size: 629 B

View File

@@ -0,0 +1,9 @@
import { generateEditedDates, generateSidebar } from "build-scripts"
import { sidebar } from "../sidebar.mjs"
async function main() {
await generateSidebar(sidebar)
await generateEditedDates()
}
void main()

View File

@@ -0,0 +1,14 @@
/** @type {import('types').Sidebar.RawSidebar[]} */
export const sidebar = [
{
sidebar_id: "cloud",
title: "Cloud",
items: [
{
type: "link",
path: "/",
title: "Introduction",
},
],
},
]

View File

@@ -0,0 +1,37 @@
import coreConfig from "tailwind"
/** @type {import('tailwindcss').Config} */
module.exports = {
...coreConfig,
content: [
...coreConfig.content,
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
"./app/**/*.{js,ts,jsx,tsx,mdx}",
"./layouts/**/*.{js,ts,jsx,tsx,mdx}",
"./providers/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
...coreConfig.theme,
extend: {
...coreConfig.theme.extend,
container: {
center: true,
screens: {
"2xl": "1400px",
},
},
},
backgroundImage: {
...coreConfig.theme.backgroundImage,
"search-hit": "url('/images/search-hit-light.svg')",
"search-hit-dark": "url('/images/search-hit.svg')",
"search-arrow": "url('/images/search-hit-arrow-light.svg')",
"search-arrow-dark": "url('/images/search-hit-arrow.svg')",
"search-no-result": "url('/images/search-no-result-light.svg')",
"search-no-result-dark": "url('/images/search-no-result.svg')",
"magnifying-glass": "url('/images/magnifying-glass.svg')",
"magnifying-glass-dark": "url('/images/magnifying-glass-dark.svg')",
},
},
}

View File

@@ -0,0 +1,19 @@
{
"extends": "tsconfig/nextjs.json",
"compilerOptions": {
"paths": {
"@/*": [
"./*"
]
},
"jsx": "preserve",
},
"include": [
"next-env.d.ts",
"**/*.tsx",
"**/*.ts",
"**/*.js",
".next/types/**/*.ts",
"**/*.mjs"
]
}

View File

@@ -0,0 +1,5 @@
import { getLinkWithBasePath } from "docs-ui"
export function basePathUrl(path = "") {
return getLinkWithBasePath(path, process.env.NEXT_PUBLIC_BASE_PATH)
}

View File

@@ -0,0 +1,7 @@
{
"framework": "nextjs",
"installCommand": "yarn install",
"buildCommand": "turbo run build",
"outputDirectory": ".next",
"ignoreCommand": "bash ../../ignore-build-script.sh"
}

View File

@@ -10,6 +10,7 @@ NEXT_PUBLIC_DOCS_URL=
NEXT_PUBLIC_USER_GUIDE_URL=
NEXT_PUBLIC_UI_URL=
NEXT_PUBLIC_API_URL=
NEXT_PUBLIC_CLOUD_URL=
NEXT_PUBLIC_DOCS_V1_URL=
ALGOLIA_WRITE_API_KEY=
ANALYZE_BUNDLE=

View File

@@ -8,25 +8,25 @@ export const metadata = {
Find guides to deploy your Medusa application, Medusa Admin, and Next.js Starter Storefront.
## Medusa Cloud
## Cloud
Medusa Cloud is our managed services offering for Medusa applications. Medusa Cloud hosts your server, Admin dashboard, database, and Redis instance. The infrastructure is security-compliant and optimized for Medusa and supports:
Cloud is our managed services offering for Medusa applications. Cloud hosts your server, Admin dashboard, database, and Redis instance. The infrastructure is security-compliant and optimized for Medusa and supports:
- Zero configuration.
- Built-in autoscaling.
- Deploy to regions around the world.
- 99.99% uptime guarantee.
With Medusa Cloud, you maintain full customization control as you deploy your own modules and customizations directly from GitHub:
With Cloud, you maintain full customization control as you deploy your own modules and customizations directly from GitHub:
- Push to deploy.
- Multiple testing environments.
- Preview environments for new PRs.
- Test on production-like data.
Medusa Cloud users also gets early access to new features (for example, Gift Cards and Draft Orders).
Cloud users also gets early access to new features (for example, Gift Cards and Draft Orders).
[Sign up and learn more about Medusa Cloud](https://medusajs.com/pricing/)
[Sign up and learn more about Cloud](https://medusajs.com/pricing/)
---

View File

@@ -31,7 +31,7 @@ In this tutorial, you'll learn how to implement a loyalty points system in Medus
<Note title="Looking for a straightforward implementation?">
Medusa Cloud provides a beta Store Credits feature that facilitates building a loyalty point system. [Get in touch](https://medusajs.com/contact) for early access.
Cloud provides a beta Store Credits feature that facilitates building a loyalty point system. [Get in touch](https://medusajs.com/contact) for early access.
</Note>

View File

@@ -13,7 +13,7 @@ The S3 File Module Provider integrates Amazon S3 and services following a compat
<Note title="Looking for managed storage?">
Medusa Cloud offers a managed file storage solution with AWS S3 for your Medusa application. Contact the [sales team](https://medusajs.com/pricing/) to learn more.
Cloud offers a managed file storage solution with AWS S3 for your Medusa application. Contact the [sales team](https://medusajs.com/pricing/) to learn more.
</Note>

View File

@@ -60,9 +60,9 @@ For example, you can integrate [Stripe](../../commerce-modules/payment/payment-p
## Deploy the Medusa Application
The most efficient way to deploy your Medusa application is to use [Medusa Cloud](https://medusajs.com/pricing). Medusa Cloud is our managed services offering that makes deploying and operating Medusa applications possible without having to worry about configuring, scaling, and maintaining infrastructure. Medusa Cloud hosts your server, Admin dashboard, database, and Redis instance.
The most efficient way to deploy your Medusa application is to use [Cloud](https://medusajs.com/pricing). Cloud is our managed services offering that makes deploying and operating Medusa applications possible without having to worry about configuring, scaling, and maintaining infrastructure. Cloud hosts your server, Admin dashboard, database, and Redis instance.
With Medusa Cloud, you maintain full customization control as you deploy your own modules and customizations directly from GitHub:
With Cloud, you maintain full customization control as you deploy your own modules and customizations directly from GitHub:
- Push to deploy.
- Multiple testing environments.
@@ -74,8 +74,8 @@ Our documentation also provides a step-by-step guides to deploy your Medusa appl
<CardList itemsPerRow={2} items={[
{
href: "https://medusajs.com/pricing",
title: "Sign up for Medusa Cloud",
text: "Learn more about Medusa Cloud and sign up to get started.",
title: "Sign up for Cloud",
text: "Learn more about Cloud and sign up to get started.",
icon: AcademicCapSolid,
},
{

View File

@@ -10,6 +10,7 @@ NEXT_PUBLIC_DOCS_URL=
NEXT_PUBLIC_RESOURCES_URL=
NEXT_PUBLIC_UI_URL=
NEXT_PUBLIC_API_URL=
NEXT_PUBLIC_CLOUD_URL=
ALGOLIA_WRITE_API_KEY=
ANALYZE_BUNDLE=
NEXT_PUBLIC_AI_ASSISTANT_URL=

View File

@@ -155,7 +155,21 @@ async function main() {
path.join(__dirname, "..", "..", "..", "..", "apps", "user-guide", "app")
)
await scanDirectory(
path.join(__dirname, "..", "..", "..", "..", "apps", "ui", "src", "content", "docs")
path.join(
__dirname,
"..",
"..",
"..",
"..",
"apps",
"ui",
"src",
"content",
"docs"
)
)
await scanDirectory(
path.join(__dirname, "..", "..", "..", "..", "apps", "cloud", "app")
)
}

View File

@@ -20,6 +20,8 @@ swap:
"Next.js starter storefront": "Next.js Starter Storefront"
"Next.js storefront": "Next.js Starter Storefront"
"Next.js Storefront": "Next.js Starter Storefront"
"Medusa Cloud": "Cloud"
" cloud ": " Cloud "
exceptions:
- 'storefront framework'
- 'Storefront Framework'

View File

@@ -7009,6 +7009,43 @@ __metadata:
languageName: node
linkType: hard
"cloud@workspace:apps/cloud":
version: 0.0.0-use.local
resolution: "cloud@workspace:apps/cloud"
dependencies:
"@mdx-js/loader": ^3.1.0
"@mdx-js/react": ^3.1.0
"@medusajs/icons": 2.8.4
"@next/mdx": 15.0.4
"@stefanprobst/rehype-extract-toc": ^3.0.0
"@types/mdx": ^2.0.13
"@types/node": ^20
"@types/react": "npm:types-react@rc"
"@types/react-dom": "npm:types-react@rc"
autoprefixer: ^10.0.1
build-scripts: "*"
clsx: ^2.1.0
docs-ui: "*"
eslint: ^9.13.0
eslint-plugin-prettier: ^5.2.1
eslint-plugin-react-hooks: ^5.0.0
next: 15.0.4
postcss: ^8
react: rc
react-dom: rc
rehype-mdx-code-props: ^2.0.0
rehype-slug: ^6.0.0
remark-directive: ^3.0.0
remark-frontmatter: ^5.0.0
remark-rehype-plugins: "*"
tailwind: "*"
tailwindcss: ^3.3.0
tsconfig: "*"
types: "*"
typescript: ^5
languageName: unknown
linkType: soft
"clsx@npm:2.0.0":
version: 2.0.0
resolution: "clsx@npm:2.0.0"