How yahiamana/portfolio works
Project type and purpose
• This is a full-stack, React-based web application built with Next.js (App Router).
• The app provides a public-facing portfolio or projects page with image-upload functionality and an admin panel to manage project entries.
• It uses Prisma as an ORM to persist project data to a database and stores uploaded files in the public/uploads directory.
File structure
• Top-level Next.js config and build files: next.config.ts, eslint.config.mjs, tsconfig.json.
• public/ holds static assets and an uploads/ subfolder for user-uploaded files.
• prisma/ contains the database schema (schema.prisma), migrations, and a helper (lib/prisma.ts) to instantiate the Prisma client.
• src/app/ is the Next.js App Router folder:
• page.tsx and layout.tsx define entry points and the common layout.
• components/ houses presentational React components (Hero, Projects, About, Contact, Nav).
• api/ contains two serverless route handlers:
– projects/route.ts for CRUD operations on project records via Prisma.
– upload/route.ts to handle file uploads to public/uploads.
• adminpanel/page.tsx is the protected UI for managing projects.
README for additional insights
• Standard Next.js boilerplate created with create-next-app.
Elements
• UI requests and responses between Client ↔ Next.js Pages
• API calls between Client → API Routes → Prisma → DB
• File writes to File Store and subsequent static file serving
• Blue = Presentation (Browser + React)
• Green = Application (Next.js Server + API)
• Orange = Data (Prisma, DB, File Store)
• Grey = Infrastructure (Vercel)