Imported from pranil-shripad/minimal-portfolio (
AGENTS.md). Install upstream withnpx skills add pranil-shripad/minimal-portfolio. Copyright stays with the author.
AI Agent Guidelines for chanhdai.com
Next.js 16 (App Router) portfolio, blog, and shadcn registry website.
Stack: TypeScript, Tailwind CSS v4, shadcn/ui, MDX, pnpm, Vercel
Project Structure
| Directory | Purpose |
|---|---|
src/app/ |
App Router pages, layouts, API routes |
src/components/ |
Shared UI components |
src/registry/ |
Registry source (components, hooks, blocks, examples, lib) |
src/__registry__/ |
Auto-generated registry files (DO NOT EDIT) |
src/features/ |
Feature modules: doc, blog, portfolio, sponsor |
src/config/ |
Site (site.ts) and registry (registry.ts) configuration |
src/hooks/, src/lib/, src/utils/ |
Hooks, libraries, utilities |
Key files: components.json (shadcn config), src/features/portfolio/data/ (portfolio data), .env.example (env vars)
Component Registry
Built on shadcn/ui. Registry types and their definition files:
| Type | File |
|---|---|
registry:component |
src/registry/components/_registry.ts |
registry:hook |
src/registry/hooks/_registry.ts |
registry:block |
src/registry/blocks/_registry.ts |
registry:example |
src/registry/examples/_registry.ts |
registry:lib |
src/registry/lib/_registry.ts |
NEVER EDIT auto-generated files: src/__registry__/index.tsx, src/__registry__/registry.autogenerated.json, public/r/*.json
Adding a New Component
- Create component in
src/registry/[name]/ - Register in the appropriate
_registry.tsfile - Create example in
src/registry/examples/ - Run
pnpm registry:build - Add docs MDX in
src/features/doc/content/withcategory: "components"
Content System
All content lives in src/features/doc/content/ as MDX files. Blog posts and component docs are distinguished by the category field in frontmatter.
- Data layer:
src/features/doc/data/documents.ts(getAllDocs,getDocBySlug,getDocsByCategory) - Blog UI:
src/features/blog/(rendering only, imports data fromfeatures/doc)
Coding Guidelines
- TypeScript strict mode; explicit types when necessary
- kebab-case file naming
- Descriptive names; comments only for "why", not "what"
- No emojis in code, comments, or commit messages
- Tailwind CSS v4 syntax; support dark/light modes
- Follow SOLID principles
Commands
pnpm dev # Dev server
pnpm build # Production build
pnpm lint # ESLint
pnpm format:write # Prettier
pnpm check-types # Type checking
pnpm registry:build # Build shadcn registry