pagepublishedmdai-assisted
Epic Dev Routes - Your App as Your Tooling Layer
Stop building separate tools - use Next.js /dev/* routes to turn your entire app into a personal productivity layer with hot reload, TypeScript safety, and zero deployment overhead
- Path
/projects/jaygriff-v2/notes/epic-dev-routes- Published
- May 7, 2026
- Revised
- —
- Project
- jaygriff-v2
- Tags
On this page
Stored toc, derived from the body's headings on save. The body below isn't rendered yet, so these show the anchor ids rather than linking to them.
- The Core Idea
#the-core-idea - Why This Is Awesome
#why-this-is-awesome - The First Dev Route: Metadata Approval Panel
#the-first-dev-route-metadata-approval-panel - /dev/approve-metadata
#devapprove-metadata - Implementation
#implementation - More Epic Dev Route Ideas
#more-epic-dev-route-ideas - /dev/content-studio
#devcontent-studio - /dev/ai-playground
#devai-playground - /dev/logs
#devlogs - /dev/db-browser
#devdb-browser - /dev/emails
#devemails - /dev/api-playground
#devapi-playground - /dev/feature-flags
#devfeature-flags - /dev/analytics
#devanalytics - /dev/design-system
#devdesign-system - /dev/translations
#devtranslations - /dev/cron-jobs
#devcron-jobs - /dev/webhooks
#devwebhooks - The Pattern
#the-pattern - Why This Beats Separate Tools
#why-this-beats-separate-tools - Getting Started
#getting-started
Body
markdownbody.md
---json
{
"title": "Epic Dev Routes - Your App as Your Tooling Layer",
"slug": "epic-dev-routes",
"date": "2026-02-08T00:00:00Z",
"author": ["Jay Griffin"],
"type": "doc",
"description": "Stop building separate tools - use Next.js /dev/* routes to turn your entire app into a personal productivity layer with hot reload, TypeScript safety, and zero deployment overhead",
"tags": ["next.js", "dev-tools", "workflows", "architecture", "productivity", "dx", "web-dev"],
"relatedPosts": ["why-i-write-in-my-ide", "building-custom-copilot-skills"]
}
---
# Epic Dev Routes - Your App as Your Tooling Layer
## The Core Idea
Stop building separate tools. Your Next.js app IS the tool. Add `/dev/*` routes for every internal workflow and unlock your entire app as your personal productivity layer.
## Why This Is Awesome
- ✅ Use your existing design system
- ✅ Hot reload during development
- ✅ Full TypeScript safety
- ✅ Same component library
- ✅ Access to your real data
- ✅ Works on any device with a browser
- ✅ Zero deployment/maintenance of separate tools
---
## The First Dev Route: Metadata Approval Panel
### `/dev/approve-metadata`
**The Problem:** You download MD artifacts from AI chats to `content/md/`. They need frontmatter with proper metadata.
**The Flow:**
1. New file appears in `content/md/`
2. Claude Code skill detects it
3. AI extracts metadata from content
4. Skill opens: `http://localhost:3000/dev/approve-metadata?file=content-creator-plan.md`
5. Approval UI shows up in your browser
6. You iterate/approve
7. Frontmatter gets written to file
### Implementation
**Page Component (`app/dev/approve-metadata/page.tsx`):**
```typescript
'use client'
import { useState, useEffect } from 'react'
export default function ApproveMetadata({ searchParams }) {
const [metadata, setMetadata] = useState(null)
const [content, setContent] = useState('')
const [editing, setEditing] = useState(false)
useEffect(() => {
// Load file content and AI-extracted metadata
fetch(`/api/dev/get-metadata?file=${searchParams.file}`)
.then(r => r.json())
.then(data => {
setMetadata(data.metadata)
setContent(data.content)
})
}, [])
const regenerate = async (prompt) => {
const res = await fetch('/api/dev/regenerate-metadata', {
method: 'POST',
body: JSON.stringify({ file: searchParams.file, prompt, content })
})
const data = await res.json()
setMetadata(data.metadata)
}
const approve = async () => {
await fetch('/api/dev/approve-metadata', {
method: 'POST',
body: JSON.stringify({
file: searchParams.file,
metadata
})
})
alert('✓ Frontmatter added!')
}
return (
<div className="max-w-4xl mx-auto p-8">
<h1 className="text-3xl font-bold mb-8">Approve Metadata</h1>
{/* Preview Section */}
<div className="mb-8">
<h2 className="text-xl font-semibold mb-4">Content Preview</h2>
<div className="bg-gray-50 p-4 rounded border">
{content.slice(0, 500)}...
</div>
</div>
{/* Metadata Section */}
<div className="mb-8">
<h2 className="text-xl font-semibold mb-4">Extracted Metadata</h2>
<div className="space-y-4">
<div>
<label className="block font-medium mb-2">Title</label>
<input
value={metadata?.title || ''}
onChange={(e) => setMetadata({...metadata, title: e.target.value})}
className="w-full border rounded px-3 py-2"
/>
</div>
<div>
<label className="block font-medium mb-2">Description</label>
<textarea
value={metadata?.description || ''}
onChange={(e) => setMetadata({...metadata, description: e.target.value})}
className="w-full border rounded px-3 py-2"
rows={3}
/>
</div>
<div>
<label className="block font-medium mb-2">Tags</label>
<input
value={metadata?.tags?.join(', ') || ''}
onChange={(e) => setMetadata({...metadata, tags: e.target.value.split(',').map(t => t.trim())})}
className="w-full border rounded px-3 py-2"
placeholder="ai, workflows, automation"
/>
</div>
</div>
</div>
{/* AI Iteration Section */}
<div className="mb-8">
<h2 className="text-xl font-semibold mb-4">Refine with AI</h2>
<input
placeholder="e.g., 'Make tags more specific' or 'Add a focus on meta-realizations'"
className="w-full border rounded px-3 py-2 mb-2"
onKeyDown={(e) => {
if (e.key === 'Enter') {
regenerate(e.target.value)
e.target.value = ''
}
}}
/>
<p className="text-sm text-gray-500">Press Enter to regenerate metadata</p>
</div>
{/* Actions */}
<div className="flex gap-4">
<button
onClick={approve}
className="bg-green-600 text-white px-6 py-2 rounded font-medium hover:bg-green-700"
>
✓ Approve & Add Frontmatter
</button>
<button
onClick={() => regenerate('Make it better')}
className="bg-blue-600 text-white px-6 py-2 rounded font-medium hover:bg-blue-700"
>
↻ Regenerate
</button>
</div>
</div>
)
}
```
**API Routes:**
```typescript
// app/api/dev/get-metadata/route.ts
export async function GET(request: Request) {
const { searchParams } = new URL(request.url)
const filepath = searchParams.get('file')
const content = fs.readFileSync(`content/md/${filepath}`, 'utf-8')
// Call AI to extract metadata
const metadata = await extractMetadataWithAI(content)
return Response.json({ content, metadata })
}
// app/api/dev/regenerate-metadata/route.ts
export async function POST(request: Request) {
const { content, prompt } = await request.json()
// Call AI with refinement prompt
const metadata = await extractMetadataWithAI(content, prompt)
return Response.json({ metadata })
}
// app/api/dev/approve-metadata/route.ts
export async function POST(request: Request) {
const { file, metadata } = await request.json()
const content = fs.readFileSync(`content/md/${file}`, 'utf-8')
const frontmatter = `---
title: "${metadata.title}"
date: "${new Date().toISOString()}"
description: "${metadata.description}"
tags: ${JSON.stringify(metadata.tags)}
---
${content}`
fs.writeFileSync(`content/md/${file}`, frontmatter)
return Response.json({ success: true })
}
```
---
## More Epic Dev Route Ideas
### `/dev/content-studio`
Full CMS for your content
- Browse all posts/projects/notes
- Edit frontmatter inline
- Preview rendered markdown
- Bulk tag editor
- Search and filter
- Publish/unpublish toggle
### `/dev/ai-playground`
Test AI prompts and tools
- Try different models
- Compare outputs
- Save successful prompts as templates
- See token usage
- Test tool calling
- Experiment with temperature/top_p
### `/dev/logs`
Beautiful log viewer
- Real-time log streaming
- Filter by level/source
- Search logs
- Pretty print JSON
- Request/response viewer
- Error tracking
### `/dev/db-browser`
Visual database explorer
- Browse tables
- Run queries with SQL editor
- Edit records inline
- See relationships
- Export data
- Migration runner
### `/dev/emails`
Email development studio
- Preview email templates
- Test with different data
- Send test emails
- See responsive preview
- Check spam score
- Template editor
### `/dev/api-playground`
Internal API testing
- All endpoints listed
- Auto-generated forms from types
- Save request collections
- See response times
- Mock different states
- Auth token management
### `/dev/feature-flags`
Feature toggle dashboard
- Toggle features on/off
- Per-user overrides
- Rollout percentages
- A/B test configs
- See which features are active
### `/dev/analytics`
Local analytics dashboard
- No external services
- Real-time metrics
- Custom events
- User flows
- Performance monitoring
- Error tracking
### `/dev/design-system`
Component library browser
- All components showcased
- Props documentation
- Interactive examples
- Copy component code
- Color palette
- Typography scale
### `/dev/translations`
i18n management
- See all translation keys
- Find missing translations
- Edit inline
- Auto-translate with AI
- Export/import
- Usage tracking
### `/dev/cron-jobs`
Background task manager
- See scheduled jobs
- Trigger manually
- View execution history
- See failures
- Edit schedules
- Add new jobs
### `/dev/webhooks`
Webhook testing
- Receive webhooks locally
- Inspect payloads
- Replay webhooks
- Mock webhook sources
- Test error handling
---
## The Pattern
Every dev route follows the same structure:
1. **Display** - Show the current state (files, data, logs, etc)
2. **Interact** - Forms, buttons, inline editing
3. **AI-Assist** - Let AI help with tedious parts
4. **Approve** - Human verification before changes
5. **Execute** - Write to files, DB, trigger actions
It's the approve/regenerate/edit loop applied to every internal workflow.
---
## Why This Beats Separate Tools
**Separate Admin Panel:**
- Different codebase
- Different styling
- Deploy separately
- Maintain separately
- Context switching
**Dev Routes:**
- Same codebase
- Same components
- Zero deployment
- Auto-maintained
- Stays in flow
---
## Getting Started
1. Create `app/dev/layout.tsx` with dev-only auth/styling
2. Add your first route (`/dev/approve-metadata`)
3. Build the approval UI
4. Add more routes as you find workflows to optimize
5. Your app becomes your entire tooling layer
---Raw row
jsonepic-dev-routes.json
{
"id": "8b2e0e5c-2a71-4a0a-a038-8fd4a00b4454",
"parentId": "383caad1-85de-490c-a6c6-47d95519b574",
"slug": "epic-dev-routes",
"path": "/projects/jaygriff-v2/notes/epic-dev-routes",
"type": "page",
"status": "published",
"title": "Epic Dev Routes - Your App as Your Tooling Layer",
"description": "Stop building separate tools - use Next.js /dev/* routes to turn your entire app into a personal productivity layer with hot reload, TypeScript safety, and zero deployment overhead",
"intro": null,
"body": "---json\n{\n \"title\": \"Epic Dev Routes - Your App as Your Tooling Layer\",\n \"slug\": \"epic-dev-routes\",\n \"date\": \"2026-02-08T00:00:00Z\",\n \"author\": [\"Jay Griffin\"],\n \"type\": \"doc\",\n \"description\": \"Stop building separate tools - use Next.js /dev/* routes to turn your entire app into a personal productivity layer with hot reload, TypeScript safety, and zero deployment overhead\",\n \"tags\": [\"next.js\", \"dev-tools\", \"workflows\", \"architecture\", \"productivity\", \"dx\", \"web-dev\"],\n \"relatedPosts\": [\"why-i-write-in-my-ide\", \"building-custom-copilot-skills\"]\n}\n---\n\n# Epic Dev Routes - Your App as Your Tooling Layer\n\n## The Core Idea\nStop building separate tools. Your Next.js app IS the tool. Add `/dev/*` routes for every internal workflow and unlock your entire app as your personal productivity layer.\n\n## Why This Is Awesome\n- ✅ Use your existing design system\n- ✅ Hot reload during development\n- ✅ Full TypeScript safety\n- ✅ Same component library\n- ✅ Access to your real data\n- ✅ Works on any device with a browser\n- ✅ Zero deployment/maintenance of separate tools\n\n---\n\n## The First Dev Route: Metadata Approval Panel\n\n### `/dev/approve-metadata`\n\n**The Problem:** You download MD artifacts from AI chats to `content/md/`. They need frontmatter with proper metadata.\n\n**The Flow:**\n1. New file appears in `content/md/`\n2. Claude Code skill detects it\n3. AI extracts metadata from content\n4. Skill opens: `http://localhost:3000/dev/approve-metadata?file=content-creator-plan.md`\n5. Approval UI shows up in your browser\n6. You iterate/approve\n7. Frontmatter gets written to file\n\n### Implementation\n\n**Page Component (`app/dev/approve-metadata/page.tsx`):**\n```typescript\n'use client'\n\nimport { useState, useEffect } from 'react'\n\nexport default function ApproveMetadata({ searchParams }) {\n const [metadata, setMetadata] = useState(null)\n const [content, setContent] = useState('')\n const [editing, setEditing] = useState(false)\n \n useEffect(() => {\n // Load file content and AI-extracted metadata\n fetch(`/api/dev/get-metadata?file=${searchParams.file}`)\n .then(r => r.json())\n .then(data => {\n setMetadata(data.metadata)\n setContent(data.content)\n })\n }, [])\n \n const regenerate = async (prompt) => {\n const res = await fetch('/api/dev/regenerate-metadata', {\n method: 'POST',\n body: JSON.stringify({ file: searchParams.file, prompt, content })\n })\n const data = await res.json()\n setMetadata(data.metadata)\n }\n \n const approve = async () => {\n await fetch('/api/dev/approve-metadata', {\n method: 'POST',\n body: JSON.stringify({ \n file: searchParams.file, \n metadata \n })\n })\n alert('✓ Frontmatter added!')\n }\n \n return (\n <div className=\"max-w-4xl mx-auto p-8\">\n <h1 className=\"text-3xl font-bold mb-8\">Approve Metadata</h1>\n \n {/* Preview Section */}\n <div className=\"mb-8\">\n <h2 className=\"text-xl font-semibold mb-4\">Content Preview</h2>\n <div className=\"bg-gray-50 p-4 rounded border\">\n {content.slice(0, 500)}...\n </div>\n </div>\n \n {/* Metadata Section */}\n <div className=\"mb-8\">\n <h2 className=\"text-xl font-semibold mb-4\">Extracted Metadata</h2>\n <div className=\"space-y-4\">\n <div>\n <label className=\"block font-medium mb-2\">Title</label>\n <input \n value={metadata?.title || ''} \n onChange={(e) => setMetadata({...metadata, title: e.target.value})}\n className=\"w-full border rounded px-3 py-2\"\n />\n </div>\n <div>\n <label className=\"block font-medium mb-2\">Description</label>\n <textarea \n value={metadata?.description || ''} \n onChange={(e) => setMetadata({...metadata, description: e.target.value})}\n className=\"w-full border rounded px-3 py-2\"\n rows={3}\n />\n </div>\n <div>\n <label className=\"block font-medium mb-2\">Tags</label>\n <input \n value={metadata?.tags?.join(', ') || ''} \n onChange={(e) => setMetadata({...metadata, tags: e.target.value.split(',').map(t => t.trim())})}\n className=\"w-full border rounded px-3 py-2\"\n placeholder=\"ai, workflows, automation\"\n />\n </div>\n </div>\n </div>\n \n {/* AI Iteration Section */}\n <div className=\"mb-8\">\n <h2 className=\"text-xl font-semibold mb-4\">Refine with AI</h2>\n <input \n placeholder=\"e.g., 'Make tags more specific' or 'Add a focus on meta-realizations'\"\n className=\"w-full border rounded px-3 py-2 mb-2\"\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n regenerate(e.target.value)\n e.target.value = ''\n }\n }}\n />\n <p className=\"text-sm text-gray-500\">Press Enter to regenerate metadata</p>\n </div>\n \n {/* Actions */}\n <div className=\"flex gap-4\">\n <button \n onClick={approve}\n className=\"bg-green-600 text-white px-6 py-2 rounded font-medium hover:bg-green-700\"\n >\n ✓ Approve & Add Frontmatter\n </button>\n <button \n onClick={() => regenerate('Make it better')}\n className=\"bg-blue-600 text-white px-6 py-2 rounded font-medium hover:bg-blue-700\"\n >\n ↻ Regenerate\n </button>\n </div>\n </div>\n )\n}\n```\n\n**API Routes:**\n\n```typescript\n// app/api/dev/get-metadata/route.ts\nexport async function GET(request: Request) {\n const { searchParams } = new URL(request.url)\n const filepath = searchParams.get('file')\n \n const content = fs.readFileSync(`content/md/${filepath}`, 'utf-8')\n \n // Call AI to extract metadata\n const metadata = await extractMetadataWithAI(content)\n \n return Response.json({ content, metadata })\n}\n\n// app/api/dev/regenerate-metadata/route.ts\nexport async function POST(request: Request) {\n const { content, prompt } = await request.json()\n \n // Call AI with refinement prompt\n const metadata = await extractMetadataWithAI(content, prompt)\n \n return Response.json({ metadata })\n}\n\n// app/api/dev/approve-metadata/route.ts\nexport async function POST(request: Request) {\n const { file, metadata } = await request.json()\n \n const content = fs.readFileSync(`content/md/${file}`, 'utf-8')\n \n const frontmatter = `---\ntitle: \"${metadata.title}\"\ndate: \"${new Date().toISOString()}\"\ndescription: \"${metadata.description}\"\ntags: ${JSON.stringify(metadata.tags)}\n---\n\n${content}`\n \n fs.writeFileSync(`content/md/${file}`, frontmatter)\n \n return Response.json({ success: true })\n}\n```\n\n---\n\n## More Epic Dev Route Ideas\n\n### `/dev/content-studio`\nFull CMS for your content\n- Browse all posts/projects/notes\n- Edit frontmatter inline\n- Preview rendered markdown\n- Bulk tag editor\n- Search and filter\n- Publish/unpublish toggle\n\n### `/dev/ai-playground`\nTest AI prompts and tools\n- Try different models\n- Compare outputs\n- Save successful prompts as templates\n- See token usage\n- Test tool calling\n- Experiment with temperature/top_p\n\n### `/dev/logs`\nBeautiful log viewer\n- Real-time log streaming\n- Filter by level/source\n- Search logs\n- Pretty print JSON\n- Request/response viewer\n- Error tracking\n\n### `/dev/db-browser`\nVisual database explorer\n- Browse tables\n- Run queries with SQL editor\n- Edit records inline\n- See relationships\n- Export data\n- Migration runner\n\n### `/dev/emails`\nEmail development studio\n- Preview email templates\n- Test with different data\n- Send test emails\n- See responsive preview\n- Check spam score\n- Template editor\n\n### `/dev/api-playground`\nInternal API testing\n- All endpoints listed\n- Auto-generated forms from types\n- Save request collections\n- See response times\n- Mock different states\n- Auth token management\n\n### `/dev/feature-flags`\nFeature toggle dashboard\n- Toggle features on/off\n- Per-user overrides\n- Rollout percentages\n- A/B test configs\n- See which features are active\n\n### `/dev/analytics`\nLocal analytics dashboard\n- No external services\n- Real-time metrics\n- Custom events\n- User flows\n- Performance monitoring\n- Error tracking\n\n### `/dev/design-system`\nComponent library browser\n- All components showcased\n- Props documentation\n- Interactive examples\n- Copy component code\n- Color palette\n- Typography scale\n\n### `/dev/translations`\ni18n management\n- See all translation keys\n- Find missing translations\n- Edit inline\n- Auto-translate with AI\n- Export/import\n- Usage tracking\n\n### `/dev/cron-jobs`\nBackground task manager\n- See scheduled jobs\n- Trigger manually\n- View execution history\n- See failures\n- Edit schedules\n- Add new jobs\n\n### `/dev/webhooks`\nWebhook testing\n- Receive webhooks locally\n- Inspect payloads\n- Replay webhooks\n- Mock webhook sources\n- Test error handling\n\n---\n\n## The Pattern\n\nEvery dev route follows the same structure:\n\n1. **Display** - Show the current state (files, data, logs, etc)\n2. **Interact** - Forms, buttons, inline editing\n3. **AI-Assist** - Let AI help with tedious parts\n4. **Approve** - Human verification before changes\n5. **Execute** - Write to files, DB, trigger actions\n\nIt's the approve/regenerate/edit loop applied to every internal workflow.\n\n---\n\n## Why This Beats Separate Tools\n\n**Separate Admin Panel:**\n- Different codebase\n- Different styling\n- Deploy separately\n- Maintain separately\n- Context switching\n\n**Dev Routes:**\n- Same codebase\n- Same components\n- Zero deployment\n- Auto-maintained\n- Stays in flow\n\n---\n\n## Getting Started\n\n1. Create `app/dev/layout.tsx` with dev-only auth/styling\n2. Add your first route (`/dev/approve-metadata`)\n3. Build the approval UI\n4. Add more routes as you find workflows to optimize\n5. Your app becomes your entire tooling layer\n\n---\n",
"toc": [
{
"depth": 2,
"text": "The Core Idea",
"id": "the-core-idea"
},
{
"depth": 2,
"text": "Why This Is Awesome",
"id": "why-this-is-awesome"
},
{
"depth": 2,
"text": "The First Dev Route: Metadata Approval Panel",
"id": "the-first-dev-route-metadata-approval-panel"
},
{
"depth": 3,
"text": "/dev/approve-metadata",
"id": "devapprove-metadata"
},
{
"depth": 3,
"text": "Implementation",
"id": "implementation"
},
{
"depth": 2,
"text": "More Epic Dev Route Ideas",
"id": "more-epic-dev-route-ideas"
},
{
"depth": 3,
"text": "/dev/content-studio",
"id": "devcontent-studio"
},
{
"depth": 3,
"text": "/dev/ai-playground",
"id": "devai-playground"
},
{
"depth": 3,
"text": "/dev/logs",
"id": "devlogs"
},
{
"depth": 3,
"text": "/dev/db-browser",
"id": "devdb-browser"
},
{
"depth": 3,
"text": "/dev/emails",
"id": "devemails"
},
{
"depth": 3,
"text": "/dev/api-playground",
"id": "devapi-playground"
},
{
"depth": 3,
"text": "/dev/feature-flags",
"id": "devfeature-flags"
},
{
"depth": 3,
"text": "/dev/analytics",
"id": "devanalytics"
},
{
"depth": 3,
"text": "/dev/design-system",
"id": "devdesign-system"
},
{
"depth": 3,
"text": "/dev/translations",
"id": "devtranslations"
},
{
"depth": 3,
"text": "/dev/cron-jobs",
"id": "devcron-jobs"
},
{
"depth": 3,
"text": "/dev/webhooks",
"id": "devwebhooks"
},
{
"depth": 2,
"text": "The Pattern",
"id": "the-pattern"
},
{
"depth": 2,
"text": "Why This Beats Separate Tools",
"id": "why-this-beats-separate-tools"
},
{
"depth": 2,
"text": "Getting Started",
"id": "getting-started"
}
],
"format": "md",
"componentKey": null,
"contentHash": null,
"authors": null,
"authorship": "ai-assisted",
"authorshipNote": null,
"tags": [
"next-js",
"dev-tools",
"workflows",
"architecture",
"productivity",
"dx",
"web-dev"
],
"projectId": "b3d6e577-4481-4477-9b9f-cea025e63e92",
"sectionId": null,
"publishedAt": "2026-05-07T21:38:34.807Z",
"revisedAt": null,
"sortOrder": 0,
"source": "db",
"file": null,
"missingSince": null,
"createdAt": "2026-11-18T21:24:36.628Z",
"updatedAt": "2026-11-18T21:24:36.628Z",
"link": null,
"project": {
"slug": "jaygriff-v2",
"title": "jaygriff-v2"
},
"section": null,
"assets": []
}