Project Overview
CampusMart is a hyper-localized, mobile-first marketplace built to organize student trade within Nigerian higher education institutions. The system enables students to buy and sell textbooks, electronics, dorm essentials, fashion items, and campus services safely inside their own university ecosystem.
Starting with three premier institutions in Lagos State—University of Lagos (UNILAG) in Akoka, Yaba College of Technology (YABATECH) in Yaba, and Lagos State University (LASU) in Ojo—CampusMart replaces ephemeral social media chats with structured product indexing, campus hostel filtering, and transparent seller accountability.
The Problem Solved
Commerce in Nigerian universities is massive but severely fragmented. Students rely on informal WhatsApp groups, temporary status updates, and scattered Telegram channels:
✕ The Fragmentation Challenges
- Ephemeral Content: WhatsApp group messages and status posts disappear within 24 hours, burying products beneath unrelated group chatter.
- Zero Search Capability: A student looking for a specific engineering textbook or mini-fridge cannot search or filter by hostel location or price.
- Campus Scam Vulnerabilities: Anonymous sellers without institutional attribution exploit informal groups with fake deposit requests.
- Poor Seller Analytics: Student entrepreneurs have no visibility into how many peers viewed their products or initiated buying inquiries.
✓ The CampusMart Solution
- Structured Catalog & Search: Persistent searchable listings with 14 categories, condition filters, and campus-specific location tags.
- Verified Student Profiles: Department, academic level, and campus attribution attached to every seller profile.
- Direct WhatsApp Handoff: One-click click-to-chat pre-filling listing titles and recording buyer engagement metrics.
- Administrative Moderation: Moderation queue where all newly submitted listings enter a pending status to prevent spam and scams.
The Solution Developed
CampusMart provides a cohesive, end-to-end commerce experience designed around student browsing habits on budget smartphones:
Discovery & Dynamic Search
Live search with keyword regex escaping (preventing ReDoS), multi-campus toggling, price range slider, and bottom-sheet mobile filter drawer.
Smart WhatsApp Integration
Deep link button pre-populating inquiry messages directly into the seller's WhatsApp while incrementing platform engagement telemetry.
Student Seller Dashboard
Inventory management for creating, editing, and marking items as sold, alongside real metrics on views and buyer interaction clicks.
Admin Moderation Console
Pending review approval workflows, suspicious listing reports, user suspension tools, and real-time campus statistics.
Core Implemented Features
- Dynamic Campus Architecture: Built to seamlessly expand beyond UNILAG, YABATECH, and LASU to any Nigerian institution (e.g., OAU, UI, FUTA, LASUED) via database configuration without code changes.
- Anti-ReDoS Safe Search: Sanitized regex utility escaping special characters in search queries to prevent catastrophic regex backtracking attacks.
- Interactive Image Uploader: Multi-image client previews with instant removal and Cloudinary cloud CDN integration.
- Favorites & Wishlist Management: Persistent user favorites saved to MongoDB with instantaneous optimistic UI toggling.
- Automated Telemetry: Automatic view counter increments and click-tracking endpoints (
whatsappClicks,phoneClicks). - Insecure Direct Object Reference (IDOR) Protection: Strict server-side ownership verification ensuring sellers can only modify or delete their own listings.
System Architecture & Data Models
CampusMart is engineered with a clean modular separation between frontend presentation, API controllers, and database models:
User (institutional email, department, level), Listing (campus, category, price, images, moderation status), Campus, Category, Report.My Technical Contributions
- End-to-End System Design: Architected both the client and server applications from scratch, structuring models, routes, and controllers.
- Mobile-First UI/UX: Designed an intuitive, touch-friendly interface featuring bottom sheets, sticky filters, responsive image carousels, and one-tap WhatsApp inquiry triggers.
- Backend Security & Authorization: Implemented JWT authentication, password reset token lifecycles, and IDOR prevention guards on all mutation endpoints.
- Search & Query Optimization: Engineered MongoDB indexing across
campus,category, andstatus, enabling sub-20ms multi-parameter queries. - Automated Test Automation: Authored and verified the 104-assertion automated test suite executing across 22 feature suites using Node.js and MongoMemoryServer.
Technology Stack
Engineering Decisions & Security Measures
User input in search fields can be weaponized with catastrophic regular expressions (e.g. nested quantifiers like (a+)+$) causing server event-loop stalls. I implemented a strict character escaping helper before passing search terms into MongoDB $regex filters, ensuring guaranteed linear execution time.
Building an in-app chat system creates delivery delays, push-notification reliability issues, and battery drain on low-end Android phones. By delegating conversations directly to WhatsApp via pre-filled URLs while tracking clicks server-side, student buyers and sellers converse on the app they already check constantly, drastically increasing transaction close rates.
To eliminate default credential exploitation on initial deployment, the administrative authentication pipeline flags accounts with default credentials, blocking administrative queries until the root password is cryptographically updated.
Testing & Quality Assurance
CampusMart features an automated second-pass testing report containing 104 passed assertions across 22 distinct feature domains with a 100% success rate:
- System Health & Security Headers: HTTP 200 checks, X-Content-Type-Options: nosniff, and X-Frame-Options: DENY.
- Student Identity & Email Verification: Token generation, 403 blocks on unverified accounts, anti-replay guards, and duplicate prevention.
- Discovery, Filtering & Search: Multitasking filter pipelines across campus, categories, min/max price boundaries, and ReDoS injection immunity.
- IDOR Security on Listings: Validated that unauthorized users receive HTTP 403 when attempting to edit or delete another student's listing.
- WhatsApp Handoff Telemetry: Accurate atomic increments on seller engagement metrics.
Operational Value & Deliverables
CampusMart transforms fragmented campus commerce into a secure, structured digital economy. By removing barriers between student sellers and buyers, the platform empowers student micro-entrepreneurs, makes essential educational materials affordable, and provides campus communities with a safe trading marketplace.