How karimsamer19/cms-portfolio works
Portfolio CMS is a Next.js admin dashboard for maintaining portfolio projects, skills, skill categories, and profile preferences. The main workflow is admin sign-in, route authorization, dashboard navigation, then editing content through page forms and client state into Supabase tables and image buckets. The graph preserves the separate project, skill, category, and settings areas. Relationships for unsampled modules are included only where the README documents them; source-index references support the sampled project and skill flows.
Main entry points: layout.tsx Dashboard shell · projects/page.tsx Projects page · skills/page.tsx Skills page · settings/page.tsx Settings page
Components 21
Access and dashboard
- Route entry
app/page.tsx - Route protection
proxy.ts - Dashboard shell
app/dashboard/layout.tsx
Project management
- Projects page
app/dashboard/projects/page.tsx - Project editor
src/components/ProjectForm.tsx - Project state and CRUD
src/store/projectsStore.ts
Skills and categories
- Skills page
app/dashboard/skills/page.tsx - Skill management
app/dashboard/skills/components/SkillsMangement.tsx - Skill editor
app/dashboard/skills/components/SkillForm.tsx - Skill state
src/store/skillsStore.ts - Skill mutations and upload
src/actions/skills.ts - Category management
app/dashboard/skills/components/CategoriesMangement.tsx - Category editor
app/dashboard/skills/components/CategoryForm.tsx - Category mutations
src/actions/categories.ts
Profile settings
- Settings page
app/dashboard/settings/page.tsx - Profile editor
app/dashboard/settings/components/ProfileForm.tsx - Dashboard preferences
app/dashboard/settings/components/DashboardPreferences.tsx
Other components
- Admin user
- Clerk auth
- Supabase database
- Supabase image buckets
Connections 29
- Admin user → Route entry: opens app
README.md - Route entry → Clerk auth: checks session
README.md - Route entry → Dashboard shell: redirects signed-in
README.md - Admin user → Route protection: requests route
README.md - Route protection → Clerk auth: checks role
README.md - Route protection → Dashboard shell: protects routes
README.md - Dashboard shell → Projects page: renders section
- Dashboard shell → Skills page: renders section
- Dashboard shell → Settings page: renders section
- Admin user → Projects page: manages projects
README.md - Projects page → Project state and CRUD: fetches and deletes
app/dashboard/projects/page.tsx - Projects page → Project editor: renders editor
app/dashboard/projects/page.tsx - Project state and CRUD → Supabase database: reads and writes
src/store/projectsStore.ts - Project state and CRUD → Supabase image buckets: uploads thumbnails
src/store/projectsStore.ts - Admin user → Skills page: manages skills
README.md - Skills page → Skill management: renders manager
app/dashboard/skills/page.tsx - Skills page → Category management: renders manager
app/dashboard/skills/page.tsx - Skill management → Skill state: loads skill state
src/store/skillsStore.ts - Skill management → Skill editor: renders editor
app/dashboard/skills/components/SkillsMangement.tsx - Skill state → Supabase database: reads skills
src/store/skillsStore.ts - Skill state → Skill mutations and upload: dispatches mutations
src/store/skillsStore.ts - Skill mutations and upload → Supabase database: mutates skills
src/actions/skills.ts - Skill mutations and upload → Supabase image buckets: uploads skill icons
src/actions/skills.ts - Category management → Category editor: renders editor
app/dashboard/skills/components/CategoriesMangement.tsx - Admin user → Settings page: adjusts settings
README.md - Settings page → Profile editor: renders profile form
app/dashboard/settings/page.tsx - Settings page → Dashboard preferences: renders preferences
app/dashboard/settings/page.tsx - Profile editor → Supabase database: persists profile
README.md - Category mutations → Supabase database: mutates categories
README.md