How dibya-22/get-me-a-chai works
Project type and purpose
• This is a full-stack web application built with Next.js (app directory), TailwindCSS, NextAuth (auth), MongoDB/Mongoose (data), and Razorpay (payment).
• Purpose: let fans (“users”) sign in via GitHub, browse creator pages, and send small “chai-sized” payments. Creators get a dashboard to view supporters and earnings.
File structure
• Top-level directories:
• app/ – Next.js 13+ “app router” pages and API routes
• components/ – React UI components shared across pages
• actions/ – client/server actions for data fetching/mutation
• db/ – database connection helper (connectDB.js)
• models/ – Mongoose schemas (User.js, Payment.js)
• Key API routes:
• app/api/auth/[...nextauth]/route.js – authentication via GitHub
• app/api/razorpay/route.js – server API to create/verify payments
• Configs: next.config.mjs, tailwind.config.mjs, eslint.config.mjs, jsconfig.json.
Examining the README
• Confirms tech stack and flow: OAuth with GitHub, Razorpay integration, MongoDB for persistence.
• High-level workflow: sign in → view creator page → process payment → dashboard updates.
Detail
• MongoDB collections (users, payments)