Welcome to the CampusMart Bug Bounty Program! This is a hands-on learning project designed to help students develop real-world debugging and problem-solving skills by fixing bugs in a production-like Next.js e-commerce application.
- About the Project
- What is CampusMart?
- Learning Objectives
- Technology Stack
- Prerequisites
- Getting Started
- Bug Fixing Workflow
- Available Bugs (Batch 1)
- How to Approach Each Bug
- Testing & Verification
- Submission Guidelines
- Resources
- Support
This Bug Bounty program contains 15 carefully documented bugs across different categories:
- UI/UX Issues - Responsive design, browser compatibility
- Authentication & Security - Form validation, session management
- Code Quality - Refactoring, best practices
- Features - Missing components, enhancements
Each bug is documented with:
- β Severity Level (Critical, High, Medium, Low)
- β Exact Location (File paths and line numbers)
- β Expected vs Actual Behavior
- β Step-by-step Reproduction
- β Hints for Resolution
CampusMart is a college marketplace platform built with Next.js that allows students to:
- Buy and sell products within their campus
- Browse listings by category
- Manage user authentication (buyers and sellers)
- View product details and seller information
This is a real-world application with intentional bugs for educational purposes.
By completing this bug bounty, you will:
-
Master Debugging Skills
- Learn to read error messages and stack traces
- Use browser DevTools effectively
- Understand common web development pitfalls
-
Improve Code Quality
- Apply DRY (Don't Repeat Yourself) principles
- Refactor code for maintainability
- Follow React and Next.js best practices
-
Enhance Problem-Solving
- Analyze root causes systematically
- Test solutions thoroughly
- Document your changes
-
Gain Real-World Experience
- Work with production-like codebases
- Fix responsive design issues
- Implement security best practices
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 16.1.3 | React framework with App Router |
| React | 19.1.1 | UI library |
| MongoDB | 6.18.0 | Database |
| Mongoose | 8.17.1 | ODM for MongoDB |
| Tailwind CSS | 3.4.17 | Styling framework |
| NextAuth | 5.0.0-beta.25 | Authentication |
| Framer Motion | 12.23.12 | Animations |
| Lucide React | 0.536.0 | Icon library |
Before you begin, ensure you have:
- Node.js (v18 or higher) - Download here
- npm (comes with Node.js)
- Git - Download here
- Code Editor (VS Code recommended) - Download here
- MongoDB (local or Atlas account) - Setup guide
- Basic knowledge of:
- JavaScript/React
- HTML/CSS
- Git basics
git clone <repository-url>
cd Bug-Bountynpm installCreate a .env.local file in the root directory:
# MongoDB Connection
MONGODB_URI=your_mongodb_connection_string
# NextAuth Configuration
NEXTAUTH_SECRET=your_secret_key_here
NEXTAUTH_URL=http://localhost:3000
# Other configurations as needednpm run devOpen http://localhost:3000 in your browser.
- β Homepage loads without errors
- β Navigation works
- β Can access login/registration pages
Follow this systematic approach for each bug:
Open BUGS.md and select a bug to fix. Each bug includes:
- Category and Severity
- Description of the issue
- Location (exact files and line numbers)
- Expected vs Actual Behavior
- Steps to Reproduce
- Hints for resolution
- Follow the "Steps to Reproduce" exactly
- Observe the actual behavior
- Confirm the bug exists
- Take screenshots/notes if helpful
-
Create a new branch for your fix:
git checkout -b fix/bug-<number>-<short-description>
Example:
git checkout -b fix/bug-1-hero-mobile-overlap -
Make your changes following the guide
-
Test your fix thoroughly
-
Commit with a descriptive message:
git add . git commit -m "Fix Bug #1: Resolve hero section overlap on mobile"
Create your own verification checklist:
- β Bug no longer occurs
- β No new bugs introduced
- β Code follows best practices
- β Works across different browsers/devices (if applicable)
Add comments explaining:
- What was broken
- Why it was broken
- How you fixed it
- Bug #11: User Session Not Persisting After Refresh
- Bug #2: Missing Field Validation for Registration Form
- Bug #3: "Forgot Password" Link Redirects to 404
- Bug #1: Overlapping Text in Hero Section on Mobile
- Bug #6: Missing Unique Key Prop in Seller List
- Bug #8: Header Logo Distortion on Safari
- Bug #10: Missing Loading Spinner Component
- Bug #12: API URLs Hardcoded in Components
- Bug #14: Footer Links Not Clickable on Small Screens
- Bug #4: Navbar Code Duplication
- Bug #5: Missing "Show/Hide Password" Toggle in Login
- Bug #7: Inconsistent Button Styles
- Bug #9: README Installation Instructions Incorrect
- Bug #13: Missing Custom 404 Error Page
- Bug #15: Incorrect Primary Color in Tailwind Config
Total Bugs in Batch 1: 15 bugs
- Use browser DevTools (F12)
- Toggle device toolbar for mobile testing
- Inspect CSS styles and layout
- Test on multiple screen sizes
- Check browser compatibility
- Review authentication flow
- Check form validation logic
- Test with valid/invalid inputs
- Verify token storage and retrieval
- Test session persistence
- Identify code duplication
- Extract reusable components
- Create centralized configurations
- Follow DRY principles
- Ensure consistency across codebase
- Research best practices
- Create new components
- Implement with proper styling
- Integrate into existing pages
- Test thoroughly
For each bug fix, verify:
- Functionality: Bug is completely resolved
- No Regressions: No new bugs introduced
- Cross-Browser: Works in Chrome, Firefox, Safari
- Responsive: Works on mobile, tablet, desktop
- Accessibility: Keyboard navigation, screen readers
- Performance: No significant slowdowns
Test your fixes in:
- β Chrome (latest)
- β Firefox (latest)
- β Safari (if available)
- β Mobile browsers (Chrome Mobile, Safari iOS)
Test responsive issues on:
- β Desktop (1920px+)
- β Laptop (1366px)
- β Tablet (768px)
- β Mobile (375px, 320px)
Always check browser console for:
- β No errors
- β No warnings
- β No React key warnings
-
Code Changes
- All modified files
- New files created
- Proper Git commits
-
Documentation
- Brief description of your fix
- Any challenges faced
- Screenshots (before/after) for UI bugs
-
Testing Evidence
- List of tests performed
- Browser/device compatibility results
Create a pull request with:
Title: Fix Bug #<number>: <Short Description>
Description Template:
## Bug Fixed
Bug #<number>: <Bug Title>
## Changes Made
- Modified: <list of files>
- Created: <list of new files>
- Deleted: <list of removed files>
## Root Cause
<Brief explanation of what caused the bug>
## Solution
<How you fixed it>
## Testing Performed
- [ ] Manual testing
- [ ] Cross-browser testing
- [ ] Responsive testing
- [ ] Console error check
## Screenshots
<Before and after screenshots for UI bugs>
## Notes
<Any additional information>BUGS.md- Complete bug list with detailsBUG_FIX_GUIDE.md- Detailed fix instructionsTECHNICAL_DOCUMENTATION.md- System architecture
-
Read the Documentation First
- Check
BUGS.mdfor bug details and hints - Search
TECHNICAL_DOCUMENTATION.mdfor architecture info - Review the bug description carefully
- Check
-
Debug Systematically
- Use console.log() to trace execution
- Check browser console for errors
- Use React DevTools to inspect components
-
Ask for Help
- Describe what you've tried
- Share error messages
- Provide code snippets
- Include screenshots
Issue: npm install fails
- Solution: Delete
node_modulesandpackage-lock.json, then runnpm installagain
Issue: MongoDB connection error
- Solution: Verify
MONGODB_URIin.env.localis correct
Issue: Port 3000 already in use
- Solution: Kill the process or use a different port:
npm run dev -- -p 3001
Issue: Changes not reflecting
- Solution: Hard refresh (Ctrl+Shift+R) or restart dev server
- Start with Low Priority Bugs: Build confidence before tackling critical issues
- Read Code Carefully: Understand the context before making changes
- Test Thoroughly: Don't just fix the bug, ensure nothing else breaks
- Document Your Work: Future you (and others) will thank you
- Learn from Each Bug: Each fix teaches you something new
- Don't Rush: Quality over speed
- Ask Questions: No question is too small
You've successfully completed the Bug Bounty when:
- β All 15 valid bugs are fixed
- β All verification checklists pass
- β No console errors or warnings
- β Code follows best practices
- β Documentation is complete
- β All tests pass
This project is for educational purposes only.
Thank you for participating in the CampusMart Bug Bounty Program! Your contributions help improve the platform and enhance your development skills.
Happy Bug Hunting! ππ
Last Updated: January 2026
Version: 1.0.0
Batch: 1 (Core Foundation & Auth)