DECLUTTR is a secure, user-friendly web platform that enables users to declutter their spaces by selling or donating used items. Built with modern web technologies, it addresses the challenges of unsafe online marketplaces by providing admin verification, secure transactions, and seamless buyer-seller communication.
Presenter: Mary Ann Wangechi Koome
Institution: Dedan Kimathi University of Technology
Course: BSc. Computer Science
Date: December 2025
- Next.js 15+ (App Router with TypeScript)
- TypeScript - Type safety
- Tailwind CSS - Styling
- Framer Motion - Smooth animations
- Lucide React - Beautiful icons
- Node.js & Express - API server
- PostgreSQL - Database
- JWT - Authentication
decluttr/
βββ app/ # Next.js App Router
β βββ (auth)/ # Auth route group (no navbar)
β β βββ login/
β β β βββ page.tsx # Login page
β β βββ signup/
β β βββ page.tsx # Signup page
β β
β βββ (main)/ # Main app routes (with navbar)
β β βββ layout.tsx # Layout with navbar
β β βββ marketplace/
β β β βββ page.tsx # Main marketplace/landing (after login)
β β βββ cart/
β β β βββ page.tsx # Shopping cart
β β βββ messages/
β β β βββ page.tsx # Messaging system
β β βββ dashboard/
β β β βββ page.tsx # User dashboard (profile)
β β βββ list-item/
β β β βββ page.tsx # Add/list products
β β βββ checkout/
β β β βββ page.tsx # Payment page
β β βββ admin/
β β βββ page.tsx # Admin dashboard
β β
β βββ layout.tsx # Root layout
β βββ page.tsx # Home/landing page (unauthenticated)
β βββ globals.css # Global styles
β
βββ components/ # Reusable components
β βββ ui/ # UI primitives
β β βββ button.tsx
β β βββ input.tsx
β β βββ card.tsx
β β βββ dialog.tsx
β βββ navbar.tsx # Main navigation
β βββ product-card.tsx # Product display card
β βββ search-bar.tsx # Search component
β βββ category-filter.tsx # Category filtering
β βββ chat-interface.tsx # Messaging UI
β
βββ lib/ # Utility functions
β βββ api.ts # API calls
β βββ utils.ts # Helper functions
β βββ validators.ts # Zod schemas
β
βββ types/ # TypeScript types
β βββ index.ts # Type definitions
β
βββ public/ # Static assets
β βββ favicon.ico
β βββ logo.svg
β βββ images/
β
βββ hooks/ # Custom React hooks
β βββ use-auth.ts
β βββ use-cart.ts
β
βββ package.json
- Route:
app/page.tsx - Access: Public (no login required)
- Features:
- Hero section with "Get Started" CTA
- Search bar (redirects to marketplace with search results)
- Login button β
/login - Clean, welcoming design with animations
- Route:
app/(auth)/login/page.tsx - Access: Public
- Features:
- Email/Username + Password fields
- Form validation
- Redirect to
/marketplaceon success - "Don't have an account?" link β
/signup
- Route:
app/(auth)/signup/page.tsx - Access: Public
- Features:
- Fields: Name, Username, Email, Password, Confirm Password, Location (dropdown), Phone Number
- Form validation (passwords must match)
- Redirect to
/loginafter successful signup - "Already have an account?" link β
/login
- Route:
app/(main)/marketplace/page.tsx - Access: Authenticated users (main hub after login)
- Features:
- Navbar: Search, Home, Messages, Cart, My Profile, Logout
- Category tabs: Books, Electronics, Shoes, Clothes, Furniture, All Products
- Filter: All, Resale Only, Donation Only
- Product grid: 2 rows Γ 3 columns with pagination (Prev/Next)
- Product Card: Image, Name, Seller Username, Type (Resale/Donation), Price, "Add to Cart" button
- If accessed via search (without login) β prompt to login
- Route:
app/(main)/cart/page.tsx - Access: Authenticated users
- Features:
- List of added items (image, name, seller, type, price)
- Shipping address (default: signup location, editable dropdown)
- Shipping fee: KSh 600 (default)
- Grand Total = Item Total + Shipping
- "Proceed to Checkout" button β
/checkout
- Route:
app/(main)/checkout/page.tsx - Access: Authenticated users
- Features:
- M-Pesa number input (pre-filled with signup phone)
- Amount (auto-filled from cart)
- "Proceed to Pay" button triggers M-Pesa STK push
- Route:
app/(main)/messages/page.tsx - Access: Authenticated users
- Features:
- Two-column layout:
- Left: Recent chats list
- Right: Active conversation with timestamps
- Message input at bottom
- Real-time updates (future: WebSocket)
- Two-column layout:
- Route:
app/(main)/list-item/page.tsx - Access: Authenticated users
- Features:
- Two-column layout:
- Left sidebar: User info, "Add Products", "Messages", "Logout"
- Right: Form to list item
- Form fields:
- Category (dropdown: 5 categories)
- Product Name
- Description
- Image Upload (multiple images)
- Listing Type (Resale/Donation)
- Price (if Resale)
- "Add Product" button saves item
- Two-column layout:
- Route:
app/(main)/profile/page.tsx - Access: Authenticated users
- Features:
- Two-column layout:
- Left: User details sidebar (Name, Email, Location, buttons)
- Right: 3 sections
- Stats cards: Total Income (KSh), Total Exchanges, User Ratings
- Listed Items table: Name, Photo, Category, Type, Price, Order Status
- Recent Orders table: Name, Category, Type, Receiver, Status
- Two-column layout:
- Route:
app/(main)/admin/page.tsx - Access: Admin users only
- Features:
- Two-column layout:
- Left: Admin info sidebar
- Right: 3 sections
- Stats cards: Total Exchanges, Pending Orders, Pending Deliveries
- Recent Orders table: Name, Category, Type, Seller, Receiver, Status, Order Details
- Admin verification and moderation tools
- Two-column layout:
-
Unauthenticated users:
- Can view home page (
/) - Can search (results show in marketplace, but must login to add to cart)
- Redirected to
/loginwhen accessing protected routes
- Can view home page (
-
Authenticated users:
- Full access to marketplace, cart, messages, dashboard, list-item
- Navbar persists across all main routes
- Session managed via JWT tokens
-
Admin users:
- All user permissions + access to
/admindashboard
- All user permissions + access to
- Secure Registration & Login with validation
- Product Listing with images, categories, resale/donation options
- Search & Filter by category and listing type
- Shopping Cart with dynamic total calculation
- M-Pesa Integration for secure payments
- Real-time Messaging between buyers and sellers
- User Dashboard with sales analytics and order tracking
- Admin Dashboard with platform-wide analytics
- Product Verification before listings go live
- Order Moderation and status tracking
- User Management
- Responsive Design - Works on mobile, tablet, desktop
- Smooth Animations - Framer Motion page transitions and interactions
- Modern UI - Clean, intuitive interface with Tailwind CSS
- Icon System - Lucide React for consistent, beautiful icons
- Dark/Light Mode - User preference support (optional)
- Node.js 18+ installed
- npm/yarn/pnpm package manager
- Backend API running (separate repository)
# Clone the repository
git clone <repository-url>
cd decluttr
# Install dependencies
npm install
# Create .env.local file
cp .env.example .env.local
# Add your environment variables
# NEXT_PUBLIC_API_URL=http://localhost:5000
# NEXT_PUBLIC_MPESA_CONSUMER_KEY=your_key
# NEXT_PUBLIC_MPESA_CONSUMER_SECRET=your_secret
# Run development server
npm run dev
# Open http://localhost:3000npm run build
npm start{
"dependencies": {
"next": "^15.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"typescript": "^5.3.0",
"tailwindcss": "^3.4.0",
"framer-motion": "^11.0.0",
"lucide-react": "^0.460.0",
"react-hook-form": "^7.49.0",
"zod": "^3.22.0",
"@hookform/resolvers": "^3.3.0",
"axios": "^1.6.0",
"zustand": "^4.4.0"
}
}- Primary: Emerald/Green (sustainability, fresh start)
- Secondary: Blue (trust, security)
- Accent: Orange (call-to-action)
- Neutral: Gray scale
- Headings: Bold, modern sans-serif
- Body: Clean, readable sans-serif
- Code/Numbers: Monospace
- Minimal but functional - No over-engineering
- Reusable UI components - Button, Input, Card, etc.
- Consistent spacing - Tailwind's spacing scale
- Accessible - Proper ARIA labels and keyboard navigation
POST /api/auth/signup- User registrationPOST /api/auth/login- User loginPOST /api/auth/logout- User logout
GET /api/products- Fetch all products (with filters)GET /api/products/:id- Fetch single productPOST /api/products- Create product listingPUT /api/products/:id- Update productDELETE /api/products/:id- Delete product
GET /api/cart- Get user's cartPOST /api/cart- Add item to cartDELETE /api/cart/:itemId- Remove item from cart
POST /api/orders- Create orderGET /api/orders- Get user's ordersGET /api/orders/:id- Get order details
GET /api/messages- Get user's conversationsPOST /api/messages- Send messageGET /api/messages/:conversationId- Get specific conversation
POST /api/payments/mpesa- Initiate M-Pesa paymentPOST /api/payments/callback- M-Pesa callback
/* Tailwind CSS breakpoints */
sm: 640px // Mobile landscape
md: 768px // Tablet
lg: 1024px // Desktop
xl: 1280px // Large desktop
2xl: 1536px // Extra large- WebSocket integration for real-time messaging
- Push notifications for new messages/orders
- Advanced search with autocomplete
- Product reviews and ratings
- Favorites/Wishlist feature
- Email notifications
- Multi-language support
- Progressive Web App (PWA)
- Browse products
- List items
- Buy items
- Message sellers
- Manage orders
- All user permissions
- Verify product listings
- Moderate content
- View platform analytics
- Manage users