How ad1tya-a1/getchai-donation- works
Project type and purpose
• This is a full-stack, React-based Next.js application with serverless API routes.
• Primary features: user authentication (NextAuth), payment processing (Razorpay), a user dashboard, and MongoDB persistence via Mongoose models.
File structure
• Top-level “app” folder holds all the UI routes and React components, following Next.js App Router conventions.
• app/page.js: public landing page
• app/logIn/page.js: login UI
• app/dashboard/page.js: protected dashboard UI
• app/[username]/page.js: dynamic user profiles
• app/components: reusable UI pieces (Navbar, Footer, SessionWrapper, PaymentPage, Dashboard)
• API layer under app/api:
• auth endpoints under app/api/auth/[...nextauth]/route.js (NextAuth handlers)
• razorpay endpoint under app/api/razorpay/route.js
• “actions” folder: client-side or server-side logic for calling APIs (useractions.js)
• Database connection file in db/connectDb.js
• Mongoose models in models/Payment.js and models/User.js
• Configuration files: next.config.mjs, postcss.config.mjs, eslint.config.mjs, jsconfig.json
README
• Confirms Next.js App Router setup (create-next-app)