How salehkhatri/aakaura works
Project type and purpose
• This is a full-stack, content-driven web application built with Next.js (App Router) that serves a public blog and an administrative UI.
• It uses Prisma as an ORM to manage a relational database (e.g., PostgreSQL), Cloudinary for image uploads, and exposes server-side API routes for blog management, authentication, uploads, and sitemap generation.
File structure
• Top-level directories:
• prisma – database schema and migrations
• public – static assets (images, robots.txt, sitemap.xml)
• src/app – Next.js App Router:
– page.tsx/layout.tsx at root: public blog pages
– /blogs, /about: public pages
– /admin: protected admin UI pages
– /api: serverless route handlers grouped under /admin and public endpoints (blogs, series, sitemap)
• src/components – React UI components (shared and UI primitives)
• src/config – external service & environment configuration (Prisma client, Cloudinary, fonts, constants)
• src/middleware – request-time logic (auth guard, error handler, JSON parsing)
• src/context – React context (SplashScreen state)
• src/lib, src/utils – helper functions (HTTP wrappers, SEO, uploads, response builders)
• src/types – TypeScript type definitions and Zod schemas
• Config files: next.config.ts, tailwind.config.ts, eslint.config.mjs, tsconfig.json
README for additional insights
• Confirms Next.js with built-in font optimization
• Standard npm/pnpm scripts for development & deployment
• Intended to be deployed on Vercel
Detail without overthinking
• Layer (UI, server, data) distinctly.
• API groups (public blogs, admin blogs, login, upload, series, sitemap).
• Middleware intercept points for auth and error handling.
• Static asset serving and CDN involvement.
• The goal is to break down the codebase into discrete, labeled components and explicitly map their interactions.