diff --git a/.github/workflows/sync-type.yaml b/.github/workflows/sync-type.yaml
index 22c89d8..61e6cdf 100644
--- a/.github/workflows/sync-type.yaml
+++ b/.github/workflows/sync-type.yaml
@@ -9,12 +9,10 @@ on:
- main
jobs:
-
update:
-
runs-on: ubuntu-latest
- permissions: # Job-level permissions configuration starts here
- contents: write # 'write' access to repository contents
+ permissions: # Job-level permissions configuration starts here
+ contents: write # 'write' access to repository contents
steps:
- name: Checkout
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000..8df9bc4
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,20 @@
+# Deep Directories
+**/dist
+**/smoke
+**/node_modules
+**/fixtures
+**/vendor
+**/.vercel
+
+# Files
+pnpm-lock.yaml
+
+# Formatted by Biome
+**/*.json
+**/*.js
+**/*.ts
+**/*.tsx
+**/*.jsx
+**/*.mjs
+**/*.cjs
+**/*.css
diff --git a/app/(home)/layout.tsx b/app/(home)/layout.tsx
index ff8f0d5..957c006 100644
--- a/app/(home)/layout.tsx
+++ b/app/(home)/layout.tsx
@@ -3,5 +3,5 @@ import type { ReactNode } from "react";
import { layoutOptions } from "../layout-options";
export default function HomeLayout({ children }: { children: ReactNode }) {
- return {children};
+ return {children};
}
diff --git a/app/(home)/page.tsx b/app/(home)/page.tsx
index 6ea3121..fbfa047 100644
--- a/app/(home)/page.tsx
+++ b/app/(home)/page.tsx
@@ -1,12 +1,13 @@
-import landing from "@/app/_images/landing.gif"
+import landing from "@/app/_images/landing.gif";
import Image from "next/image";
export default function HomePage() {
- return (
-
- Stardust, the container streaming platform
- Stardust is a container streaming platform that allows you to stream your containers to any device, anywhere.
-
-
-
- );
+ return (
+
+ Stardust, the container streaming platform
+
+ Stardust is a container streaming platform that allows you to stream your containers to any device, anywhere.
+
+
+
+ );
}
diff --git a/app/api/og/route.tsx b/app/api/og/route.tsx
index da244a1..8d2f2bf 100644
--- a/app/api/og/route.tsx
+++ b/app/api/og/route.tsx
@@ -4,35 +4,33 @@ import type { NextRequest } from "next/server";
export const runtime = "edge";
export async function GET(request: NextRequest) {
- const title = request.nextUrl.searchParams.get("title");
- const description = request.nextUrl.searchParams.get("description");
- const inter = fetch(new URL("./inter.woff", import.meta.url)).then((res) =>
- res.arrayBuffer(),
- );
- return new ImageResponse(
-
- {/* eslint-disable-next-line @next/next/no-img-element */}
-
-
{title}
-
{description}
-
,
- {
- width: 1200,
- height: 630,
- fonts: [{ name: "Inter", data: await inter, weight: 300 }],
- },
- );
+ const title = request.nextUrl.searchParams.get("title");
+ const description = request.nextUrl.searchParams.get("description");
+ const inter = fetch(new URL("./inter.woff", import.meta.url)).then((res) => res.arrayBuffer());
+ return new ImageResponse(
+
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+
+
{title}
+
{description}
+
,
+ {
+ width: 1200,
+ height: 630,
+ fonts: [{ name: "Inter", data: await inter, weight: 300 }],
+ },
+ );
}
diff --git a/app/api/search/route.ts b/app/api/search/route.ts
index 74983f9..130ea9e 100644
--- a/app/api/search/route.ts
+++ b/app/api/search/route.ts
@@ -1,11 +1,11 @@
-import { getPages } from '@/app/source';
-import { createSearchAPI } from 'fumadocs-core/search/server';
+import { getPages } from "@/app/source";
+import { createSearchAPI } from "fumadocs-core/search/server";
-export const { GET } = createSearchAPI('advanced', {
- indexes: getPages().map((page) => ({
- title: page.data.title,
- structuredData: page.data.exports.structuredData,
- id: page.url,
- url: page.url,
- })),
+export const { GET } = createSearchAPI("advanced", {
+ indexes: getPages().map((page) => ({
+ title: page.data.title,
+ structuredData: page.data.exports.structuredData,
+ id: page.url,
+ url: page.url,
+ })),
});
diff --git a/app/docs/[[...slug]]/page.tsx b/app/docs/[[...slug]]/page.tsx
index e2b9e45..71b53a4 100644
--- a/app/docs/[[...slug]]/page.tsx
+++ b/app/docs/[[...slug]]/page.tsx
@@ -1,84 +1,84 @@
import { getPage, getPages } from "@/app/source";
-import type { Metadata } from "next";
-import { DocsPage, DocsBody } from "fumadocs-ui/page";
import { Card, Cards } from "fumadocs-ui/components/card";
-import { notFound } from "next/navigation";
+import { ImageZoom } from "fumadocs-ui/components/image-zoom";
+import { DocsBody, DocsPage } from "fumadocs-ui/page";
import { ExternalLinkIcon } from "lucide-react";
-import {ImageZoom} from "fumadocs-ui/components/image-zoom";
+import type { Metadata } from "next";
+import { notFound } from "next/navigation";
import React from "react";
export default async function Page({
- params,
+ params,
}: {
- params: { slug?: string[] };
+ params: { slug?: string[] };
}) {
- const page = getPage(params.slug);
+ const page = getPage(params.slug);
- if (page == null) {
- notFound();
- }
+ if (page == null) {
+ notFound();
+ }
- const MDX = page.data.exports.default;
- const path = `content/docs/${page.file.path}`;
+ const MDX = page.data.exports.default;
+ const path = `content/docs/${page.file.path}`;
- return (
-
- Edit on GitHub
-
- ),
- }}
- >
-
- {page.data.title}
- ,
- Cards: (props) => ,
- // @ts-expect-error
- img: (props) => ,
- }}
- />
-
-
- );
+ return (
+
+ Edit on GitHub
+
+ ),
+ }}
+ >
+
+ {page.data.title}
+ ,
+ Cards: (props) => ,
+ // @ts-expect-error
+ img: (props) => ,
+ }}
+ />
+
+
+ );
}
export async function generateStaticParams() {
- return getPages().map((page) => ({
- slug: page.slugs,
- }));
+ return getPages().map((page) => ({
+ slug: page.slugs,
+ }));
}
export function generateMetadata({ params }: { params: { slug?: string[] } }) {
- const page = getPage(params.slug);
+ const page = getPage(params.slug);
- if (page == null) notFound();
- const imageParams = new URLSearchParams();
- const description = page.data.description ?? "";
- imageParams.set("title", page.data.title);
- imageParams.set("description", description);
+ if (page == null) notFound();
+ const imageParams = new URLSearchParams();
+ const description = page.data.description ?? "";
+ imageParams.set("title", page.data.title);
+ imageParams.set("description", description);
- const image = {
- alt: "Banner",
- url: `/api/og?${imageParams.toString()}`,
- width: 1200,
- height: 630,
- };
- return {
- title: page.data.title,
- description: page.data.description,
- openGraph: {
- url: `/docs/${page.slugs.join("/")}`,
- images: image,
- },
- } satisfies Metadata;
+ const image = {
+ alt: "Banner",
+ url: `/api/og?${imageParams.toString()}`,
+ width: 1200,
+ height: 630,
+ };
+ return {
+ title: page.data.title,
+ description: page.data.description,
+ openGraph: {
+ url: `/docs/${page.slugs.join("/")}`,
+ images: image,
+ },
+ } satisfies Metadata;
}
diff --git a/app/docs/layout.tsx b/app/docs/layout.tsx
index 940530e..7ada1a9 100644
--- a/app/docs/layout.tsx
+++ b/app/docs/layout.tsx
@@ -1,7 +1,7 @@
import { DocsLayout } from "fumadocs-ui/layout";
-import { layoutOptions } from "../layout-options";
import type { ReactNode } from "react";
+import { layoutOptions } from "../layout-options";
export default function RootDocsLayout({ children }: { children: ReactNode }) {
- return {children};
+ return {children};
}
diff --git a/app/layout-options.tsx b/app/layout-options.tsx
index cd9e56e..2ae0141 100644
--- a/app/layout-options.tsx
+++ b/app/layout-options.tsx
@@ -4,62 +4,57 @@ import type { SVGProps } from "react";
import { pageTree } from "./source";
// https://remixicon.com/icon/discord-line
const Discord = (props: SVGProps) => (
-
+
);
export const layoutOptions: Omit = {
- tree: pageTree,
- nav: {
- title: (
- <>
-
-
- Stardust
-
- >
- ),
- transparentMode: "top",
- },
- links: [
- {
- url: "/",
- text: "Home",
- },
- {
- url: "/docs",
- text: "Docs",
- },
- {
- type: 'secondary',
- text: 'Discord',
- url: 'https://discord.gg/xyW6kqrSf5',
- icon: ,
- external: true,
- },
- {
- type: 'secondary',
- text: 'GitHub',
- url: "https://github.com/spaceness/stardust",
- icon: ,
- external: true,
- },
- ]
+ tree: pageTree,
+ nav: {
+ title: (
+ <>
+
+ Stardust
+ >
+ ),
+ transparentMode: "top",
+ },
+ links: [
+ {
+ url: "/",
+ text: "Home",
+ },
+ {
+ url: "/docs",
+ text: "Docs",
+ },
+ {
+ type: "secondary",
+ text: "Discord",
+ url: "https://discord.gg/xyW6kqrSf5",
+ icon: ,
+ external: true,
+ },
+ {
+ type: "secondary",
+ text: "GitHub",
+ url: "https://github.com/spaceness/stardust",
+ icon: (
+
+ ),
+ external: true,
+ },
+ ],
};
diff --git a/app/layout.tsx b/app/layout.tsx
index 0b70fd6..a6e50b4 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -5,26 +5,25 @@ import { Inter } from "next/font/google";
import type { ReactNode } from "react";
const inter = Inter({
- subsets: ["latin"],
+ subsets: ["latin"],
});
export const metadata: Metadata = {
- title: {
- template: "%s | Stardust",
- default: "Stardust",
- },
- description:
- "Stardust is the platform for streaming isolated, disposable, and secure desktop environments.",
- metadataBase:
- process.env.NODE_ENV === "development"
- ? new URL(process.env.LOCAL_URL ?? "http://localhost:3000")
- : new URL("https://stardust.spaceness.one"),
+ title: {
+ template: "%s | Stardust",
+ default: "Stardust",
+ },
+ description: "Stardust is the platform for streaming isolated, disposable, and secure desktop environments.",
+ metadataBase:
+ process.env.NODE_ENV === "development"
+ ? new URL(process.env.LOCAL_URL ?? "http://localhost:3000")
+ : new URL("https://stardust.spaceness.one"),
};
export default function Layout({ children }: { children: ReactNode }) {
- return (
-
-
- {children}
-
-
- );
+ return (
+
+
+ {children}
+
+
+ );
}
diff --git a/app/source.ts b/app/source.ts
index 5cb887b..70bc0bb 100644
--- a/app/source.ts
+++ b/app/source.ts
@@ -1,9 +1,9 @@
-import { map } from '@/.map';
-import { createMDXSource } from 'fumadocs-mdx';
-import { loader } from 'fumadocs-core/source';
+import { map } from "@/.map";
+import { loader } from "fumadocs-core/source";
+import { createMDXSource } from "fumadocs-mdx";
export const { getPage, getPages, pageTree } = loader({
- baseUrl: '/docs',
- rootDir: 'docs',
- source: createMDXSource(map),
+ baseUrl: "/docs",
+ rootDir: "docs",
+ source: createMDXSource(map),
});
diff --git a/biome.json b/biome.json
new file mode 100644
index 0000000..f5f1fb9
--- /dev/null
+++ b/biome.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
+ "formatter": {
+ "enabled": true,
+ "formatWithErrors": true,
+ "indentStyle": "tab",
+ "indentWidth": 2,
+ "lineEnding": "lf",
+ "lineWidth": 120,
+ "attributePosition": "auto",
+ "ignore": ["**/pnpm-lock.yaml", "**/.next/**", "**/node_modules/**"]
+ },
+ "organizeImports": {
+ "enabled": true,
+ "ignore": ["**/pnpm-lock.yaml", "**/.next/**", "**/node_modules/**"]
+ },
+ "linter": {
+ "enabled": true,
+ "rules": {
+ "recommended": true
+ },
+ "ignore": ["**/pnpm-lock.yaml", "**/.next/**", "**/node_modules/**"]
+ },
+ "javascript": {
+ "formatter": {
+ "jsxQuoteStyle": "double",
+ "quoteProperties": "asNeeded",
+ "trailingCommas": "all",
+ "semicolons": "always",
+ "arrowParentheses": "always",
+ "bracketSpacing": true,
+ "bracketSameLine": false,
+ "quoteStyle": "double",
+ "attributePosition": "auto"
+ }
+ }
+}
diff --git a/content/docs/cool-things/autoclicker.mdx b/content/docs/cool-things/autoclicker.mdx
index 242f44d..5f8481a 100644
--- a/content/docs/cool-things/autoclicker.mdx
+++ b/content/docs/cool-things/autoclicker.mdx
@@ -2,9 +2,10 @@
title: Using an Autoclicker
description: Learn how to use an Autoclicker on Stardust
---
-import { Step, Steps } from "fumadocs-ui/components/steps"
-Stardust containers are just Linux machines, so Linux autoclickers, such as Xclicker, will run.
+import { Step, Steps } from "fumadocs-ui/components/steps";
+
+Stardust containers are just Linux machines, so Linux autoclickers, such as Xclicker, will run.
@@ -12,6 +13,7 @@ Stardust containers are just Linux machines, so Linux autoclickers, such as Xcli
On the bottom of your session, click "Terminal Emulator"
![](/images/cool-things/autoclicker/step-1.png)
+
### Install the autoclicker
@@ -34,5 +36,3 @@ The autoclicker has a user interface that should be easy to use.
![](/images/cool-things/autoclicker/step-4.png)
-
-
diff --git a/content/docs/cool-things/meta.json b/content/docs/cool-things/meta.json
index f7cd3ad..55b54d9 100644
--- a/content/docs/cool-things/meta.json
+++ b/content/docs/cool-things/meta.json
@@ -1,3 +1,3 @@
{
- "title": "Cool Things"
-}
\ No newline at end of file
+ "title": "Cool Things"
+}
diff --git a/content/docs/index.mdx b/content/docs/index.mdx
index 830f26b..8155868 100644
--- a/content/docs/index.mdx
+++ b/content/docs/index.mdx
@@ -3,9 +3,8 @@ title: What is Stardust
description: Stardust is the platform for isolated, disposable workspaces.
---
-
-Stardust is the platform for streaming isolated and disposable workspaces.
-It is a platform that allows you to create, manage, and share workspaces with others.
+Stardust is the platform for streaming isolated and disposable workspaces.
+It is a platform that allows you to create, manage, and share workspaces with others.
Stardust is designed to be fast, secure, and easy to use. It is built on top of Docker, and it is designed to be extensible and customizable.
@@ -14,5 +13,5 @@ Stardust is designed to be fast, secure, and easy to use. It is built on top of
title="Installing Stardust"
description="Learn how to install Stardust on your machine."
external={false}
- />
-
\ No newline at end of file
+ />
+
diff --git a/content/docs/install/index.mdx b/content/docs/install/index.mdx
index bbd2190..fa319c1 100644
--- a/content/docs/install/index.mdx
+++ b/content/docs/install/index.mdx
@@ -2,25 +2,31 @@
title: Installing Stardust
description: Learn how to install Stardust on your machine.
---
-import {Step, Steps} from "fumadocs-ui/components/steps"
-import { AutoTypeTable } from 'fumadocs-typescript/ui';
+
+import { Step, Steps } from "fumadocs-ui/components/steps";
+import { AutoTypeTable } from "fumadocs-typescript/ui";
Stardust is simple to setup, even for someone with zero IT knowledge.
Before you get started, make sure that you have the following already set up:
-* Node.js 18 or later installed, plus `node-gyp` and `pnpm`. Download Node.js from [Nodesource](https://github.com/nodesource/distributions) and `node-gyp` and `pnpm` by running the following:
+
+- Node.js 18 or later installed, plus `node-gyp` and `pnpm`. Download Node.js from [Nodesource](https://github.com/nodesource/distributions) and `node-gyp` and `pnpm` by running the following:
+
```bash
# or however else you install make and gcc
sudo apt install build-essential gcc
npm i -g pnpm node-gyp
```
-* Docker setup. If you're using a Unix-based system, you can follow the instructions [here](https://docs.docker.com/engine/install/ubuntu/).
-* A PostgreSQL database. You can use Docker to spin one up by running
+
+- Docker setup. If you're using a Unix-based system, you can follow the instructions [here](https://docs.docker.com/engine/install/ubuntu/).
+- A PostgreSQL database. You can use Docker to spin one up by running
+
```bash
docker run --name stardust-postgres -p 5432:5432 -e POSTGRES_PASSWORD=replaceme -d postgres
```
## Setup
+
Create a new docker network
diff --git a/content/docs/install/production.mdx b/content/docs/install/production.mdx
index ccc0627..3797dcc 100644
--- a/content/docs/install/production.mdx
+++ b/content/docs/install/production.mdx
@@ -50,6 +50,7 @@ Environment="PORT=8090"
[Install]
WantedBy=multi-user.target
```
+
After this, add this to the `.gitconfig` of the user the service is running as:
```ini
diff --git a/content/docs/writing-workspaces/agent-api.mdx b/content/docs/writing-workspaces/agent-api.mdx
index 661c454..0dc941c 100644
--- a/content/docs/writing-workspaces/agent-api.mdx
+++ b/content/docs/writing-workspaces/agent-api.mdx
@@ -2,44 +2,59 @@
title: Agent API
description: Container agent API and implementation details
---
+
The container agent is an HTTP server that is also used to keep the docker container alive, normally at the end of a Docker start script. These docs are for developers looking to write their own versions of the agent, or to understand how the stock agent works.
The agent has a few endpoints that are used by Stardust to interact with the container. The agent is expected to be running on port 6080.
+
## General
### `GET /`
+
This endpoint returns a test page to check if the agent is running.
![](/images/writing-workspaces/agent.jpeg)
### `GET /healthcheck`
+
This endpoint returns an object with the `message` key if the agent is running. Used to [check if the container is running](https://github.com/spaceness/stardust/blob/main/src/lib/session/session-running.ts).
+
```json title="Example response"
{ "message": "Stardust Container Agent is running" }
```
### `GET /password`
+
This endpoint returns the VNC password for the container as a string. [Used in `/api/session/[id]` in Stardust](https://github.com/spaceness/stardust/blob/main/src/app/api/session/%5Bslug%5D/route.ts).
+
```ts
-await fetch(`http://${containerSession.ip}:6080/password`).then((res) => res.text());
+await fetch(`http://${containerSession.ip}:6080/password`).then((res) =>
+ res.text()
+);
```
### `GET /screenshot`
+
This endpoint returns a screenshot of the container's desktop as a PNG image.[Used in `/api/session/[id]/preview` in Stardust](https://github.com/spaceness/stardust/blob/main/src/app/api/session/%5Bslug%5D/preview/route.ts).
## Files
+
All are used in [`/api/session/[id]/files`](https://github.com/spaceness/stardust/blob/main/src/app/api/session/%5Bslug%5D/files/route.ts) in Stardust.
### `GET /files/list`
+
This endpoint returns a list of files in the container's `~/Downloads` directory as an array of strings.
### `GET /files/download/:name`
+
This endpoint returns the file in the container's `~/Downloads` directory with the name `:name`.
### `PUT /files/upload/:name`
+
This endpoint uploads a file to the container's `~/Uploads` directory with the name `:name`. The file should be sent as a `NodeJS.Buffer` in the body of the request.
+
```ts
await fetch(`http://${ip}:6080/files/upload/${fileName}`, {
- method: "PUT",
- body: Buffer.from(buffer),
- });
+ method: "PUT",
+ body: Buffer.from(buffer),
+});
```
diff --git a/content/docs/writing-workspaces/index.mdx b/content/docs/writing-workspaces/index.mdx
index a0915b9..7c1aca0 100644
--- a/content/docs/writing-workspaces/index.mdx
+++ b/content/docs/writing-workspaces/index.mdx
@@ -7,13 +7,15 @@ Stardust workspaces are, at the core, a Docker container. They have a desktop en
## Agent
-Stardust's container agent is an HTTP server running on any Stardust container on port 6080. It's source code can be found on [GitHub](https://github.com/spaceness/stardust-images/tree/main/server). The agent is currently used for file transfer, grabbing a screenshot for image previews, and for getting the container's VNC token. The agent should be able to write to the `stardust` user's home directory, and the temp directory.
+Stardust's container agent is an HTTP server running on any Stardust container on port 6080. It's source code can be found on [GitHub](https://github.com/spaceness/stardust-images/tree/main/server). The agent is currently used for file transfer, grabbing a screenshot for image previews, and for getting the container's VNC token. The agent should be able to write to the `stardust` user's home directory, and the temp directory.
The stock agent is written in TypeScript and uses [Fastify](https://fastify.dev/). More details can be found [here](/docs/writing-workspaces/agent-api).
## VNC
+
Stardust expects a VNC server running on port 5900. It is expected to only accept a password for auth, and said password should be exported as an environment variable, so that the container agent can access it. The server should also have remote resizing enabled, unless it's not suited for the use case.
### Password
+
There are many ways to share the VNC password with the agent. The stock images export an environment variable that's a random string, and then `vncpasswd` is used to set the password.
```bash title="Example start script for a container" icon="bash"
@@ -27,4 +29,5 @@ tsx server/index.ts
```
## System
+
The container should have a user named `stardust`, and it's home directory must also be able to be written to by the container agent. There should be a `~/Downloads` and a `~/Uploads` directory, which the container agent can use to transfer files to and from the container.
diff --git a/mdx-components.tsx b/mdx-components.tsx
index e2c2094..2a7e0bf 100644
--- a/mdx-components.tsx
+++ b/mdx-components.tsx
@@ -1,9 +1,9 @@
-import type { MDXComponents } from 'mdx/types';
-import defaultComponents from 'fumadocs-ui/mdx';
+import defaultComponents from "fumadocs-ui/mdx";
+import type { MDXComponents } from "mdx/types";
export function useMDXComponents(components: MDXComponents): MDXComponents {
- return {
- ...defaultComponents,
- ...components,
- };
+ return {
+ ...defaultComponents,
+ ...components,
+ };
}
diff --git a/next.config.mjs b/next.config.mjs
index 4448237..a98cd01 100644
--- a/next.config.mjs
+++ b/next.config.mjs
@@ -1,14 +1,14 @@
-import createMDX from 'fumadocs-mdx/config';
+import createMDX from "fumadocs-mdx/config";
const withMDX = createMDX({
- mdxOptions: {
- lastModifiedTime: "git",
- },
+ mdxOptions: {
+ lastModifiedTime: "git",
+ },
});
/** @type {import('next').NextConfig} */
const config = {
- reactStrictMode: true,
+ reactStrictMode: true,
};
export default withMDX(config);
diff --git a/package.json b/package.json
index b4a94f1..3174db9 100644
--- a/package.json
+++ b/package.json
@@ -1,31 +1,34 @@
{
- "name": "stardust-docs",
- "version": "0.0.0",
- "private": true,
- "scripts": {
- "build": "next build",
- "dev": "next dev",
- "start": "next start"
- },
- "dependencies": {
- "fumadocs-core": "^10.1.3",
- "fumadocs-mdx": "^8.2.30",
- "fumadocs-typescript": "^2.0.1",
- "fumadocs-ui": "^12.0.2",
- "lucide-react": "^0.372.0",
- "next": "^14.2.3",
- "react": "^18.3.1",
- "react-dom": "^18.3.1",
- "sharp": "^0.33.4"
- },
- "devDependencies": {
- "@types/mdx": "^2.0.13",
- "@types/node": "20.12.12",
- "@types/react": "^18.3.3",
- "@types/react-dom": "^18.3.0",
- "autoprefixer": "^10.4.19",
- "postcss": "^8.4.38",
- "tailwindcss": "^3.4.4",
- "typescript": "^5.4.5"
- }
-}
\ No newline at end of file
+ "name": "stardust-docs",
+ "version": "0.0.0",
+ "private": true,
+ "scripts": {
+ "build": "next build",
+ "dev": "next dev",
+ "start": "next start",
+ "check": "biome check . --write && prettier --write ."
+ },
+ "dependencies": {
+ "fumadocs-core": "^10.1.3",
+ "fumadocs-mdx": "^8.2.30",
+ "fumadocs-typescript": "^2.0.1",
+ "fumadocs-ui": "^12.0.2",
+ "lucide-react": "^0.372.0",
+ "next": "^14.2.3",
+ "prettier": "^3.3.3",
+ "react": "^18.3.1",
+ "react-dom": "^18.3.1",
+ "sharp": "^0.33.4"
+ },
+ "devDependencies": {
+ "@biomejs/biome": "1.8.3",
+ "@types/mdx": "^2.0.13",
+ "@types/node": "20.12.12",
+ "@types/react": "^18.3.3",
+ "@types/react-dom": "^18.3.0",
+ "autoprefixer": "^10.4.19",
+ "postcss": "^8.4.38",
+ "tailwindcss": "^3.4.4",
+ "typescript": "^5.4.5"
+ }
+}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 145988c..65526f9 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -26,6 +26,9 @@ importers:
next:
specifier: ^14.2.3
version: 14.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ prettier:
+ specifier: ^3.3.3
+ version: 3.3.3
react:
specifier: ^18.3.1
version: 18.3.1
@@ -36,6 +39,9 @@ importers:
specifier: ^0.33.4
version: 0.33.4
devDependencies:
+ '@biomejs/biome':
+ specifier: 1.8.3
+ version: 1.8.3
'@types/mdx':
specifier: ^2.0.13
version: 2.0.13
@@ -71,6 +77,59 @@ packages:
resolution: {integrity: sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==}
engines: {node: '>=6.9.0'}
+ '@biomejs/biome@1.8.3':
+ resolution: {integrity: sha512-/uUV3MV+vyAczO+vKrPdOW0Iaet7UnJMU4bNMinggGJTAnBPjCoLEYcyYtYHNnUNYlv4xZMH6hVIQCAozq8d5w==}
+ engines: {node: '>=14.21.3'}
+ hasBin: true
+
+ '@biomejs/cli-darwin-arm64@1.8.3':
+ resolution: {integrity: sha512-9DYOjclFpKrH/m1Oz75SSExR8VKvNSSsLnVIqdnKexj6NwmiMlKk94Wa1kZEdv6MCOHGHgyyoV57Cw8WzL5n3A==}
+ engines: {node: '>=14.21.3'}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@biomejs/cli-darwin-x64@1.8.3':
+ resolution: {integrity: sha512-UeW44L/AtbmOF7KXLCoM+9PSgPo0IDcyEUfIoOXYeANaNXXf9mLUwV1GeF2OWjyic5zj6CnAJ9uzk2LT3v/wAw==}
+ engines: {node: '>=14.21.3'}
+ cpu: [x64]
+ os: [darwin]
+
+ '@biomejs/cli-linux-arm64-musl@1.8.3':
+ resolution: {integrity: sha512-9yjUfOFN7wrYsXt/T/gEWfvVxKlnh3yBpnScw98IF+oOeCYb5/b/+K7YNqKROV2i1DlMjg9g/EcN9wvj+NkMuQ==}
+ engines: {node: '>=14.21.3'}
+ cpu: [arm64]
+ os: [linux]
+
+ '@biomejs/cli-linux-arm64@1.8.3':
+ resolution: {integrity: sha512-fed2ji8s+I/m8upWpTJGanqiJ0rnlHOK3DdxsyVLZQ8ClY6qLuPc9uehCREBifRJLl/iJyQpHIRufLDeotsPtw==}
+ engines: {node: '>=14.21.3'}
+ cpu: [arm64]
+ os: [linux]
+
+ '@biomejs/cli-linux-x64-musl@1.8.3':
+ resolution: {integrity: sha512-UHrGJX7PrKMKzPGoEsooKC9jXJMa28TUSMjcIlbDnIO4EAavCoVmNQaIuUSH0Ls2mpGMwUIf+aZJv657zfWWjA==}
+ engines: {node: '>=14.21.3'}
+ cpu: [x64]
+ os: [linux]
+
+ '@biomejs/cli-linux-x64@1.8.3':
+ resolution: {integrity: sha512-I8G2QmuE1teISyT8ie1HXsjFRz9L1m5n83U1O6m30Kw+kPMPSKjag6QGUn+sXT8V+XWIZxFFBoTDEDZW2KPDDw==}
+ engines: {node: '>=14.21.3'}
+ cpu: [x64]
+ os: [linux]
+
+ '@biomejs/cli-win32-arm64@1.8.3':
+ resolution: {integrity: sha512-J+Hu9WvrBevfy06eU1Na0lpc7uR9tibm9maHynLIoAjLZpQU3IW+OKHUtyL8p6/3pT2Ju5t5emReeIS2SAxhkQ==}
+ engines: {node: '>=14.21.3'}
+ cpu: [arm64]
+ os: [win32]
+
+ '@biomejs/cli-win32-x64@1.8.3':
+ resolution: {integrity: sha512-/PJ59vA1pnQeKahemaQf4Nyj7IKUvGQSc3Ze1uIGi+Wvr1xF7rGobSrAAG01T/gUDG21vkDsZYM03NAmPiVkqg==}
+ engines: {node: '>=14.21.3'}
+ cpu: [x64]
+ os: [win32]
+
'@emnapi/runtime@1.2.0':
resolution: {integrity: sha512-bV21/9LQmcQeCPEg3BDFtvwL6cwiTMksYNWQQ4KOxCZikEGalWtenoZ0wCiukJINlGCIi2KXx01g4FoH/LxpzQ==}
@@ -1469,6 +1528,11 @@ packages:
resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==}
engines: {node: ^10 || ^12 || >=14}
+ prettier@3.3.3:
+ resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==}
+ engines: {node: '>=14'}
+ hasBin: true
+
property-information@6.5.0:
resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==}
@@ -1815,6 +1879,41 @@ snapshots:
dependencies:
regenerator-runtime: 0.14.1
+ '@biomejs/biome@1.8.3':
+ optionalDependencies:
+ '@biomejs/cli-darwin-arm64': 1.8.3
+ '@biomejs/cli-darwin-x64': 1.8.3
+ '@biomejs/cli-linux-arm64': 1.8.3
+ '@biomejs/cli-linux-arm64-musl': 1.8.3
+ '@biomejs/cli-linux-x64': 1.8.3
+ '@biomejs/cli-linux-x64-musl': 1.8.3
+ '@biomejs/cli-win32-arm64': 1.8.3
+ '@biomejs/cli-win32-x64': 1.8.3
+
+ '@biomejs/cli-darwin-arm64@1.8.3':
+ optional: true
+
+ '@biomejs/cli-darwin-x64@1.8.3':
+ optional: true
+
+ '@biomejs/cli-linux-arm64-musl@1.8.3':
+ optional: true
+
+ '@biomejs/cli-linux-arm64@1.8.3':
+ optional: true
+
+ '@biomejs/cli-linux-x64-musl@1.8.3':
+ optional: true
+
+ '@biomejs/cli-linux-x64@1.8.3':
+ optional: true
+
+ '@biomejs/cli-win32-arm64@1.8.3':
+ optional: true
+
+ '@biomejs/cli-win32-x64@1.8.3':
+ optional: true
+
'@emnapi/runtime@1.2.0':
dependencies:
tslib: 2.6.3
@@ -3539,6 +3638,8 @@ snapshots:
picocolors: 1.0.1
source-map-js: 1.2.0
+ prettier@3.3.3: {}
+
property-information@6.5.0: {}
queue-microtask@1.2.3: {}
diff --git a/postcss.config.js b/postcss.config.js
index 12a703d..e873f1a 100644
--- a/postcss.config.js
+++ b/postcss.config.js
@@ -1,6 +1,6 @@
module.exports = {
- plugins: {
- tailwindcss: {},
- autoprefixer: {},
- },
+ plugins: {
+ tailwindcss: {},
+ autoprefixer: {},
+ },
};
diff --git a/prettier.config.mjs b/prettier.config.mjs
new file mode 100644
index 0000000..8308ba5
--- /dev/null
+++ b/prettier.config.mjs
@@ -0,0 +1,8 @@
+/** @type {import("prettier").Config} */
+export default {
+ semi: true,
+ singleQuote: false,
+ tabWidth: 2,
+ trailingComma: "es5",
+ useTabs: false,
+};
diff --git a/tailwind.config.js b/tailwind.config.js
index 30b270f..08926d1 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,15 +1,17 @@
-const { createPreset } = require('fumadocs-ui/tailwind-plugin');
+const { createPreset } = require("fumadocs-ui/tailwind-plugin");
/** @type {import('tailwindcss').Config} */
module.exports = {
- content: [
- './components/**/*.{ts,tsx}',
- './app/**/*.{ts,tsx}',
- './content/**/*.{md,mdx}',
- './mdx-components.{ts,tsx}',
- './node_modules/fumadocs-ui/dist/**/*.js',
- ],
- presets: [createPreset({
- preset: "catppuccin"
- })],
+ content: [
+ "./components/**/*.{ts,tsx}",
+ "./app/**/*.{ts,tsx}",
+ "./content/**/*.{md,mdx}",
+ "./mdx-components.{ts,tsx}",
+ "./node_modules/fumadocs-ui/dist/**/*.js",
+ ],
+ presets: [
+ createPreset({
+ preset: "catppuccin",
+ }),
+ ],
};
diff --git a/tsconfig.json b/tsconfig.json
index 47d1cd9..3671b0b 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,29 +1,29 @@
{
- "compilerOptions": {
- "baseUrl": ".",
- "target": "ESNext",
- "lib": ["dom", "dom.iterable", "esnext"],
- "allowJs": true,
- "skipLibCheck": true,
- "strict": true,
- "forceConsistentCasingInFileNames": true,
- "noEmit": true,
- "esModuleInterop": true,
- "module": "esnext",
- "moduleResolution": "node",
- "resolveJsonModule": true,
- "isolatedModules": true,
- "jsx": "preserve",
- "incremental": true,
- "paths": {
- "@/*": ["./*"]
- },
- "plugins": [
- {
- "name": "next"
- }
- ]
- },
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
- "exclude": ["node_modules"]
+ "compilerOptions": {
+ "baseUrl": ".",
+ "target": "ESNext",
+ "lib": ["dom", "dom.iterable", "esnext"],
+ "allowJs": true,
+ "skipLibCheck": true,
+ "strict": true,
+ "forceConsistentCasingInFileNames": true,
+ "noEmit": true,
+ "esModuleInterop": true,
+ "module": "esnext",
+ "moduleResolution": "node",
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "jsx": "preserve",
+ "incremental": true,
+ "paths": {
+ "@/*": ["./*"]
+ },
+ "plugins": [
+ {
+ "name": "next"
+ }
+ ]
+ },
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
+ "exclude": ["node_modules"]
}