How msaifurrijaal/volunpath-fe works
Project type and purpose
• This is a Next.js–based full-stack web application.
• It renders React pages on the server (SSR/SSG) and also exposes API routes for authentication via NextAuth.
• It consumes external REST endpoints for events, activities, and auth via an Axios-based service layer.
File structure
• src/app – Next.js App Router: page.tsx, nested layouts, route handlers under src/app/api/auth.
• src/components – Reusable UI components by category: layout, partials (NavBar, Footer), ux building blocks (dialogs, skeletons), and page-specific UI.
• src/configs – Configuration of AxiosInstance (base URL, interceptors), TanStack-Query providers, NextAuth authOptions and matchers.
• src/services – Thin wrappers over AxiosInstance to call external APIs: auth (login, register, refresh), activity (getActivities), event (getEvents).
• src/context – React Context for storing user data.
• src/middleware.ts + src/middlewares/withAuth.ts – Global and route-level auth middleware.
• src/utils, src/types, public, theme.ts, etc. support styling, typing, and assets.
README
• Confirms Next.js application bootstrapped with create-next-app.
• Mentions NextAuth for auth, font optimization, Vercel deployment.
• No internal database code → application relies on external REST/identity services.
Detail
• Every layer—from the user’s browser down to each service call.
• Middleware (withAuth) intercepting route requests.
• “SSR/SSG” and “Serverless Functions” where appropriate in the Next.js Server component.