The idea for Purestock stemmed from witnessing the inefficiencies in India's agricultural supply chain during a family visit to rural farms. Farmers often struggle with market access, delayed payments, and high waste due to poor demand forecasting, while urban consumers face inconsistent quality and high prices for fresh produce. Inspired by successful platforms like BigBasket and FarmLink, I wanted to create a full-stack SaaS solution that bridges this gap, empowering small farmers and delivering traceable, sustainable food options. The growing demand for healthy, subscription-based meals post-pandemic further fueled the vision, aiming to reduce food waste (estimated at 40% globally) and promote eco-friendly practices through technology.
What I Learned Building Purestock was a deep dive into agritech and SaaS development, teaching me valuable lessons across multiple domains:
Technical Skills: I gained proficiency in full-stack development, mastering React.js for dynamic UIs, Node.js/Express.js for scalable backends, and MongoDB for flexible data handling. Integrating AI for demand forecasting introduced me to TensorFlow.js, while working with IoT simulations highlighted real-time data challenges.
Domain Knowledge: I learned about supply chain logistics, including FEFO/FIFO inventory methods and blockchain-inspired traceability, emphasizing the importance of regulatory compliance like FSSAI standards in food tech.
User-Centric Design: Through iterative prototyping, I understood the need for accessible interfaces, such as simplified farmer apps for low-digital-literacy users and personalized consumer dashboards.
Project Management: Agile methodologies helped manage scope, reinforcing that assumptions (e.g., stable farmer connectivity) must be validated early to avoid pivots.
Sustainability Insights: Researching environmental impacts taught me how features like carbon footprint tracking can drive user engagement and align with global goals like reducing agricultural emissions.
These insights not only enhanced my technical toolkit but also underscored the blend of empathy and innovation needed for impactful solutions.
How I Built Purestock Purestock was developed from scratch as a microservices-based SaaS platform, focusing on seamless integration from farm collection to consumer delivery. Here's a step-by-step overview:
Technology Stack Frontend: React.js with Redux for state management and Tailwind CSS for a clean, organic-themed UI (greens and earth tones to evoke freshness).
Backend: Node.js/Express.js for RESTful APIs, with Socket.io enabling real-time features like order tracking.
Database: MongoDB for schemas handling users, products, orders, inventory, and subscriptions, with Mongoose for validation.
Additional Tools: AWS S3 for image storage, Stripe for payments, Google Maps API for logistics, and TensorFlow.js for AI-driven forecasting.
Key Building Steps Database Design: Created collections for users (with roles like farmer or consumer), products (categorized as vegetables, fruits, or meals), and orders, incorporating fields for traceability like batch numbers and sensor data.
Backend Logic: Implemented endpoints for authentication (JWT), product management, order processing, and analytics. Added cron jobs for subscription scheduling and webhooks for B2B integrations.
Frontend Pages: Built responsive pages including a homepage with traveling animation, farmer onboarding wizard, subscription builder, and dashboards for tracking and sustainability metrics.
Advanced Features: Integrated AI for demand prediction using historical data and weather APIs; simulated IoT for warehouse monitoring; ensured PWA capabilities for offline access.
Testing and Deployment: Used Jest for unit tests, Cypress for end-to-end, and deployed via Docker on AWS for scalability.
The build emphasized modularity, allowing easy additions like new meal plans or AR previews.
Challenges Faced Despite careful planning, several obstacles tested the project's resilience:
Technical Integration Hurdles: Merging AI models with real-time IoT data was complex, requiring multiple iterations to handle inconsistent rural connectivity and ensure accurate forecasting without overfitting.
Scope Management: Balancing ambitious features (e.g., full blockchain traceability) within hackathon timelines led to prioritizing an MVP, deferring advanced elements like VR farm tours.
Data and Compliance Issues: Sourcing reliable produce data for simulations and ensuring FSSAI compliance added delays, as mock datasets risked inaccuracies in quality grading algorithms.
User Adoption Risks: Designing for diverse users (e.g., tech-savvy consumers vs. rural farmers) revealed accessibility gaps, addressed through simplified interfaces but highlighting the need for extensive beta testing.
Resource Constraints: As a solo developer, time and budget limitations for premium tools (e.g., advanced ML libraries) forced creative workarounds, like using open-source alternatives.
Built With
- amazon-web-services
- css
- docker
- express.js
- framer-motion
- github
- google-maps
- html
- javascript
- jest
- mongoose
- node.js
- react.js
- stripe
- supabase
- tailwind-css
- tensorflow.js
- twilio
- vercel
Log in or sign up for Devpost to join the conversation.