Skip to content

feat: add Nextra docs project in apps/docs with self-hosting content#28267

Open
PeerRich wants to merge 25 commits intomainfrom
devin/1772632312-nextra-docs
Open

feat: add Nextra docs project in apps/docs with self-hosting content#28267
PeerRich wants to merge 25 commits intomainfrom
devin/1772632312-nextra-docs

Conversation

@PeerRich
Copy link
Member

@PeerRich PeerRich commented Mar 4, 2026

What does this PR do?

Adds a new Nextra v4 documentation project in apps/docs/ with all self-hosting content extracted from cal.com/docs/self-hosting/installation and its subpages. The documentation structure mirrors the original:

  • Getting Started: Installation, Database Migrations, Upgrading, SSO Setup, Docker, License Key
  • Deployments: AWS, Azure, Elestio, GCP, Northflank, Railway, Render, Vercel
  • Apps / Install Apps: Google, Microsoft, Zoom, Daily, HubSpot, Sendgrid, Stripe, Twilio, Zoho
  • Guides: White Labeling (3 pages), Sponsorship, Organizations (3 pages)

Key files:

  • apps/docs/package.json – Nextra + Next.js 15 + React 19 dependencies
  • apps/docs/next.config.mjs – Nextra plugin config
  • apps/docs/app/layout.tsx – Root layout with Navbar (SVG logo with dark mode support), Footer, page map, and custom fonts
  • apps/docs/app/logo.css – Dark mode logo toggle CSS (uses html.dark selector from Nextra's theme)
  • apps/docs/app/fonts.css – Applies Cal Sans to headlines and Cal Sans UI to body text via CSS custom properties
  • apps/docs/fonts/ – Cal Sans (SemiBold) for headlines + Cal Sans UI (Light/Regular/Medium/SemiBold/Bold) for body text, loaded via next/font/local
  • apps/docs/app/[[...mdxPath]]/page.tsx – Catch-all route for Nextra v4 App Router MDX rendering
  • apps/docs/mdx-components.ts – Exports useMDXComponents from nextra-theme-docs (provides sidebar/TOC wrapper)
  • apps/docs/public/cal-docs-logo.svg – Light mode navbar logo (dark text)
  • apps/docs/public/cal-docs-logo-white.svg – Dark mode navbar logo (white text)
  • apps/docs/content/_meta.ts – Root sidebar navigation with separators
  • apps/docs/content/**/*.mdx – 30+ MDX content pages
  • apps/docs/content/**/_meta.ts – Nested navigation definitions

Updates since initial PR

  • Fixed biome lint warnings in layout.tsx (explicit type annotations)
  • Fixed typo in color-tokens.mdx: "peaks your interest" → "piques your interest"
  • Added app/[[...mdxPath]]/page.tsx catch-all route required by Nextra v4 to render MDX content from the content/ directory
  • Updated mdx-components.ts to import from nextra-theme-docs instead of nextra/mdx-components — the theme's version includes the wrapper component that provides the sidebar and table of contents
  • Added next-env.d.ts and updated tsconfig.json to include .next/types
  • Replaced hardcoded "Cal.com Docs" text with SVG logo — uses cal-docs-logo.svg for light mode and cal-docs-logo-white.svg for dark mode, toggled via plain CSS in logo.css (Tailwind dark: utilities are not available since the docs app doesn't have Tailwind configured)
  • Added Cal Sans + Cal Sans UI fonts — headlines (h1–h6) use Cal Sans SemiBold via --font-cal, body text uses Cal Sans UI (5 weights: 300–700) via --font-cal-ui. Both loaded with next/font/local for optimal performance. Cal Sans UI font files sourced from calcom/sans-ui.

Visual Demo

Homepage with Cal Sans headlines and Cal Sans UI body text (light mode):

Homepage with fonts

Navbar logo — light mode:

Light mode logo

Navbar logo — dark mode:

Dark mode logo

Installation page with code blocks and TOC:

Installation

Docker page:

Docker

GCP deployment page (nested navigation):

GCP

Color Tokens guide (confirmed typo fix — "piques"):

Color Tokens

⚠️ Items for reviewer

  1. Dependency versions: This adds next@^15.1.0, react@^19.0.0, nextra@^4.2.0 — verify these don't conflict with the existing monorepo workspace versions.
  2. No lockfile update: yarn install was not run in the monorepo after adding this workspace, so yarn.lock is not updated. You'll need to run yarn at the root before testing locally.
  3. Content accuracy: Documentation was extracted programmatically from cal.com/docs. Please spot-check a few pages against the originals for completeness/accuracy.
  4. Internal links: MDX files use relative paths like /apps/install-apps/google — these should be verified against Nextra's routing behavior. The E2E testing link in installation.mdx (/docs/developing/local-development#e2e-testing) points to a page that doesn't exist in this docs project.
  5. GCP docs inconsistency: In gcp.mdx, the Docker pull command uses cal/calcom but the run command uses cal/cal.com — these should match. Also, the "Access Cal.com" step references http://localhost instead of the VM's external IP.
  6. mdx-components.ts imports from nextra-theme-docs: The standard Nextra docs suggest importing from nextra/mdx-components, but we import from nextra-theme-docs to get the wrapper component that provides sidebar + TOC. This is intentional and correct for the docs theme.
  7. Logo dark mode implementation: The logo uses plain CSS (logo.css) instead of Tailwind utilities because the docs app doesn't have Tailwind configured. The CSS relies on Nextra adding a .dark class to the html element — if Nextra changes this behavior in future versions, the dark mode toggle would break. Using plain <img> tags instead of Next.js Image component (biome lint warning noImgElement was noted but not fixed).
  8. Font CSS specificity: The fonts.css file applies font-family directly to body and all heading tags (h1–h6), which overrides Nextra's default typography. This might conflict with Nextra's built-in styles if they apply fonts with higher specificity. Verify font rendering in different Nextra theme contexts (e.g., code blocks, tables, callouts).
  9. Cal Sans UI font weights: All 5 weights (300, 400, 500, 600, 700) are included. Verify these are all actually used in the docs — if not, consider removing unused weights to reduce bundle size.

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox. N/A — this PR is the docs.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  1. Run yarn at monorepo root to install new workspace dependencies
  2. Run yarn workspace @calcom/docs dev to start the Nextra dev server
  3. Verify SVG logo appears in navbar (not "Cal.com Docs" text)
  4. Test dark mode toggle — verify white logo variant appears in dark mode, dark logo variant appears in light mode
  5. Verify fonts render correctly — headlines should use Cal Sans (distinctive display font), body text should use Cal Sans UI
  6. Verify sidebar navigation matches the original cal.com/docs structure
  7. Spot-check several content pages (Installation, Docker, Google integration, SSO Setup) against the originals
  8. Verify internal links between pages work correctly
  9. Test that the "Edit this page" link points to the correct repository URL
  10. Verify that the sidebar, table of contents, and page navigation all render properly

Checklist

  • My code follows the style guidelines of this project
  • I haven't checked if my changes generate no new warnings (biome lint warning about noImgElement in layout.tsx)
  • My PR is large (54 files, ~1900 lines) due to content migration + font files but is a single coherent feature

Link to Devin Session: https://app.devin.ai/sessions/66515819d80d417b8e451b38e4d5e3ca
Requested by: @PeerRich

devin-ai-integration bot and others added 2 commits March 4, 2026 14:01
Co-Authored-By: peer@cal.com <peer@cal.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 issues found across 45 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/docs/content/deployments/gcp.mdx">

<violation number="1" location="apps/docs/content/deployments/gcp.mdx:93">
P2: The Docker image name in the run command doesn’t match the image pulled above, so the container won’t start when users follow these steps.</violation>

<violation number="2" location="apps/docs/content/deployments/gcp.mdx:100">
P2: `http://localhost` points to the user’s machine, not the GCP VM. Use the VM’s external IP so the access step works.</violation>
</file>

<file name="apps/docs/app/layout.tsx">

<violation number="1" location="apps/docs/app/layout.tsx:9">
P2: Hardcoded navbar label should use the localization helper (t()) rather than embedding the text directly so it can be translated.</violation>
</file>

<file name="apps/docs/content/guides/white-labeling/color-tokens.mdx">

<violation number="1" location="apps/docs/content/guides/white-labeling/color-tokens.mdx:45">
P3: Typo in documentation: "peaks your interest" should be "piques your interest".</violation>
</file>

<file name="apps/docs/content/docker.mdx">

<violation number="1" location="apps/docs/content/docker.mdx:105">
P1: Avoid recommending `NODE_TLS_REJECT_UNAUTHORIZED=0`; it disables TLS verification globally and can lead to insecure deployments. Suggest configuring proper certificates (or `NODE_EXTRA_CA_CERTS`) instead.</violation>

<violation number="2" location="apps/docs/content/docker.mdx:109">
P2: `NEXTAUTH_URL` should be the canonical site URL (no `/api/auth`) unless you’re using a custom base path. The current value is misleading and can misconfigure NextAuth callbacks.</violation>
</file>

<file name="apps/docs/content/installation.mdx">

<violation number="1" location="apps/docs/content/installation.mdx:63">
P2: The E2E testing link points to `/docs/developing/local-development`, but there is no corresponding page in `apps/docs/content`, so this link will be broken in the new docs site. Update the link to an existing page or add the missing doc.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

## Troubleshooting

- **Failed to commit changes: Invalid 'prisma.user.create()'**: Certain versions may have trouble creating a user if the field `metadata` is empty. Using an empty json object `{}` as the field value should resolve this issue. Also, the `id` field will autoincrement, so you may also try leaving the value of `id` as empty.
- **SSL edge termination**: If running behind a load balancer which handles SSL certificates, you will need to add the environmental variable `NODE_TLS_REJECT_UNAUTHORIZED=0` to prevent requests from being rejected. Only do this if you know what you are doing and trust the services/load-balancers directing traffic to your service.
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Avoid recommending NODE_TLS_REJECT_UNAUTHORIZED=0; it disables TLS verification globally and can lead to insecure deployments. Suggest configuring proper certificates (or NODE_EXTRA_CA_CERTS) instead.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/docs/content/docker.mdx, line 105:

<comment>Avoid recommending `NODE_TLS_REJECT_UNAUTHORIZED=0`; it disables TLS verification globally and can lead to insecure deployments. Suggest configuring proper certificates (or `NODE_EXTRA_CA_CERTS`) instead.</comment>

<file context>
@@ -0,0 +1,114 @@
+## Troubleshooting
+
+- **Failed to commit changes: Invalid 'prisma.user.create()'**: Certain versions may have trouble creating a user if the field `metadata` is empty. Using an empty json object `{}` as the field value should resolve this issue. Also, the `id` field will autoincrement, so you may also try leaving the value of `id` as empty.
+- **SSL edge termination**: If running behind a load balancer which handles SSL certificates, you will need to add the environmental variable `NODE_TLS_REJECT_UNAUTHORIZED=0` to prevent requests from being rejected. Only do this if you know what you are doing and trust the services/load-balancers directing traffic to your service.
+
+### CLIENT_FETCH_ERROR
</file context>
Suggested change
- **SSL edge termination**: If running behind a load balancer which handles SSL certificates, you will need to add the environmental variable `NODE_TLS_REJECT_UNAUTHORIZED=0` to prevent requests from being rejected. Only do this if you know what you are doing and trust the services/load-balancers directing traffic to your service.
- **SSL edge termination**: If running behind a load balancer which handles SSL certificates, configure the container to trust the load balancer’s certificate chain (for example via system trust store or `NODE_EXTRA_CA_CERTS`) rather than disabling TLS verification.
Fix with Cubic


#### Access Cal.com

Open a web browser and navigate to `http://localhost`. You should now be able to access the Cal.com homepage.
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: http://localhost points to the user’s machine, not the GCP VM. Use the VM’s external IP so the access step works.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/docs/content/deployments/gcp.mdx, line 100:

<comment>`http://localhost` points to the user’s machine, not the GCP VM. Use the VM’s external IP so the access step works.</comment>

<file context>
@@ -0,0 +1,102 @@
+
+#### Access Cal.com
+
+Open a web browser and navigate to `http://localhost`. You should now be able to access the Cal.com homepage.
+
+Congratulations! You have successfully deployed Cal.com on Google Cloud Platform.
</file context>
Fix with Cubic

Run the Docker container using the following command:

```bash
docker run -d -p 80:80 cal/cal.com
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The Docker image name in the run command doesn’t match the image pulled above, so the container won’t start when users follow these steps.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/docs/content/deployments/gcp.mdx, line 93:

<comment>The Docker image name in the run command doesn’t match the image pulled above, so the container won’t start when users follow these steps.</comment>

<file context>
@@ -0,0 +1,102 @@
+Run the Docker container using the following command:
+
+```bash
+docker run -d -p 80:80 cal/cal.com
+```
+
</file context>
Fix with Cubic


### CLIENT_FETCH_ERROR

If you experience this error, it may be the way the default Auth callback in the server is using the WEBAPP_URL as a base url. The container does not necessarily have access to the same DNS as your local machine, and therefore needs to be configured to resolve to itself. You may be able to correct this by configuring `NEXTAUTH_URL=http://localhost:3000/api/auth`, to help the backend loop back to itself.
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: NEXTAUTH_URL should be the canonical site URL (no /api/auth) unless you’re using a custom base path. The current value is misleading and can misconfigure NextAuth callbacks.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/docs/content/docker.mdx, line 109:

<comment>`NEXTAUTH_URL` should be the canonical site URL (no `/api/auth`) unless you’re using a custom base path. The current value is misleading and can misconfigure NextAuth callbacks.</comment>

<file context>
@@ -0,0 +1,114 @@
+
+### CLIENT_FETCH_ERROR
+
+If you experience this error, it may be the way the default Auth callback in the server is using the WEBAPP_URL as a base url. The container does not necessarily have access to the same DNS as your local machine, and therefore needs to be configured to resolve to itself. You may be able to correct this by configuring `NEXTAUTH_URL=http://localhost:3000/api/auth`, to help the backend loop back to itself.
+
+```
</file context>
Fix with Cubic


#### Production Build

For a production build, **please make sure** to set up [E2E testing](/docs/developing/local-development#e2e-testing) and [Upgrading](/upgrading) the database from earlier version, and the proceed to build as follows:
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The E2E testing link points to /docs/developing/local-development, but there is no corresponding page in apps/docs/content, so this link will be broken in the new docs site. Update the link to an existing page or add the missing doc.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/docs/content/installation.mdx, line 63:

<comment>The E2E testing link points to `/docs/developing/local-development`, but there is no corresponding page in `apps/docs/content`, so this link will be broken in the new docs site. Update the link to an existing page or add the missing doc.</comment>

<file context>
@@ -0,0 +1,142 @@
+
+#### Production Build
+
+For a production build, **please make sure** to set up [E2E testing](/docs/developing/local-development#e2e-testing) and [Upgrading](/upgrading) the database from earlier version, and the proceed to build as follows:
+
+```bash
</file context>
Fix with Cubic

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Devin AI is addressing Cubic AI's review feedback

New feedback has been sent to the existing Devin session.

View Devin Session


✅ Pushed commit 6da4188

Co-Authored-By: peer@cal.com <peer@cal.com>
- Add app/[[...mdxPath]]/page.tsx catch-all route required by Nextra v4
- Update mdx-components.ts to import from nextra-theme-docs (provides wrapper with sidebar/TOC)
- Update tsconfig.json to include .next/types for proper type checking
- Add next-env.d.ts generated by Next.js

Co-Authored-By: peer@cal.com <peer@cal.com>
devin-ai-integration bot and others added 5 commits March 8, 2026 16:16
Co-Authored-By: peer@cal.com <peer@cal.com>
…xt/font/local

Co-Authored-By: peer@cal.com <peer@cal.com>
…SemiBold

Co-Authored-By: peer@cal.com <peer@cal.com>
Co-Authored-By: peer@cal.com <peer@cal.com>
@PeerRich PeerRich marked this pull request as ready for review March 8, 2026 17:07
@PeerRich PeerRich requested a review from a team as a code owner March 8, 2026 17:07
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/docs/content/index.mdx">

<violation number="1" location="apps/docs/content/index.mdx:49">
P3: Fix the typo in this user-facing docs sentence (`commerical` → `commercial`).</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Like any diy project, Cal.com, Inc. does not guarantee security and safety of the open source project. Cal.diy is
community maintained and strictly recommended for personal, non-production use. Please use at your own risk.

For any commerical usage, please visit Cal.com or request enterprise access to our on-prem hosting: https://cal.com/sales.
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: Fix the typo in this user-facing docs sentence (commericalcommercial).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/docs/content/index.mdx, line 49:

<comment>Fix the typo in this user-facing docs sentence (`commerical` → `commercial`).</comment>

<file context>
@@ -38,3 +38,28 @@ Deploy Cal.com on your preferred platform:
+Like any diy project, Cal.com, Inc. does not guarantee security and safety of the open source project. Cal.diy is
+community maintained and strictly recommended for personal, non-production use. Please use at your own risk.
+
+For any commerical usage, please visit Cal.com or request enterprise access to our on-prem hosting: https://cal.com/sales.
+
+Find all differences in features below:
</file context>
Suggested change
For any commerical usage, please visit Cal.com or request enterprise access to our on-prem hosting: https://cal.com/sales.
For any commercial usage, please visit Cal.com or request enterprise access to our on-prem hosting: https://cal.com/sales.
Fix with Cubic

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Devin AI is addressing Cubic AI's review feedback

New feedback has been sent to the existing Devin session.

View Devin Session


✅ No changes pushed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant