+
+
+
How it works
+
+ Your code calls{" "}
+ .delay() · the
+ job durably queues · a Rust scheduler routes it · a worker returns the
+ result.
+
-
-
+ .taskito-flow .taskito-result-pulse {
+ animation: taskito-result-pulse 4.8s ease-out infinite;
+ }
+ .taskito-flow .taskito-track {
+ animation: taskito-track-shimmer 1.6s linear infinite;
+ }
+ }
+ `}
);
}
From 9cc04c8697d05283c3fdde894fdb59e2d2d5f0ce Mon Sep 17 00:00:00 2001
From: Pratyush Sharma <56130065+pratyush618@users.noreply.github.com>
Date: Sun, 3 May 2026 11:11:33 +0530
Subject: [PATCH 03/14] feat(docs): add WorkerPool, UseCases, and Integrations
landing sections
---
docs/src/app/(home)/_sections/index.ts | 3 +
.../src/app/(home)/_sections/integrations.tsx | 39 +++
docs/src/app/(home)/_sections/use-cases.tsx | 52 ++++
docs/src/app/(home)/_sections/worker-pool.tsx | 269 ++++++++++++++++++
docs/src/app/(home)/page.tsx | 6 +
docs/src/lib/landing-content.tsx | 69 +++++
6 files changed, 438 insertions(+)
create mode 100644 docs/src/app/(home)/_sections/integrations.tsx
create mode 100644 docs/src/app/(home)/_sections/use-cases.tsx
create mode 100644 docs/src/app/(home)/_sections/worker-pool.tsx
diff --git a/docs/src/app/(home)/_sections/index.ts b/docs/src/app/(home)/_sections/index.ts
index 59c8562..5a5c059 100644
--- a/docs/src/app/(home)/_sections/index.ts
+++ b/docs/src/app/(home)/_sections/index.ts
@@ -3,3 +3,6 @@ export { CTA } from "./cta";
export { Features } from "./features";
export { Hero } from "./hero";
export { HowItWorks } from "./how-it-works";
+export { Integrations } from "./integrations";
+export { UseCases } from "./use-cases";
+export { WorkerPool } from "./worker-pool";
diff --git a/docs/src/app/(home)/_sections/integrations.tsx b/docs/src/app/(home)/_sections/integrations.tsx
new file mode 100644
index 0000000..ca0eb69
--- /dev/null
+++ b/docs/src/app/(home)/_sections/integrations.tsx
@@ -0,0 +1,39 @@
+import { SectionHeader } from "@/components/ui";
+import {
+ INTEGRATIONS,
+ INTEGRATIONS_DESCRIPTION,
+ INTEGRATIONS_TITLE,
+} from "@/lib/landing-content";
+
+export function Integrations() {
+ return (
+
+
+
+ {INTEGRATIONS.map((group) => (
+
+
+ {group.group}
+
+
+ {group.items.map((item) => (
+
+ {item}
+
+ ))}
+
+
+ ))}
+
+
+ );
+}
diff --git a/docs/src/app/(home)/_sections/use-cases.tsx b/docs/src/app/(home)/_sections/use-cases.tsx
new file mode 100644
index 0000000..3458d3d
--- /dev/null
+++ b/docs/src/app/(home)/_sections/use-cases.tsx
@@ -0,0 +1,52 @@
+import { ArrowUpRight } from "lucide-react";
+import Link from "next/link";
+import { SectionHeader } from "@/components/ui";
+import {
+ USE_CASES,
+ USE_CASES_DESCRIPTION,
+ USE_CASES_TITLE,
+ type UseCase,
+} from "@/lib/landing-content";
+
+export function UseCases() {
+ return (
+
+
+
+ {USE_CASES.map((useCase) => (
+
+ ))}
+
+
+ );
+}
+
+function UseCaseCard({ useCase }: { useCase: UseCase }) {
+ const { icon: Icon, title, body, href } = useCase;
+ return (
+
+
+
+
+
+
+
+
+
+ {title}
+
+ {body}
+
+
+
+ );
+}
diff --git a/docs/src/app/(home)/_sections/worker-pool.tsx b/docs/src/app/(home)/_sections/worker-pool.tsx
new file mode 100644
index 0000000..e95df58
--- /dev/null
+++ b/docs/src/app/(home)/_sections/worker-pool.tsx
@@ -0,0 +1,269 @@
+import { SectionHeader } from "@/components/ui";
+
+const WORKERS = [
+ { id: 0, x: 0, y: 0, delay: "0s", duration: "2.4s" },
+ { id: 1, x: 1, y: 0, delay: "-0.4s", duration: "2.8s" },
+ { id: 2, x: 2, y: 0, delay: "-1.1s", duration: "2.6s" },
+ { id: 3, x: 0, y: 1, delay: "-0.7s", duration: "3.1s" },
+ { id: 4, x: 1, y: 1, delay: "-1.6s", duration: "2.5s" },
+ { id: 5, x: 2, y: 1, delay: "-0.2s", duration: "2.9s" },
+] as const;
+
+const INCOMING_JOBS = [
+ { delay: "0s" },
+ { delay: "-0.6s" },
+ { delay: "-1.2s" },
+ { delay: "-1.8s" },
+] as const;
+
+const RESULTS = [
+ { delay: "-0.3s" },
+ { delay: "-0.9s" },
+ { delay: "-1.5s" },
+] as const;
+
+const POOL_LEFT = 180;
+const POOL_TOP = 30;
+const WORKER_SIZE = 32;
+const WORKER_GAP = 10;
+const POOL_WIDTH = 3 * WORKER_SIZE + 2 * WORKER_GAP;
+const POOL_HEIGHT = 2 * WORKER_SIZE + 1 * WORKER_GAP;
+const VIEW_W = 560;
+const VIEW_H = 130;
+const POOL_RIGHT = POOL_LEFT + POOL_WIDTH;
+
+export function WorkerPool() {
+ return (
+
+
+
+
+
+
+
+ );
+}
+
+function PoolStyles() {
+ return (
+
+ );
+}
diff --git a/docs/src/app/(home)/page.tsx b/docs/src/app/(home)/page.tsx
index c061c5e..dc0dc09 100644
--- a/docs/src/app/(home)/page.tsx
+++ b/docs/src/app/(home)/page.tsx
@@ -4,6 +4,9 @@ import {
Features,
Hero,
HowItWorks,
+ Integrations,
+ UseCases,
+ WorkerPool,
} from "./_sections";
export default function HomePage() {
@@ -11,7 +14,10 @@ export default function HomePage() {
+
+
+
diff --git a/docs/src/lib/landing-content.tsx b/docs/src/lib/landing-content.tsx
index 295aeb6..ad092be 100644
--- a/docs/src/lib/landing-content.tsx
+++ b/docs/src/lib/landing-content.tsx
@@ -1,8 +1,11 @@
import {
Activity,
+ Clock,
Cpu,
+ Database,
Layers,
type LucideIcon,
+ Mail,
Shield,
Workflow,
Zap,
@@ -199,6 +202,72 @@ send_email.delay("alice@example.com", "Hi", "Body")
],
};
+export type UseCase = {
+ icon: LucideIcon;
+ title: string;
+ body: string;
+ href: string;
+};
+
+export const USE_CASES_TITLE = "Built for the jobs you actually have";
+export const USE_CASES_DESCRIPTION =
+ "Pick the workload — taskito ships the primitives.";
+
+export const USE_CASES: UseCase[] = [
+ {
+ icon: Database,
+ title: "ETL pipelines",
+ body: "Chain extract → transform → load as a DAG. Fan out across workers, fan in to aggregate, restart from any node on failure.",
+ href: "/docs/guides/workflows",
+ },
+ {
+ icon: Mail,
+ title: "Email & notifications",
+ body: "Bursty SMTP, push, or webhook delivery. Per-task rate limits keep providers happy; retries with backoff handle transient failures.",
+ href: "/docs/guides/reliability/retries",
+ },
+ {
+ icon: Cpu,
+ title: "ML inference & batch",
+ body: "Long-running model jobs with progress tracking, soft timeouts, and prefork pools for true CPU parallelism without GIL contention.",
+ href: "/docs/guides/advanced-execution/prefork",
+ },
+ {
+ icon: Clock,
+ title: "Scheduled jobs",
+ body: "Six-field cron syntax down to the second. Periodic tasks live in the scheduler — no separate beat daemon to babysit.",
+ href: "/docs/guides/core/scheduling",
+ },
+];
+
+export const INTEGRATIONS_TITLE = "Slots into your stack";
+export const INTEGRATIONS_DESCRIPTION =
+ "First-class support for the tools you already run.";
+
+export type IntegrationGroup = {
+ group: string;
+ items: string[];
+};
+
+export const INTEGRATIONS: IntegrationGroup[] = [
+ {
+ group: "Frameworks",
+ items: ["Django", "FastAPI", "Flask"],
+ },
+ {
+ group: "Storage",
+ items: ["Postgres", "SQLite", "Redis"],
+ },
+ {
+ group: "Observability",
+ items: ["OpenTelemetry", "Sentry", "Prometheus"],
+ },
+ {
+ group: "Serialization",
+ items: ["JSON", "MsgPack", "Cloudpickle"],
+ },
+];
+
export const CTA: LandingCta = {
title: "Five minutes from `pip install` to your first job.",
description:
From 7c1fcf98d51072bba51262a13d80359a4c7749ef Mon Sep 17 00:00:00 2001
From: Pratyush Sharma <56130065+pratyush618@users.noreply.github.com>
Date: Sun, 3 May 2026 11:24:59 +0530
Subject: [PATCH 04/14] fix(docs): repair WorkerPool result lane and
active-worker visual
---
docs/src/app/(home)/_sections/worker-pool.tsx | 340 +++++++++---------
1 file changed, 180 insertions(+), 160 deletions(-)
diff --git a/docs/src/app/(home)/_sections/worker-pool.tsx b/docs/src/app/(home)/_sections/worker-pool.tsx
index e95df58..5a8627f 100644
--- a/docs/src/app/(home)/_sections/worker-pool.tsx
+++ b/docs/src/app/(home)/_sections/worker-pool.tsx
@@ -22,15 +22,19 @@ const RESULTS = [
{ delay: "-1.5s" },
] as const;
-const POOL_LEFT = 180;
-const POOL_TOP = 30;
-const WORKER_SIZE = 32;
+const VIEW_W = 560;
+const VIEW_H = 150;
+const POOL_LEFT = 200;
+const POOL_TOP = 38;
+const WORKER_SIZE = 34;
const WORKER_GAP = 10;
const POOL_WIDTH = 3 * WORKER_SIZE + 2 * WORKER_GAP;
const POOL_HEIGHT = 2 * WORKER_SIZE + 1 * WORKER_GAP;
-const VIEW_W = 560;
-const VIEW_H = 130;
const POOL_RIGHT = POOL_LEFT + POOL_WIDTH;
+const TRACK_Y = POOL_TOP + POOL_HEIGHT / 2;
+const INCOMING_LEFT = 30;
+const RESULT_LEFT = POOL_RIGHT + 30;
+const RESULT_END = VIEW_W - 30;
export function WorkerPool() {
return (
@@ -46,149 +50,47 @@ export function WorkerPool() {
viewBox={`0 0 ${VIEW_W} ${VIEW_H}`}
className="w-full max-w-2xl taskito-pool"
>
-
-
-
-
-
-
-
-
-
-
-
-
- INCOMING
-
-
- WORKERS
-
-
- RESULTS
-
+
+
{INCOMING_JOBS.map((job, i) => (
))}
- {WORKERS.map((worker) => {
- const x = POOL_LEFT + worker.x * (WORKER_SIZE + WORKER_GAP);
- const y = POOL_TOP + worker.y * (WORKER_SIZE + WORKER_GAP);
- return (
-
-
-
-
- );
- })}
+ {WORKERS.map((worker) => (
+
+ ))}
{RESULTS.map((result, i) => (
))}
@@ -211,58 +113,176 @@ export function WorkerPool() {
);
}
+function LaneLabels() {
+ return (
+ <>
+
+ INCOMING
+
+
+ WORKERS
+
+
+ RESULTS
+
+ >
+ );
+}
+
+function Lanes() {
+ return (
+ <>
+
+
+ >
+ );
+}
+
+function Worker({ worker }: { worker: (typeof WORKERS)[number] }) {
+ const x = POOL_LEFT + worker.x * (WORKER_SIZE + WORKER_GAP);
+ const y = POOL_TOP + worker.y * (WORKER_SIZE + WORKER_GAP);
+ const cx = x + WORKER_SIZE / 2;
+ const cy = y + WORKER_SIZE / 2;
+ return (
+
+
+
+
+
+
+ );
+}
+
function PoolStyles() {
return (
);
From 02d6dd117f7b77a225060bad2e8556e18fc588d4 Mon Sep 17 00:00:00 2001
From: Pratyush Sharma <56130065+pratyush618@users.noreply.github.com>
Date: Sun, 3 May 2026 11:27:20 +0530
Subject: [PATCH 05/14] docs: enrich docs section-index pages with icon cards
---
docs/content/docs/api-reference/index.mdx | 77 ++++++++++++++++++++++
docs/content/docs/architecture/index.mdx | 70 ++++++++++++++++++++
docs/content/docs/guides/index.mdx | 79 ++++++++++++++++++++---
docs/content/docs/index.mdx | 15 +++--
4 files changed, 226 insertions(+), 15 deletions(-)
create mode 100644 docs/content/docs/api-reference/index.mdx
create mode 100644 docs/content/docs/architecture/index.mdx
diff --git a/docs/content/docs/api-reference/index.mdx b/docs/content/docs/api-reference/index.mdx
new file mode 100644
index 0000000..b778af5
--- /dev/null
+++ b/docs/content/docs/api-reference/index.mdx
@@ -0,0 +1,77 @@
+---
+title: API Reference
+description: Every public class, method, and CLI command in taskito.
+---
+
+import { Cards, Card } from "fumadocs-ui/components/card";
+import {
+ Compass,
+ Inbox,
+ ListTodo,
+ CheckCircle2,
+ Variable,
+ GitFork,
+ Workflow,
+ TestTube,
+ Terminal,
+} from "lucide-react";
+
+Reference docs for everything taskito exposes. Each page lists the full
+signature, parameters, return values, and a short example.
+
+
+ }
+ title="Overview"
+ href="/docs/api-reference/overview"
+ description="The shape of the public API — what's stable, what's experimental."
+ />
+ }
+ title="Queue"
+ href="/docs/api-reference/queue"
+ description="Construct queues, enqueue jobs, manage workers, inspect state."
+ />
+ }
+ title="Task"
+ href="/docs/api-reference/task"
+ description="The @queue.task decorator — options, methods, async variants."
+ />
+ }
+ title="Result"
+ href="/docs/api-reference/result"
+ description="JobResult, polling, awaiting, timeouts, sync and async APIs."
+ />
+ }
+ title="Context"
+ href="/docs/api-reference/context"
+ description="current_job — progress, logging, cancellation, timeouts inside a task."
+ />
+ }
+ title="Canvas"
+ href="/docs/api-reference/canvas"
+ description="chain, group, chord — the Celery-compatible composition primitives."
+ />
+ }
+ title="Workflows"
+ href="/docs/api-reference/workflows"
+ description="The DAG builder — fan-out, fan-in, gates, conditions, sub-workflows."
+ />
+ }
+ title="Testing"
+ href="/docs/api-reference/testing"
+ description="test_mode, MockResource, fixtures for synchronous in-process verification."
+ />
+ }
+ title="CLI"
+ href="/docs/api-reference/cli"
+ description="taskito worker, dashboard, info — every flag and subcommand."
+ />
+
diff --git a/docs/content/docs/architecture/index.mdx b/docs/content/docs/architecture/index.mdx
new file mode 100644
index 0000000..b3560bd
--- /dev/null
+++ b/docs/content/docs/architecture/index.mdx
@@ -0,0 +1,70 @@
+---
+title: Architecture
+description: How taskito works under the hood — Rust core, scheduler, storage, worker pool.
+---
+
+import { Cards, Card } from "fumadocs-ui/components/card";
+import {
+ Compass,
+ GitBranch,
+ Layers,
+ CalendarClock,
+ Database,
+ Boxes,
+ ShieldAlert,
+ FileCode2,
+} from "lucide-react";
+
+The internals, explained from the outside in. Start with **Overview** for the
+high-level model, then drill into the layer that interests you.
+
+
+ }
+ title="Overview"
+ href="/docs/architecture/overview"
+ description="The big picture — Python ↔ PyO3 ↔ Rust core, end to end."
+ />
+ }
+ title="Job lifecycle"
+ href="/docs/architecture/job-lifecycle"
+ description="Every state a job moves through, from enqueue to result or dead letter."
+ />
+ }
+ title="Worker pool"
+ href="/docs/architecture/worker-pool"
+ description="OS-thread pool, prefork children, async executor — how each model dispatches work."
+ />
+ }
+ title="Scheduler"
+ href="/docs/architecture/scheduler"
+ description="The Tokio polling loop — how jobs are picked, claimed, and routed to workers."
+ />
+ }
+ title="Storage"
+ href="/docs/architecture/storage"
+ description="The Storage trait, Diesel for SQLite/Postgres, Redis backend, table schemas."
+ />
+ }
+ title="Resources"
+ href="/docs/architecture/resources"
+ description="The 3-layer DI pipeline — argument interception, worker injection, proxy reconstruction."
+ />
+ }
+ title="Failure model"
+ href="/docs/architecture/failure-model"
+ description="Retries, dead letters, circuit breakers, cancellation — what happens when things go wrong."
+ />
+ }
+ title="Serialization"
+ href="/docs/architecture/serialization"
+ description="Cloudpickle, JSON, MsgPack — how arguments and results cross the worker boundary."
+ />
+
diff --git a/docs/content/docs/guides/index.mdx b/docs/content/docs/guides/index.mdx
index 9c0ba0b..262b94d 100644
--- a/docs/content/docs/guides/index.mdx
+++ b/docs/content/docs/guides/index.mdx
@@ -3,16 +3,75 @@ title: Guides
description: Topical guides covering taskito's surface area.
---
-import { Cards, Card } from 'fumadocs-ui/components/card';
+import { Cards, Card } from "fumadocs-ui/components/card";
+import {
+ Boxes,
+ ShieldCheck,
+ Cpu,
+ Wrench,
+ Activity,
+ Layers,
+ Workflow,
+ Plug,
+ Puzzle,
+} from "lucide-react";
+
+Pick the topic you're working through. Each guide is self-contained, with code
+samples, gotchas, and links to the relevant API reference.
-
-
-
-
-
-
-
-
-
+ }
+ title="Core"
+ href="/docs/guides/core"
+ description="Define tasks, route to queues, run workers, schedule periodics."
+ />
+ }
+ title="Reliability"
+ href="/docs/guides/reliability"
+ description="Retries, dead letters, circuit breakers, idempotency, error handling."
+ />
+ }
+ title="Advanced execution"
+ href="/docs/guides/advanced-execution"
+ description="Prefork pools, native async, streaming, cancellation, soft timeouts."
+ />
+ }
+ title="Operations"
+ href="/docs/guides/operations"
+ description="Deployment, scaling, namespaces, migration from Celery."
+ />
+ }
+ title="Observability"
+ href="/docs/guides/observability"
+ description="Metrics, logs, dashboard, OpenTelemetry, Sentry, Prometheus."
+ />
+ }
+ title="Resources"
+ href="/docs/guides/resources"
+ description="Inject DB clients, HTTP sessions, and cloud SDKs by name with hot reload."
+ />
+ }
+ title="Workflows"
+ href="/docs/guides/workflows"
+ description="DAGs, fan-out, fan-in, conditions, gates, sub-workflows, incremental re-runs."
+ />
+ }
+ title="Integrations"
+ href="/docs/guides/integrations"
+ description="Django, FastAPI, Flask — admin views, REST routers, management commands."
+ />
+ }
+ title="Extensibility"
+ href="/docs/guides/extensibility"
+ description="Custom serializers, middleware, events, webhooks, proxies."
+ />
diff --git a/docs/content/docs/index.mdx b/docs/content/docs/index.mdx
index c73649e..7e42a9a 100644
--- a/docs/content/docs/index.mdx
+++ b/docs/content/docs/index.mdx
@@ -4,6 +4,7 @@ description: Rust-powered task queue for Python. No broker required.
---
import { Cards, Card } from "fumadocs-ui/components/card";
+import { Rocket, BookOpen, Boxes, Code2 } from "lucide-react";
A brokerless, Rust-powered task queue for Python. Replace Celery without Redis.
@@ -26,23 +27,27 @@ Python only runs during actual task execution.
}
title="Getting Started"
href="/docs/getting-started/installation"
description="Install and run your first task in 5 minutes."
/>
}
title="Guides"
href="/docs/guides"
- description="Core, reliability, advanced execution, operations, observability."
+ description="Topical walkthroughs grouped by intent — core, reliability, advanced execution, operations, more."
/>
}
title="Architecture"
- href="/docs/architecture/overview"
- description="How taskito is built — Rust core, PyO3 boundary, storage layer."
+ href="/docs/architecture"
+ description="How the Rust core, scheduler, storage, and worker pool fit together."
/>
}
title="API Reference"
- href="/docs/api-reference/overview"
- description="Complete API surface for the Queue, tasks, results, locks, and workflows."
+ href="/docs/api-reference"
+ description="Every public class, method, and CLI command with signatures and examples."
/>
From 787851cab00f5aee0cb90c1a8c7cfa1a5d20234c Mon Sep 17 00:00:00 2001
From: Pratyush Sharma <56130065+pratyush618@users.noreply.github.com>
Date: Sun, 3 May 2026 11:37:59 +0530
Subject: [PATCH 06/14] chore(docs): load IBM Plex Sans/Mono and Caveat
handwritten font
---
docs/biome.json | 10 +++++++++-
docs/src/app/global.css | 13 +++++++++++++
docs/src/app/layout.tsx | 24 +++++++++++++++++++++---
3 files changed, 43 insertions(+), 4 deletions(-)
diff --git a/docs/biome.json b/docs/biome.json
index dd49529..87cba3b 100644
--- a/docs/biome.json
+++ b/docs/biome.json
@@ -7,7 +7,15 @@
},
"files": {
"ignoreUnknown": true,
- "includes": ["**", "!node_modules", "!.next", "!dist", "!build", "!.source"]
+ "includes": [
+ "**",
+ "!node_modules",
+ "!.next",
+ "!dist",
+ "!build",
+ "!.source",
+ "!src/app/global.css"
+ ]
},
"formatter": {
"enabled": true,
diff --git a/docs/src/app/global.css b/docs/src/app/global.css
index 488ce0e..be36e7f 100644
--- a/docs/src/app/global.css
+++ b/docs/src/app/global.css
@@ -2,6 +2,19 @@
@import "fumadocs-ui/css/neutral.css";
@import "fumadocs-ui/css/preset.css";
+@theme {
+ --font-sans:
+ var(--font-sans), "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
+ --font-mono:
+ var(--font-mono), "IBM Plex Mono", ui-monospace, SFMono-Regular,
+ "Cascadia Mono", monospace;
+ --font-handwritten: var(--font-handwritten), "Caveat", cursive;
+ --color-fd-sketch:
+ color-mix(in oklch, var(--color-fd-foreground) 55%, transparent);
+ --color-fd-sketch-strong:
+ color-mix(in oklch, var(--color-fd-foreground) 75%, transparent);
+}
+
html {
scrollbar-gutter: stable;
}
diff --git a/docs/src/app/layout.tsx b/docs/src/app/layout.tsx
index c77d7cc..a9b81f8 100644
--- a/docs/src/app/layout.tsx
+++ b/docs/src/app/layout.tsx
@@ -1,10 +1,24 @@
import type { Metadata } from "next";
-import { Inter } from "next/font/google";
+import { Caveat, IBM_Plex_Mono, IBM_Plex_Sans } from "next/font/google";
import { Provider } from "@/components/provider";
import "./global.css";
-const inter = Inter({
+const ibmPlexSans = IBM_Plex_Sans({
subsets: ["latin"],
+ weight: ["400", "500", "600", "700"],
+ variable: "--font-sans",
+});
+
+const ibmPlexMono = IBM_Plex_Mono({
+ subsets: ["latin"],
+ weight: ["400", "500", "600"],
+ variable: "--font-mono",
+});
+
+const caveat = Caveat({
+ subsets: ["latin"],
+ weight: ["500", "600", "700"],
+ variable: "--font-handwritten",
});
export const metadata: Metadata = {
@@ -18,7 +32,11 @@ export const metadata: Metadata = {
export default function Layout({ children }: LayoutProps<"/">) {
return (
-
+
{children}
From 1db3ead11a3f45e34dda03087465bcd860c1c46e Mon Sep 17 00:00:00 2001
From: Pratyush Sharma <56130065+pratyush618@users.noreply.github.com>
Date: Sun, 3 May 2026 11:37:59 +0530
Subject: [PATCH 07/14] feat(docs): handwritten + sketchy aesthetic for
diagrams, dark-mode contrast
---
.../src/app/(home)/_sections/how-it-works.tsx | 293 +++++++-----------
docs/src/app/(home)/_sections/worker-pool.tsx | 191 +++++++-----
2 files changed, 228 insertions(+), 256 deletions(-)
diff --git a/docs/src/app/(home)/_sections/how-it-works.tsx b/docs/src/app/(home)/_sections/how-it-works.tsx
index 62988e0..8204b5f 100644
--- a/docs/src/app/(home)/_sections/how-it-works.tsx
+++ b/docs/src/app/(home)/_sections/how-it-works.tsx
@@ -8,53 +8,55 @@ type Station = {
glyph: ReactNode;
};
-const VIEW_WIDTH = 380;
-const TRACK_Y = 36;
-const STATION_RADIUS = 14;
+const VIEW_W = 460;
+const VIEW_H = 130;
+const TRACK_Y = 50;
+const STATION_W = 56;
+const STATION_H = 44;
const STATIONS: Station[] = [
{
id: "enqueue",
label: "enqueue",
hint: ".delay()",
- cx: 40,
+ cx: 56,
glyph: ,
},
{
id: "queue",
label: "queue",
hint: "SQLite · Postgres",
- cx: 145,
+ cx: 184,
glyph: ,
},
{
id: "worker",
label: "worker",
hint: "Rust pool",
- cx: 250,
+ cx: 304,
glyph: ,
},
{
id: "result",
label: "result",
hint: ".result()",
- cx: 340,
+ cx: 412,
glyph: ,
},
];
-const JOB_DELAYS = ["0s", "-1.6s", "-3.2s"] as const;
+const JOB_DELAYS = ["0s", "-1.7s", "-3.4s"] as const;
export function HowItWorks() {
return (
-
-
- How it works
+
+
+ how it works
-
+
Your code calls{" "}
- .delay() · the
+ .delay() · the
job durably queues · a Rust scheduler routes it · a worker returns the
result.
@@ -63,79 +65,73 @@ export function HowItWorks() {
@@ -146,66 +142,58 @@ export function HowItWorks() {
function StationNode({ station }: { station: Station }) {
const isWorker = station.id === "worker";
- const isResult = station.id === "result";
+ const x = station.cx - STATION_W / 2;
+ const y = TRACK_Y - STATION_H / 2;
return (
-
-
+
+
+ {station.glyph}
+
{isWorker ? (
) : null}
- {isResult ? (
-
- ) : null}
-
- {station.glyph}
-
{station.label}
@@ -215,31 +203,11 @@ function StationNode({ station }: { station: Station }) {
);
}
-function BackgroundGrid() {
- const dots = [];
- const step = 14;
- for (let x = 8; x < VIEW_WIDTH; x += step) {
- for (let y = 4; y < 84; y += step) {
- dots.push(
- ,
- );
- }
- }
- return {dots} ;
-}
-
function CodeGlyph() {
return (
How it works
+
+ Your code calls{" "}
+ .delay() · the
+ job durably queues · a Rust scheduler routes it · a worker returns the
+ result.
+
{title}
++ {body} +
+
- How it works
+
+
+ how it works
-
+
Your code calls{" "}
- .delay() · the
+ .delay() · the
job durably queues · a Rust scheduler routes it · a worker returns the
result.
@@ -63,79 +65,73 @@ export function HowItWorks() {
@@ -146,66 +142,58 @@ export function HowItWorks() {
function StationNode({ station }: { station: Station }) {
const isWorker = station.id === "worker";
- const isResult = station.id === "result";
+ const x = station.cx - STATION_W / 2;
+ const y = TRACK_Y - STATION_H / 2;
return (
-
-
+
+
+ {station.glyph}
+
{isWorker ? (
) : null}
- {isResult ? (
-
- ) : null}
-
- {station.glyph}
-
{station.label}
@@ -215,31 +203,11 @@ function StationNode({ station }: { station: Station }) {
);
}
-function BackgroundGrid() {
- const dots = [];
- const step = 14;
- for (let x = 8; x < VIEW_WIDTH; x += step) {
- for (let y = 4; y < 84; y += step) {
- dots.push(
- ,
- );
- }
- }
- return {dots} ;
-}
-
function CodeGlyph() {
return (
+ how it works
-+
Your code calls{" "}
- .delay() · the
+ .delay() · the
job durably queues · a Rust scheduler routes it · a worker returns the
result.