How chiazhe/chatprofolio works
Project type and purpose
• This is a full-stack Next.js 13 application (using the App Router) that allows users to sign up/log in, customize their profile (basic info, education, experience, skills, projects, achievements, contact, layout preferences), and exposes an AI chat feature. It uses NextAuth for authentication, Prisma for database ORM, and server actions/API routes for CRUD operations on user data and chatbot records.
File structure
• Top-level “app” directory implements pages and layouts via React Server Components and Client Components under route segments like (auth), profile/[username], and settings.
• The “actions” directory contains Next.js Server Actions for create/update operations (e.g., update-experience.ts).
• “app/api” holds Next.js Route Handlers for auth ([...nextauth]/route.ts) and chat (chat/route.ts).
• “lib” contains utility code: auth.ts (NextAuth config), db.ts (Prisma client), validation schemas, and helper functions.
• “prisma” hosts the schema and migration history (defining User, Experience, Education, Skill, Project, Achievement, Contact, LayoutPreference, ChatbotRecords models).
• “components” and “app/_component” provide reusable UI (client) components.
• “context” and “lib/providers” provide React Context for theme and toasts.