A full-stack authentication and user profile management system built with Next.js, NestJS, GraphQL, and MongoDB. Users can register, log in, view their profile, and update personal details — all while maintaining secure, cookie-based authentication.
- ✅ User Signup & Login
- 🔐 Cookie-based Authentication
- 📄 Profile View & Edit
- ⚙️ Form Validation with Yup
- 📡 Apollo Client + Server for GraphQL
- 🗄️ MongoDB for Persistent Storage
- 🧠 NestJS Backend (MVC structure)
- ⚛️ Next.js Frontend with App Router
| Frontend | Backend | Database | GraphQL | Auth |
|---|---|---|---|---|
| Next.js 14 | NestJS | MongoDB | Apollo Client & Server | HTTP-only Cookies |
git clone https://github.com/Triparna-146/AuthProfile.git
cd AuthProfileCreate .env files in both /client and /server directories:
NEXT_PUBLIC_API_URL=http://localhost:4000/graphqlMONGO_URI=your_mongo_connection_string
JWT_SECRET=your_jwt_secret
CLIENT_URL=http://localhost:3000
NODE_ENV=developmentcd client && npm install
cd ../server && npm install# Start backend
cd server
npm run start:dev
# Start frontend
cd ../client
npm run dev- Signup / Login → sends credentials to backend
- Backend sets a secure, HTTP-only cookie
- Frontend uses
ApolloClientto query authenticated routes like/me - Logout clears cookie + Apollo cache
PRs are welcome! For major changes, please open an issue first.
MIT © Triparna-146