Product Requirements Document (PRD)
Comprehensive feature specification for the ScrapSmart scrap collection and recycling platform.
ScrapSmart is a full-stack digital platform that streamlines the process of scrap collection and recycling. It connects households/businesses (users) with scrap collectors (drivers) through a managed marketplace, overseen by platform administrators.
Key Value Propositions:
- Convenient doorstep scrap pickup scheduling for users
- Transparent, real-time scrap pricing per kilogram
- Live tracking of driver arrival and collection progress
- Verified driver network with KYC documentation
- Digital payment processing with receipts
- Centralized admin dashboard for operations management
| Role | Platform | Access Level | Key Capabilities |
|---|---|---|---|
| User | Mobile App (Flutter) | Customer | Schedule pickups, manage addresses, track drivers, view rates, make payments, rate service |
| Driver | Mobile App (Flutter) | Collector | Accept/reject pickups, navigate to locations, weigh scrap, capture photos, collect payments, track earnings |
| Admin | Web Dashboard (React) | Full access | Manage users, drivers, pickups, rates, payments, payouts, reports |
| Operations | Web Dashboard (React) | Limited admin | User management, driver verification, pickup assignment |
| Finance | Web Dashboard (React) | Limited admin | Payment processing, rate management, transaction exports |
| Super Admin | Web Dashboard (React) | Everything | All admin capabilities + admin account management |
Authentication & Onboarding
- ✓ OTP-based mobile login (+91)
- ✓ Email-based login option
- ✓ Social login (Google & Apple)
- ✓ App introduction/onboarding screens
- ✓ Auto-login with stored tokens
Pickup Scheduling
- ✓ 3-step pickup creation wizard
- ✓ Multi-category scrap selection (6 types)
- ✓ Weight input with real-time price estimate
- ✓ Photo upload (up to 5 images)
- ✓ 7-day date picker + time slot selection
Address Management
- ✓ Save multiple addresses (Home/Work/Other)
- ✓ Set default address
- ✓ Full CRUD for addresses
- ✓ Geocoded coordinates for each address
Tracking & Notifications
- ✓ Real-time driver location tracking
- ✓ Live pickup status updates (Socket.IO)
- ✓ Push notifications (Firebase)
- ✓ Notification history screen
- ✓ Rate & review completed pickups
Pricing & Payments
- ✓ Live scrap rate cards (per kg)
- ✓ Price estimator tool
- ✓ Payment tracking with receipts
- ✓ Bank account management
Profile & Support
- ✓ Profile photo upload
- ✓ Edit personal details
- ✓ Help & support section
- ✓ Terms & conditions / About us
Registration & Verification
- ✓ Driver onboarding flow
- ✓ KYC document upload (Aadhaar, PAN, License, Selfie)
- ✓ Verification status tracking
- ✓ OTP-based login
Pickup Management
- ✓ Accept or reject pickup requests
- ✓ Nearby pickups discovery
- ✓ Pickup detail view with customer info
- ✓ Online/Offline availability toggle
Collection Workflow
- ✓ Route navigation to pickup location
- ✓ Before/After photo capture
- ✓ Weight verification & recording
- ✓ Payment collection (Cash/UPI/Bank)
- ✓ Collection completion confirmation
Earnings & Profile
- ✓ Real-time earnings dashboard
- ✓ Daily earnings summary
- ✓ Payout history tracking
- ✓ Bank account management
- ✓ Working hours configuration
Dashboard & Analytics
- ✓ Total users, active drivers, daily pickups
- ✓ Month-to-date revenue overview
- ✓ Recent pickups feed
- ✓ Report generation (Daily, Performance, Revenue, Acquisition)
User & Driver Management
- ✓ Paginated user listing with search & filters
- ✓ Activate/Deactivate user accounts
- ✓ Driver KYC verification workflow
- ✓ Driver suspension management
Pickup Operations
- ✓ Full pickup lifecycle management
- ✓ Assign drivers to pending pickups
- ✓ Cancel pickups with reason
- ✓ Status-based filtering (9 statuses)
Finance & Rates
- ✓ Scrap rate CRUD (6 categories)
- ✓ Transaction listing & CSV export
- ✓ Driver payout processing
- ✓ Payout history tracking
Alternative paths: Assigned → Rejected (re-assign) | Any status → Cancelled (with reason)
| Category | Icon | Rate (₹/kg) | Min Qty | Examples |
|---|---|---|---|---|
| Paper | 📄 | ₹12 - ₹14 | 1 kg | Newspapers, books, office paper |
| Cardboard | 📦 | ₹8 | 2 kg | Boxes, packaging, cartons |
| Plastic | 🍺 | ₹10 - ₹15 | 1 kg | Bottles, containers, bags |
| Metal | 🔩 | ₹28 - ₹45 | 1 kg | Iron, aluminium, copper, steel |
| Electronics | 📱 | ₹20 - ₹25 | 1 kg | Wires, circuit boards, devices |
| Glass | 🍻 | ₹2 - ₹5 | 2 kg | Bottles, jars, window glass |
| Domain | Tables | Purpose |
|---|---|---|
| Users | users, user_addresses, user_bank_accounts | Customer accounts, delivery addresses, payment methods |
| Drivers | drivers, driver_documents, driver_earnings, driver_payouts | Collector accounts, KYC verification, earnings & payouts |
| Admin | admins | Admin accounts with role-based access |
| Pickups | pickups, pickup_categories, pickup_photos, pickup_status_history | Pickup requests, item details, photos, audit trail |
| Payments | payments | Transaction records with receipt generation |
| Rates | scrap_rates | Category pricing with rate history tracking |
| Support | support_tickets, support_messages | Customer support with ticket management |
| Notifications | notifications | Push notification records with read tracking |
| Service Areas | service_areas | Serviceable cities & pincodes |
| System | migrations | Database migration tracking |
| Module | Endpoints | Key Operations |
|---|---|---|
| Authentication | 8 | Send/Verify OTP, Admin login, Token refresh, Logout |
| Users | 12 | Profile CRUD, Address CRUD, Pickup history, Payments |
| Drivers | 22 | Profile, Documents, Availability, Pickup ops (10-step flow), Earnings |
| Pickups | 6 | Create, List, Assign, Rates, Time slots |
| Payments | 6 | Details, Receipts, Bank accounts CRUD |
| Rates | 4 | CRUD with rate history |
| Admin | 20+ | Dashboard, User/Driver/Pickup/Rate management, Transactions, Payouts |
Work Report & Progress
Development progress, completed milestones, and current project phase.
The platform has completed its MVP (Minimum Viable Product) phase. All core features across the backend, admin panel, user app, and driver app have been implemented, debugged, and stabilized. A release APK has been built and the admin panel has been compiled for deployment.
Backend & API
- ✓ Express.js REST API with 60+ endpoints
- ✓ PostgreSQL database with 19 tables
- ✓ JWT + OTP authentication system
- ✓ Role-based access control (6 roles)
- ✓ Socket.IO real-time event system
- ✓ Fast2SMS OTP integration
- ✓ Google Maps geocoding service
- ✓ Multer file upload handling
- ✓ Joi input validation
- ✓ Rate limiting & security headers
- ✓ Receipt generation (text & HTML)
- ✓ Database migrations & seed data
- ✓ Static page serving (landing, docs, notification tester)
- ✓ Upload file serving at /uploads
Mobile Apps (Flutter)
- ✓ User app: 20+ screens with GetX state management
- ✓ Driver app: 15+ screens with collection workflow
- ✓ OTP-based mobile authentication
- ✓ 3-step pickup scheduling wizard
- ✓ Real-time tracking (Socket.IO)
- ✓ Firebase push notifications
- ✓ Camera & gallery image picker
- ✓ Driver KYC document upload
- ✓ Earnings & payout tracking
- ✓ Material Design 3 theming
- ✓ Release APK built & packaged
Admin Panel (React)
- ✓ 8 dashboard pages
- ✓ User & driver management with filters
- ✓ Pickup lifecycle management
- ✓ Scrap rate CRUD with category cards
- ✓ Payment & payout processing
- ✓ Transaction CSV export
- ✓ Protected routes & JWT auth
- ✓ Tailwind CSS responsive UI
Integrations & Infra
- ✓ Fast2SMS (OTP delivery)
- ✓ Google Maps API (geocoding)
- ✓ Firebase Cloud Messaging
- ✓ Socket.IO (real-time events)
- ✓ Render PostgreSQL (production DB)
- ✓ Postman API collection
- ✓ Production migration scripts
- ✓ SSL/TLS support
- ✓ Render.com auto-deploy on push
- ✓ Static web pages served via Express
| Feature | Priority | Status | Details |
|---|---|---|---|
| Payment Gateway Integration | High | Planned | Razorpay/Paytm integration for UPI & bank transfers |
| Revenue Analytics Charts | Medium | Stub | Chart.js/Recharts for dashboard analytics |
| Report Generation | Medium | Stub | PDF export for daily, performance & revenue reports |
| iOS App Store Build | High | Planned | iOS-specific configurations & App Store submission |
| Automated Testing | Medium | Planned | Unit tests, integration tests, E2E tests |
| Multi-language Support | Low | Planned | Hindi, Telugu, and other regional languages |
| Redis Cache Layer | Medium | Planned | OTP storage, rate limiting, session caching |
| Docker Containerization | Low | Planned | Dockerized backend for CI/CD pipeline |
| Deliverable | Type | Status | Location |
|---|---|---|---|
| Backend API Server | Node.js Application | Deployed | scrapplatform.techlanditsolutions.com |
| PostgreSQL Database | Database | Deployed | Render (Virginia) |
| Admin Panel | React Web App | Built | admin-panel-react/dist.zip |
| User App APK | Android APK | Built | user-app-release.apk (54.8 MB) |
| Driver App | Flutter Source | Ready | driver-app-flutter/ |
| Postman Collection | API Documentation | Complete | postman/ directory |
| Database Migrations | SQL Scripts | Complete | backend-node/src/migrations/ |
| Project Documentation Page | Static HTML | Deployed | scrapplatform.techlanditsolutions.com/project-docs.html |
| Notification Tester | Static HTML | Deployed | scrapplatform.techlanditsolutions.com/push-notification-test.html |
Technology Stack & Installation Guide
Complete technical architecture, dependencies, and setup instructions.
Client Layer
Flutter / Dart
Flutter / Dart
React / Vite
Server Layer
REST API Server
Real-time Server
Data & Service Layer
Primary Database
OTP Service
Geocoding
Push Notifications
Backend
Frontend — Admin Panel
Frontend — Mobile Apps
External Services
Prerequisites
- ✓ Node.js v18+ (recommended: v24.x)
- ✓ PostgreSQL v15+ (local or cloud)
- ✓ npm v9+ (comes with Node.js)
- ✓ Git for cloning the repository
Step 1: Clone & Install
Step 2: Environment Configuration
Step 3: Database Setup
Step 4: Start Server
Prerequisites
- ✓ Node.js v18+
- ✓ npm v9+
Setup & Run
Default Admin Credentials
Prerequisites
- ✓ Flutter SDK v3.0+ (stable channel)
- ✓ Dart v3.0+
- ✓ Android Studio with Android SDK (for Android builds)
- ✓ Xcode (for iOS builds, macOS only)
- ✓ Firebase project configured with google-services.json
User App Setup
Driver App Setup
Firebase Configuration
| Environment | Base URL | Socket URL |
|---|---|---|
| Development | http://localhost:3001/api/v1 |
http://localhost:3001 |
| Production | https://scrapplatform.techlanditsolutions.com/api/v1 |
https://scrapplatform.techlanditsolutions.com |