Final Year Project | COMSATS University Islamabad, Sahiwal Campus | BS Computer Science | 2026
Lensify is a full-stack AI-powered eyewear e-commerce platform built for the Pakistani market. It features real-time Virtual Try-On using MediaPipe face detection, an AI chatbot powered by Llama 3.2, face shape based frame recommendations, and a complete e-commerce flow with Cash on Delivery.
🌐 https://lensify-psi.vercel.app
Test Accounts:
| Role | Password | |
|---|---|---|
| Customer | test@gmail.com | test123 |
| Admin | (set role to admin in MongoDB) | — |
- 🔐 Register / Login with JWT authentication
- 👓 Virtual Try-On — real-time AR glasses overlay using MediaPipe Face Mesh (468 landmarks)
- 🤖 AI Chatbot — powered by Llama 3.2 via Ollama
- 🎯 Face Shape Recommendations — rule-based frame suggestions
- 🛍️ Shop with filters — category, shape, price range, sorting
- 🛒 Cart & Checkout — Cash on Delivery
- 📦 Order Tracking — by unique LNF order number
- 👤 Profile management
- 📊 Dashboard — real revenue, orders, products stats
- 📦 Product management — add, edit, delete
- 🧾 Order management — update status
- 👥 Customer management
- 👔 Manager accounts — create and manage
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, TailwindCSS, TypeScript |
| Backend | Next.js API Routes |
| Database | MongoDB Atlas + Mongoose |
| Authentication | JWT + bcrypt |
| AI Chatbot | Ollama + Llama 3.2 |
| Virtual Try-On | MediaPipe Face Mesh |
| Deployment | Vercel + MongoDB Atlas |
- Node.js 18+
- MongoDB Atlas account
- Ollama installed (for AI chatbot)
1. Clone the repository
git clone https://github.com/Rughena/lensify.git
cd lensify2. Install dependencies
npm install3. Create .env.local file
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/lensify
JWT_SECRET=your-secret-key-here
NEXT_PUBLIC_API_URL=http://localhost:30004. Seed the database
# Run the dev server first, then visit:
http://localhost:3000/api/seed5. Start Ollama (for AI chatbot)
ollama serve6. Run the project
npm run dev7. Open browser http://localhost:3000
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Register new user |
| POST | /api/auth/login |
User login |
| GET | /api/auth/profile |
Get user profile |
| PUT | /api/auth/profile |
Update profile |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/products |
Get all products (with filters) |
| GET | /api/products/[id] |
Get single product |
| POST | /api/products |
Add product (admin) |
| PUT | /api/products/[id] |
Update product (admin) |
| DELETE | /api/products/[id] |
Delete product (admin) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/orders |
Get user orders |
| POST | /api/orders |
Create order |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/chat |
Send message to AI chatbot |
email, password (bcrypt hashed), firstName, lastName
phone, address, city, country, zipCode
role: customer | admin | manager
name, description, price (PKR), discount
category: men | women | unisex | contacts
shape: oval | round | square | rectangle | cat-eye | hexagon
color, brand, material, imageUrl, stock, rating, reviews
userId, orderNumber (LNF-XXXXXX-XXX format)
items[], totalAmount, status
shippingAddress, paymentMethod
lensify/
├── app/
│ ├── api/ # Backend API routes
│ ├── admin/ # Admin dashboard pages
│ ├── shop/ # Shop page
│ ├── try-on/ # Virtual Try-On page
│ ├── checkout/ # Checkout page
│ ├── payment/ # Payment page
│ └── dashboard/ # Customer dashboard
├── components/ # Reusable UI components
├── models/ # MongoDB Mongoose models
├── lib/ # Utility functions
└── public/ # Static assets & product images
📄 Full project report available in /docs/Lensify_FYP_Report.pdf
Rughena — BS Computer Science
COMSATS University Islamabad, Sahiwal Campus
GitHub: @Rughena
MIT