Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 11 additions & 26 deletions apps/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,41 +1,26 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
# deps
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage
# generated content
.source

# next.js
# test & build
/coverage
/.next/
/out/

# production
/build
*.tsbuildinfo

# misc
.DS_Store
*.pem

# debug
/.pnp
.pnp.js
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*

# vercel
# others
.env*.local
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
next-env.d.ts
43 changes: 26 additions & 17 deletions apps/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,45 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
# docs

## Getting Started
This is a Next.js application generated with
[Create Fumadocs](https://github.com/fuma-nama/fumadocs).

First, run the development server:
Run development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
Open 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.
## Explore

This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
In the project, you can see:

## Learn More
- `lib/source.ts`: Code for content source adapter, [`loader()`](https://fumadocs.dev/docs/headless/source-api) provides the interface to access your content.
- `lib/layout.shared.tsx`: Shared options for layouts, optional but preferred to keep.

To learn more about Next.js, take a look at the following resources:
| Route | Description |
| ------------------------- | ------------------------------------------------------ |
| `app/(home)` | The route group for your landing page and other pages. |
| `app/docs` | The documentation layout and pages. |
| `app/api/search/route.ts` | The Route Handler for search. |

- [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.
### Fumadocs MDX

A `source.config.ts` config file has been included, you can customise different options like frontmatter schema.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
Read the [Introduction](https://fumadocs.dev/docs/mdx) for further details.

## Deploy on Vercel
## Learn More

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.
To learn more about Next.js and Fumadocs, take a look at the following
resources:

Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
- [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.
- [Fumadocs](https://fumadocs.dev) - learn about Fumadocs
24 changes: 24 additions & 0 deletions apps/docs/content/docs/core-features.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Introduction to Core Features
description: Core features of Superset
---

## Core Features

Superset has a few core features that are worth knowing about.

### Workspace Management

Superset allows you to manage your workspaces in a way that is easy to understand and use.

### Terminal Integration

Superset allows you to integrate your terminal into your workspace.

### Team Collaboration

Superset allows you to collaborate with your team.

### How It Works

Superset works by sitting on top of your existing git workflow and enhancing it with a visual interface and productivity tools. It doesn't replace git—it makes it easier to use.
10 changes: 10 additions & 0 deletions apps/docs/content/docs/guides.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Guides
description: In-depth guides for using Superset
---

## Guides

This section contains detailed guides for using Superset effectively.

More guides coming soon!
29 changes: 29 additions & 0 deletions apps/docs/content/docs/installation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: Installation
description: Install Superset on your machine
---

## Download for macOS

Get started by downloading Superset for Apple Silicon:

<DownloadButton />

## Other Platforms

### Windows & Linux

Windows and Linux support is coming soon. Join our waitlist to be notified when it's available.

### Build from Source

You can also build Superset from source on any platform:

```bash
git clone https://github.com/superset-sh/superset.git
cd superset
bun install
bun run build
```

See our [GitHub repository](https://github.com/superset-sh/superset) for more details.
13 changes: 13 additions & 0 deletions apps/docs/content/docs/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"title": "Documentation",
"pages": [
"---Get Started---",
"quick-start",
"overview",
"installation",
"---Core Features---",
"core-features",
"---How to Guides---",
"guides"
]
}
59 changes: 59 additions & 0 deletions apps/docs/content/docs/overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
title: Overview
description: Learn what Superset is and how it works
---

## What is Superset?

Superset is a desktop application that helps developers work more efficiently with their codebase. It combines workspace management, terminal integration, and team collaboration into a single unified experience.

## Key Features

### Workspace Management

Organize your projects using git worktrees. Superset makes it easy to:

- Create and manage multiple worktrees for the same repository
- Switch between branches without stashing changes
- Keep your work organized across features and fixes

### Terminal Integration

Built-in terminal with powerful session management:

- Multiple terminal sessions per workspace
- Persistent sessions that survive restarts
- Quick access to common commands

### Team Collaboration

Work together with your team seamlessly:

- Share workspaces with team members
- Sync configurations across devices
- Manage team permissions and access

## How It Works

Superset sits on top of your existing git workflow and enhances it with a visual interface and productivity tools. It doesn't replace git—it makes it easier to use.

### Git Worktrees

Instead of switching branches in a single directory, Superset uses git worktrees to give each branch its own directory. This means:

- No more stashing uncommitted changes
- Run multiple branches simultaneously
- Keep your IDE state intact when switching contexts

### Local-First Architecture

Your data stays on your machine. Superset works offline and syncs when you're connected.

## Tech Stack

Superset is built with modern technologies:

- **Electron** - Cross-platform desktop framework
- **React** - UI components with TypeScript
- **SQLite** - Local database for fast queries
- **Git** - Version control integration
22 changes: 22 additions & 0 deletions apps/docs/content/docs/quick-start.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Quick Start
description: Get up and running with Superset in minutes
---

## Quick Start

Get started with Superset in just a few steps:

1. **Download Superset** - Get the app for your platform
2. **Sign in** - Create an account or sign in
3. **Create a workspace** - Set up your first project
4. **Start working** - You're ready to go!

<DownloadButton />

## Next Steps

<Cards>
<Card title="Overview" href="/docs/overview" />
<Card title="Installation" href="/docs/installation" />
</Cards>
5 changes: 0 additions & 5 deletions apps/docs/mdx-components.tsx

This file was deleted.

54 changes: 54 additions & 0 deletions apps/docs/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { withSentryConfig } from "@sentry/nextjs";
import { createMDX } from "fumadocs-mdx/next";

const withMDX = createMDX();

/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: true,
async redirects() {
return [
{
source: "/",
destination: "/docs/quick-start",
permanent: false,
},
{
source: "/docs",
destination: "/docs/quick-start",
permanent: false,
},
];
},
async rewrites() {
return [
// Fumadocs MDX rewrites
{
source: "/docs/:path*.mdx",
destination: "/llms.mdx/docs/:path*",
},
Comment on lines +25 to +29
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

fumadocs llms.txt LLM text configuration nextjs rewrite

💡 Result:

Yes — Fumadocs already includes patterns for producing an LLM-friendly llms.txt (and per-page .mdx endpoints) and shows how to wire Next.js rewrites to expose them.

Quick steps (minimal):

  1. Create a getLLMText helper that returns page content (uses page.data.getText('processed')). See Fumadocs example. [1]

  2. Expose a site-wide llms file route (cached, returns joined pages) — e.g. app/llms-full.txt/route.ts that collects source.getPages().map(getLLMText) and returns a Response. This produces /llms-full.txt for AI crawlers. [1]

  3. Expose per-page Markdown via a dynamic route (app/llms.mdx/[[...slug]]/route.ts) that returns getLLMText(page) with Content-Type: text/markdown and generateStaticParams. [1]

  4. Add Next.js rewrites so clean URLs map to those handlers. Example next.config.ts rewrites:

    • map /docs/:path*.mdx -> /llms.mdx/:path* (so requests for /docs/whatever.mdx hit your mdx route)
    • if you serve llms.txt from an API route, add rewrite /llms.txt -> /api/llms.txt; alternatively write static public/llms.txt. [1][2][3]

Example rewrite snippet:
async rewrites() {
return [
{ source: '/docs/:path*.mdx', destination: '/llms.mdx/:path*' },
{ source: '/llms.txt', destination: '/api/llms.txt' }, // or public/llms.txt
];
}
(place in next.config.ts). [1][3]

  1. (Optional) Use Accept header negotiation / a proxy to serve Markdown to AI agents (fumadocs-core/negotiation helper + proxy middleware). [1]

References:

  • Fumadocs AI & LLM docs (getLLMText, llms-full.txt, llms.mdx, rewrites, Accept negotiation). [1]
  • Guidance on exposing llms.txt in Next.js (API route vs public file + rewrite example). [3]

If you want, I can: generate the exact route files + getLLMText code for your Fumadocs project (Next.js App Router) or produce a ready-to-drop next.config.ts — which would you prefer?


Fix the MDX rewrite destination path to match fumadocs' recommended pattern.

The destination /llms.mdx/docs/:path* includes an extra /docs/ segment. According to fumadocs documentation, this rewrite should map to /llms.mdx/:path* instead, so the route handler at app/llms.mdx/[[...slug]]/route.ts can properly serve the LLM text content.

{
  source: "/docs/:path*.mdx",
  destination: "/llms.mdx/:path*",
},
🤖 Prompt for AI Agents
In `@apps/docs/next.config.mjs` around lines 25 - 29, Update the MDX rewrite
object so its destination removes the extra "/docs/" segment: leave source as
"/docs/:path*.mdx" and change destination from "/llms.mdx/docs/:path*" to
"/llms.mdx/:path*" so the route handler that serves LLM MDX content can match
correctly.

// PostHog rewrites
{
source: "/ingest/static/:path*",
destination: "https://us-assets.i.posthog.com/static/:path*",
},
{
source: "/ingest/:path*",
destination: "https://us.i.posthog.com/:path*",
},
{
source: "/ingest/decide",
destination: "https://us.i.posthog.com/decide",
},
];
Comment on lines +31 to +43
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Rewrite ordering may cause /ingest/decide to be unreachable.

The /ingest/:path* rewrite on line 36 will match /ingest/decide before the more specific rule on line 40 is evaluated. Next.js rewrites are processed in order, and the first match wins.

Consider reordering to place more specific routes first:

♻️ Suggested reorder
 			// PostHog rewrites
 			{
 				source: "/ingest/static/:path*",
 				destination: "https://us-assets.i.posthog.com/static/:path*",
 			},
+			{
+				source: "/ingest/decide",
+				destination: "https://us.i.posthog.com/decide",
+			},
 			{
 				source: "/ingest/:path*",
 				destination: "https://us.i.posthog.com/:path*",
 			},
-			{
-				source: "/ingest/decide",
-				destination: "https://us.i.posthog.com/decide",
-			},
🤖 Prompt for AI Agents
In `@apps/docs/next.config.mjs` around lines 31 - 43, The rewrite ordering causes
the wildcard rule "/ingest/:path*" to shadow the specific "/ingest/decide" rule;
fix by reordering the array of rewrite objects so the specific route object with
source "/ingest/decide" and destination "https://us.i.posthog.com/decide"
appears before the wildcard object with source "/ingest/:path*" (leave the
"/ingest/static/:path*" mapping as appropriate).

},
skipTrailingSlashRedirect: true,
};

export default withSentryConfig(withMDX(config), {
org: "superset-sh",
project: "docs",
silent: !process.env.CI,
widenClientFileUpload: true,
tunnelRoute: "/monitoring",
});
55 changes: 0 additions & 55 deletions apps/docs/next.config.ts

This file was deleted.

Loading