How surajbisht105/true-feedback works
Project Type and Purpose
• This is a full-stack web application (“True-Feedback”) built with Next.js on the frontend and Node.js on the backend, backed by MongoDB.
• Its purpose is to let registered users receive anonymous feedback via a unique URL, with AI-powered suggestions (OpenAI) and secure authentication (NextAuth with email OTP).
File Structure
• Top-level folders and files:
• src/app: Next.js 13 “app” router holding pages, layouts, and API routes under /api.
• src/components & src/components/ui: React UI components (MessageCard, Navbar, ShadCN-styled controls).
• src/context: AuthProvider for client-side auth state.
• src/lib: Database connection (dbConnect.ts), utilities (resend, utils).
• src/model: Mongoose models (User).
• src/schemas: Validation with Zod for each API input.
• src/helpers: email logic (sendVerificationEmail).
• public: static assets.
• config & env: next.config.js, tailwind.config.js, .env for secrets (Mongo URI, OpenAI key, NextAuth secret, Resend API key).
Insights from the README
• Clarifies core features: anonymous feedback, AI suggestions, secure login, email OTP, MongoDB storage, unique user URLs.
• Tech stack: Next.js (React), Node.js, MongoDB, NextAuth.js, OpenAI, Resend email service.