How atulranjan97/devshelf works
DevShelf is a developer knowledge-hub dashboard for browsing typed items and collections, with pinned/recent views and summary counts. The dashboard route composes these views; sidebar and data-backed panels retrieve records through Prisma-backed query modules. The item and collection query functions are supported by excerpts; several panels are only indexed, so their internal behavior is not inferred. The repository also contains mock data, but the sampled runtime does not establish it as the dashboard’s result source beyond the sidebar’s demo-user display.
Main entry points: page.tsx Dashboard route · AppSidebar.tsx Navigation sidebar · items.ts Item queries · sidebar.tsx Sidebar primitives
Components 19
Dashboard experience
- Dashboard route
src/app/dashboard/page.tsx - Navigation sidebar
src/components/dashboard/AppSidebar.tsx - Collections panel
src/components/dashboard/CollectionsSection.tsx - Pinned items
src/components/dashboard/PinnedItems.tsx - Recent items
src/components/dashboard/RecentItems.tsx - Dashboard statistics
src/components/dashboard/StatsCards.tsx - Dashboard top bar
src/components/dashboard/TopBar.tsx - Item display row
src/components/dashboard/ItemRow.tsx
Knowledge data
- Collection queries
src/lib/db/collections.ts - Item queries
src/lib/db/items.ts - Demo user data
src/lib/mock-data.ts - Prisma client
src/lib/prisma.ts - PostgreSQL database
UI foundations
- Item type icons
src/lib/item-type-icons.tsx - Sidebar primitives
src/components/ui/sidebar.tsx - Sheet primitive
src/components/ui/sheet.tsx - Mobile detection hook
src/hooks/use-mobile.ts - Class utilities
src/lib/utils.ts
Other components
- Dashboard visitor
Connections 26
- Dashboard visitor → Dashboard route: opens
src/app/dashboard/page.tsx - Dashboard route → Dashboard top bar: renders
src/app/dashboard/page.tsx - Dashboard route → Navigation sidebar: renders
src/app/dashboard/page.tsx - Dashboard route → Collections panel: renders
src/app/dashboard/page.tsx - Dashboard route → Pinned items: renders
src/app/dashboard/page.tsx - Dashboard route → Recent items: renders
src/app/dashboard/page.tsx - Dashboard route → Dashboard statistics: renders
src/app/dashboard/page.tsx - Navigation sidebar → Item queries: loads types
src/components/dashboard/AppSidebar.tsx - Navigation sidebar → Collection queries: loads collections
src/components/dashboard/AppSidebar.tsx - Navigation sidebar → Demo user data: reads demo user
src/components/dashboard/AppSidebar.tsx - Navigation sidebar → Item type icons: maps type icons
src/components/dashboard/AppSidebar.tsx - Collections panel → Collection queries: loads collections
src/components/dashboard/CollectionsSection.tsx - Pinned items → Item queries: loads pinned
src/components/dashboard/PinnedItems.tsx - Recent items → Item queries: loads recent
src/components/dashboard/RecentItems.tsx - Dashboard statistics → Item queries: loads item stats
src/components/dashboard/StatsCards.tsx - Dashboard statistics → Collection queries: loads collection stats
src/components/dashboard/StatsCards.tsx - Pinned items → Item display row: renders
src/components/dashboard/PinnedItems.tsx - Recent items → Item display row: renders
src/components/dashboard/RecentItems.tsx - Item display row → Item type icons: renders icon
src/components/dashboard/ItemRow.tsx - Collection queries → Prisma client: queries via
src/lib/db/collections.ts - Item queries → Prisma client: queries via
src/lib/db/items.ts - Prisma client → PostgreSQL database: connects
src/lib/prisma.ts - Dashboard route → Sidebar primitives: uses provider
src/app/dashboard/page.tsx - Sidebar primitives → Sheet primitive: uses mobile sheet
src/components/ui/sidebar.tsx - Sidebar primitives → Mobile detection hook: checks viewport
src/components/ui/sidebar.tsx - Sidebar primitives → Class utilities: merges classes
src/components/ui/sidebar.tsx