A premium, luxury student-to-student marketplace where verified students buy, sell, and exchange books, notes, uniforms, and more within a trusted campus ecosystem.
| Layer | Technology |
|---|---|
| Frontend | React 19 + TypeScript + Vite |
| Styling | Tailwind CSS v4 |
| Auth & Database | Firebase (Auth + Firestore) |
| Image Hosting | Cloudinary (free tier) |
| Animations | Motion (Framer Motion) |
| Icons | Lucide React |
| PWA | vite-plugin-pwa + Workbox |
| Hosting | Vercel (free) |
- Student Verification — ID card + selfie upload, admin-gated approval flow
- Real-time Chat — Firebase Firestore realtime listeners for instant messaging
- Admin Panel — Approve/reject students, manage listings and reports
- Product Marketplace — List, browse, filter, wishlist, and reserve items
- Progressive Web App — Installable on mobile with offline caching
- Security — Firestore Security Rules enforce schema validation and access control
- Node.js 20+
- A Firebase project (firebase.google.com)
- A Cloudinary account (cloudinary.com)
git clone <your-repo-url>
cd nextbench-1
npm installCopy .env.example to .env and fill in your values:
cp .env.example .envYou need:
- Firebase: Go to Firebase Console → Project Settings → Your App → SDK Config. Copy
apiKey,authDomain, andprojectId. - Cloudinary: Go to Cloudinary Dashboard → Settings → Upload. Create an unsigned upload preset and copy your Cloud Name + Preset Name.
- Enable Google Sign-In in Firebase Console → Authentication → Sign-in method.
- Create a Firestore Database in Firebase Console → Firestore Database.
- Go to Firestore → Rules tab and paste the contents of
firestore.rulesfrom this repo. Click Publish.
After your first user signs up:
- Go to Firebase Console → Firestore Database →
userscollection. - Find the user document and manually set:
isAdmin: trueverified: trueverificationStatus: "approved"
npm run devOpen http://localhost:5173.
See VERCEL_SETUP.md for step-by-step deployment instructions.
src/
├── App.tsx # Routes
├── main.tsx # Entry point
├── index.css # Global styles & design tokens
├── mockData.ts # Category list for product forms
├── components/
│ ├── layout/
│ │ ├── Navbar.tsx
│ │ └── Footer.tsx
│ └── ui/
│ ├── Loader.tsx # Reusable loading spinner
│ ├── NotificationBell.tsx
│ └── ProtectedRoute.tsx # Auth/role guard
├── lib/
│ ├── firebase.ts # Firebase init
│ ├── AuthContext.tsx # Auth state provider
│ ├── ToastContext.tsx # Toast notification system
│ ├── storage.ts # Cloudinary upload helpers
│ ├── notifications.ts # In-app notification helpers
│ ├── firestore-errors.ts # Firestore error handler
│ └── utils.ts # Misc utilities
└── pages/
├── LandingPage.tsx
├── Auth/
│ ├── Login.tsx
│ ├── Signup.tsx
│ └── Verification.tsx # ID upload + selfie flow
└── Dashboard/
├── Marketplace.tsx
├── ProductDetail.tsx
├── SellItem.tsx
├── Profile.tsx
├── ChatList.tsx
├── ChatRoom.tsx
├── Wishlist.tsx
├── Notifications.tsx
└── AdminPanel.tsx # User verification + listing moderation
Private project. All rights reserved.