How magicuidesign/magicui works
Magic UI is a Next.js site presenting a library of reusable UI components and animations, with documentation, a component showcase, marketing pages, and a blog. The principal visitor workflow is to browse the site, explore showcase entries or blog posts, and inspect component previews and source. The excerpts show selected page-to-component and page-to-content-source relationships; the broader registry and docs implementation is represented from the tree and README, so unsampled wiring is omitted.
Main entry points: [...slug]/page.tsx Blog article · source.ts Content sources · showcase/page.tsx Showcase pages · route.ts Markdown endpoint
Components 23
Site and marketing
- Marketing home
apps/www/app/(marketing)/page.tsx - Hero section
apps/www/components/sections/hero.tsx - Showcase pages
apps/www/app/(marketing)/showcase/page.tsx - Showcase entries
apps/www/app/(marketing)/showcase/[...slug]/page.tsx - Showcase cards
apps/www/components/sections/showcase.tsx
Docs and components
- Docs layout
apps/www/app/(docs)/layout.tsx - Documentation content
apps/www/config/docs.ts - Component registry
apps/www/registry/__index__.tsx - Registry UI entries
apps/www/registry/registry-ui.ts - Registry examples
apps/www/registry/registry-examples.ts - Component preview
apps/www/components/component-preview.tsx - Preview and code tabs
apps/www/components/component-preview-tabs.tsx
Blog and publishing
- Blog index
apps/www/app/(blog)/blog/page.tsx - Blog article
apps/www/app/(blog)/blog/[...slug]/page.tsx - Article contents
apps/www/components/blog/table-of-contents.tsx - Mobile contents
apps/www/components/blog/mobile-toc.tsx - Publishing webhook
apps/www/app/api/blog-webhook/route.ts
Content and integrations
- Content sources
apps/www/lib/source.ts - Markdown endpoint
apps/www/app/llm/[[...slug]]/route.ts - Docs helpers
apps/www/lib/docs.ts - Social image endpoint
apps/www/app/og/route.tsx
Other components
- Site visitor
- GitHub Actions
Connections 21
- Site visitor → Marketing home: visits
apps/www/app/(marketing)/page.tsx - Marketing home → Hero section: renders
apps/www/app/(marketing)/page.tsx - Site visitor → Showcase pages: browses
apps/www/app/(marketing)/showcase/page.tsx - Showcase pages → Content sources: reads entries
apps/www/app/(marketing)/showcase/page.tsx - Showcase pages → Showcase cards: renders cards
apps/www/app/(marketing)/showcase/page.tsx - Site visitor → Blog index: browses
apps/www/app/(blog)/blog/page.tsx - Blog index → Content sources: reads posts
apps/www/app/(blog)/blog/page.tsx - Site visitor → Blog article: opens article
apps/www/app/(blog)/blog/[...slug]/page.tsx - Blog article → Content sources: loads article
apps/www/app/(blog)/blog/[...slug]/page.tsx - Blog article → Article contents: renders contents
apps/www/app/(blog)/blog/[...slug]/page.tsx - Blog article → Mobile contents: renders mobile contents
apps/www/app/(blog)/blog/[...slug]/page.tsx - Mobile contents → Article contents: embeds
apps/www/components/blog/mobile-toc.tsx - Site visitor → Docs layout: opens docs
README.md - Site visitor → Component preview: explores components
README.md - Preview and code tabs → Component preview: shows preview
apps/www/components/component-preview-tabs.tsx - Site visitor → Markdown endpoint: requests markdown
apps/www/app/llm/[[...slug]]/route.ts - Markdown endpoint → Content sources: loads page
apps/www/app/llm/[[...slug]]/route.ts - Markdown endpoint → Docs helpers: replaces source tags
apps/www/app/llm/[[...slug]]/route.ts - Site visitor → Publishing webhook: submits publish event
apps/www/app/api/blog-webhook/route.ts - Publishing webhook → GitHub Actions: dispatches workflow
apps/www/app/api/blog-webhook/route.ts - Site visitor → Social image endpoint: requests image
apps/www/app/og/route.tsx