Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/pkg-pr-new.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ jobs:
with:
node-version: '22'
- run: pnpm install
- run: pnpm build -F '@rivetkit/*' -F '!@rivetkit/shared-data' -F '!@rivetkit/engine-frontend' -F '!@rivetkit/mcp-hub'
- run: npx turbo build:publish -F rivetkit -F '@rivetkit/*' -F '!@rivetkit/example-registry' -F '!@rivetkit/mcp-hub'
- run: pnpm dlx pkg-pr-new publish 'shared/typescript/*' 'engine/sdks/typescript/runner/' 'engine/sdks/typescript/runner-protocol/' 'rivetkit-typescript/packages/*' --packageManager pnpm --template './examples/*'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pnpm-debug.log*
# TypeScript
*.tsbuildinfo
dist/
frontend/build/
!frontend/packages/icons/dist/

# IDE
Expand Down
4 changes: 4 additions & 0 deletions frontend/.ladle/config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** @type {import('@ladle/react').UserConfig} */
export default {
viteConfig: ".ladle/vite.config.ts",
};
79 changes: 79 additions & 0 deletions frontend/.ladle/ladle.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
@import "../src/components/theme.css";

@tailwind base;
@tailwind components;
@tailwind utilities;

/* Force dark theme for all Ladle stories. */
:root {
--background: 20 14.3% 4.1%;
--foreground: 60 9.1% 97.8%;
--card: 0 9.09% 6.47%;
--card-foreground: 60 9.1% 97.8%;
--popover: 0 9.09% 6.47%;
--popover-foreground: 60 9.1% 97.8%;
--primary: 18.5 100% 50%;
--primary-foreground: 60 9.1% 97.8%;
--secondary: 12 6.5% 15.1%;
--secondary-foreground: 60 9.1% 97.8%;
--muted: 34 10% 10%;
--muted-foreground: 24 5.4% 63.9%;
--accent: 12 6.5% 15.1%;
--accent-foreground: 60 9.1% 97.8%;
--destructive: 0 72.2% 50.6%;
--destructive-foreground: 60 9.1% 97.8%;
--warning: 47.9 95.8% 53.1%;
--border: 12 6.5% 15.1%;
--input: 12 6.5% 15.1%;
--ring: 18.59deg 100% 50%;
--background-main: 0 7.14% 5.49%;
}

@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground min-h-screen;
}
}

/* Dark theme overrides for xyflow Controls. */
.react-flow__controls {
background: hsl(var(--card));
border: 1px solid hsl(var(--border));
border-radius: 6px;
box-shadow: none;
}

.react-flow__controls-button {
background: transparent;
border-bottom: 1px solid hsl(var(--border));
fill: hsl(var(--foreground));
}

.react-flow__controls-button:hover {
background: hsl(var(--accent));
}

.react-flow__controls-button:last-child {
border-bottom: none;
}

/* Dark theme overrides for xyflow MiniMap. */
.react-flow__minimap {
background: hsl(var(--card)) !important;
border: 1px solid hsl(var(--border));
border-radius: 6px;
}

/* Remove Ladle story container padding and make it fill the full viewport. */
.ladle-main {
padding: 0 !important;
height: 100vh;
}

/* Dark theme for xyflow edges. */
.react-flow__edge-path {
stroke: hsl(var(--muted-foreground));
}
4 changes: 4 additions & 0 deletions frontend/.ladle/vite.config.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions frontend/Caddyfile.ladle
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
admin off
}

:{$PORT:80} {
# Health check endpoint (must come before file_server)
handle /health {
respond "healthy" 200
}

# Main site handler
handle {
root * /srv

# Gzip compression
encode gzip

# Security headers
header {
X-Frame-Options "SAMEORIGIN"
X-Content-Type-Options "nosniff"
X-XSS-Protection "1; mode=block"
}

# Cache static assets aggressively
@static {
path *.js *.css *.png *.jpg *.jpeg *.gif *.ico *.svg *.woff *.woff2 *.ttf *.eot
}
header @static Cache-Control "public, max-age=31536000, immutable"

# Don't cache HTML files (for SPA updates)
@html {
path *.html
}
header @html Cache-Control "no-store, no-cache, must-revalidate"

# SPA catch-all routing - try file first, then fall back to index.html
try_files {path} /index.html

file_server
}
}
32 changes: 32 additions & 0 deletions frontend/apps/inspector/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!doctype html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<meta property="description" content="Rivet Inspector — local development tool for RivetKit." />

<title>Rivet Inspector</title>
</head>
<body>
<div id="root"></div>

<script type="application/json" id="RIVET_CONFIG">
{
"apiUrl": "%VITE_APP_API_URL%",
"assetsUrl": "%VITE_APP_ASSETS_URL%",
"sentryDsn": "%VITE_APP_SENTRY_DSN%",
"sentry": {
"dsn": "%VITE_APP_SENTRY_DSN%",
"projectId": "%VITE_APP_SENTRY_PROJECT_ID%",
"tunnel": "%VITE_APP_SENTRY_TUNNEL%"
},
"posthog": {
"apiKey": "%VITE_APP_POSTHOG_API_KEY%",
"apiHost": "%VITE_APP_POSTHOG_HOST%"
}
}
</script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
1 change: 1 addition & 0 deletions frontend/apps/inspector/public
83 changes: 83 additions & 0 deletions frontend/apps/inspector/src/app.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions frontend/apps/inspector/src/app/data-providers/cache.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 70 additions & 0 deletions frontend/apps/inspector/src/app/inspector-root.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading