Bangladesh's first digital student notes marketplace — buy, sell, and download high-quality academic materials with a secure wallet-based payment system.
NoteBazar connects students across Bangladesh's universities. Sellers upload PDFs of their notes, past papers, and lecture summaries. Buyers browse, purchase with wallet credits, and instantly download watermarked copies. A 10% platform fee is deducted on every sale; sellers receive the remaining 90% directly to their in-app wallet and can withdraw to bKash.
- Full-text search by title, description, or course code
- Filter by university, department, and course
- Preview listing details, seller rating, and reviews before purchasing
- One-click purchase using wallet balance
- Watermarked PDF download after purchase
- Leave a star rating and written review on purchased items
- Report low-quality or inappropriate content
-
Upload PDF notes with a cover image and metadata
-
Set your own price (minimum ৳20)
-
Subscription-based listing limits (rolling 30-day window):
Plan Listings / 30 days Free 3 Starter 10 Pro 20 -
Monitor downloads, ratings, and earnings per listing
-
Withdraw earnings to bKash (minimum ৳100)
- Dashboard with revenue, user, and transaction metrics
- Approve or reject bKash recharge and withdrawal requests
- Review and action user-submitted content reports
- Manage users: ban, verify, and update roles
| Layer | Technology |
|---|---|
| Frontend | React 19 + React Router v7 |
| Build | Vite 8 |
| Styling | Tailwind CSS v4 + CSS custom properties |
| Backend | Supabase (PostgreSQL, Auth, Storage) |
| PDF Handling | pdfjs-dist v5 |
| Analytics | Vercel Analytics & Speed Insights |
| Deployment | Vercel |
| Testing | Vitest + @testing-library/react |
notebazar/
├── src/
│ ├── components/ # Shared UI (Navbar, ListingCard, SkeletonCard, ...)
│ ├── hooks/ # Custom hooks (useAuth, useListings, useWallet, useReviews)
│ ├── lib/ # Supabase client, contexts (Auth, Theme, Toast), utilities
│ ├── pages/ # Route-level pages
│ │ ├── admin/ # Admin dashboard (Dashboard, Reports, Withdrawals, Users)
│ │ └── ... # Home, Browse, Upload, Wallet, Profile, Auth pages
│ └── __tests__/ # Unit & integration tests
├── supabase/
│ └── schema.sql # Full PostgreSQL schema — run once in Supabase SQL Editor
├── public/
├── vercel.json
└── vite.config.js
- Node.js 18+
- A Supabase project
git clone https://github.com/your-username/notebazar.git
cd notebazar
npm installCopy the example file and fill in your values:
cp .env.example .env
VITE_SUPABASE_URL=https://your-project.supabase.co VITE_SUPABASE_ANON_KEY=your-anonymous-api-key
Get these from your Supabase project under Settings → API. All variables must use the VITE_ prefix to be exposed to the browser via import.meta.env.
Run supabase/schema.sql in the Supabase SQL Editor. This creates all tables, RLS policies, storage buckets, and stored procedures.
To grant yourself admin access:
UPDATE public.profiles SET is_admin = true WHERE email = 'your@email.com';
npm run dev
The app runs at http://localhost:5173.
| Script | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run preview |
Preview production build locally |
npm run test |
Run tests once |
npm run test:watch |
Run tests in watch mode |
npm run test:coverage |
Generate coverage report |
npm run lint |
Run ESLint |
Key tables:
| Table | Purpose |
|---|---|
profiles |
User accounts, wallet balance, subscription tier |
listings |
Notes for sale — price, file URL, ratings summary |
transactions |
Full payment ledger (recharge, purchase, earning, withdrawal) |
orders |
Purchase records with watermark metadata and download URL |
reviews |
Star ratings and comments (one per user per listing) |
reports |
Content moderation queue |
withdrawals |
Seller cashout requests |
Notable database features:
- Full-text search on listings via
tsvectorwith English stemming - Row-level security (RLS) on every table — users access only their own data; admins see all
- Atomic purchase procedure (
purchase_listing) — splits the platform fee, creates the order, and writes the watermark text in a single transaction - Auto-rating trigger — recalculates a listing's average rating on every review insert, update, or delete
- Listing limit enforcement (
check_listing_limit) — blocks uploads when a seller's plan limit is reached
| Bucket | Access | Max Size | Contents |
|---|---|---|---|
notes |
Private | 10 MB | Uploaded PDFs (accessible only to seller and buyers after purchase) |
images |
Public | 5 MB | Cover images and PDF thumbnails |
The project is configured for one-click Vercel deployment.
- Push the repository to GitHub (
.envis gitignored and never committed). - Import the project in the Vercel dashboard → Add New Project.
- Add
VITE_SUPABASE_URLandVITE_SUPABASE_ANON_KEYunder Environment Variables. - Click Deploy — Vercel auto-detects Vite and applies the correct build settings.
vercel.json rewrites all unmatched paths to /index.html so direct navigation to routes like /listing/123 or /admin works correctly.
Light and dark modes are supported out of the box. Themes are controlled via CSS custom properties (--nb-*) applied to the <html> element. The active theme is stored in localStorage with a system-preference fallback, and toggled through ThemeContext in src/lib/ThemeContext.jsx.
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit your changes following the existing commit style
- Open a pull request against
master
Please run npm run lint and npm run test before submitting.