DEV Community

Cover image for How I Built KisanX — A Full-Stack Agricultural Marketplace
Saniya
Saniya

Posted on

How I Built KisanX — A Full-Stack Agricultural Marketplace

How I Built KisanX — A Full-Stack Agricultural Marketplace (MERN + PHP + React Native)

By Saniya Farooqui | Full-Stack Developer | Mumbai


The Problem I Wanted to Solve

Indian farmers lose a significant portion of their income to middlemen every single day. They have no direct access to buyers, no way to discover fair prices, and no digital platform built specifically for them.

As a Computer Engineering student from Mumbai, I wanted to build something real — not just a todo app or a weather app. I wanted to build something that could actually matter.

That's how KisanX was born.


What is KisanX?

KisanX is a full-stack Direct-to-Consumer agricultural marketplace that connects Indian farmers directly with buyers — cutting out the middlemen entirely.

It has two parts:

  • A web application (PHP + MySQL) for the full marketplace experience
  • A mobile application (MERN + React Native) for farmers on the go

The result? Farmers can list their produce, set their own prices, and sell directly to buyers — all from their phone.


Tech Stack

Here's everything I used to build KisanX:

Web App (Phase 1):

  • PHP (server-side logic, routing, auth)
  • MySQL (relational database, CRUD operations)
  • HTML5, CSS3, JavaScript (frontend)
  • JWT Authentication
  • Deployed on Render

Mobile App (Phase 2):

  • React Native with Expo (cross-platform mobile)
  • Node.js + Express.js (REST API backend)
  • MongoDB + Mongoose (NoSQL database)
  • JWT Auth (secure login)
  • Deployed on Render

Tools:

  • Git & GitHub (version control)
  • Postman (API testing)
  • VS Code

Architecture Overview

The system has three types of users:

  1. Farmer — lists produce, sets price, manages orders
  2. Buyer — browses produce, places orders, tracks delivery
  3. Admin — manages platform, users, and disputes

Each role has its own dashboard and permissions, all controlled via JWT-based authentication.


Phase 1 — Building the Web App (PHP/MySQL)

I started with a traditional PHP/MySQL stack because I wanted the web version to be fast, lightweight, and accessible even on slow internet connections (which is common in rural India).

Key Features I Built:

  • Farmer registration and login
  • Product listing with images, price, quantity
  • Buyer browsing and search by category
  • Order placement and tracking
  • Admin dashboard for platform management
  • JWT-based secure authentication

Biggest Challenge:

Managing relational database design was tricky. I had to design tables for users, products, orders, and reviews — all linked properly with foreign keys. I learned a lot about normalization and query optimization here.


Phase 2 — Building the Mobile App (MERN + React Native)

After the web app, I built a React Native mobile app so farmers could manage their listings directly from their smartphones.

Key Features:

  • Cross-platform (Android support)
  • Real-time product listing management
  • Order notifications
  • Farmer and buyer dashboards
  • REST API integration with Node.js backend
  • MongoDB for flexible product data storage

What I Learned:

Building a React Native app from scratch taught me how to handle navigation, state management, API calls, and async operations — all at once. It was challenging but incredibly rewarding.


The Avishkar Moment 🏆

KisanX was selected and presented at the Avishkar Inter-Collegiate Research Convention, Mumbai University 2024-25 — one of the largest student research competitions in Maharashtra.

Being the sole developer — handling everything from architecture to API to UI to mobile to deployment — and then presenting it at a university-level research convention was a milestone I'll never forget.


What I Would Do Differently

Looking back, here's what I'd improve:

  1. Use TypeScript from day one — it would have caught so many bugs early
  2. Add proper error boundaries in React Native
  3. Use Docker for consistent deployment environments
  4. Write unit tests from the beginning, not at the end
  5. Design the database schema more carefully before writing a single line of code

Key Takeaways for Other Student Developers

If you're a student thinking about building a full-stack project, here's what I learned:

  • Build something real. A project that solves an actual problem is 10x more valuable than a tutorial clone.
  • Don't wait until you know everything. I learned PHP, MySQL, MERN, and React Native while building — not before.
  • Deploy early. Getting your project live (even if it's not perfect) teaches you more than any course.
  • Document everything. Future-you will thank present-you for good comments and a clear README.

The Result

KisanX is now a fully deployed, production-ready application with:

  • ✅ Web app (PHP/MySQL) — live on Render
  • ✅ Mobile app (React Native) — Android APK available
  • ✅ REST API backend (Node.js + MongoDB) — live on Render
  • ✅ Presented at Avishkar 2024-25, Mumbai University

What's Next?

I'm currently exploring:

  • Adding real-time chat between farmers and buyers (Socket.io)
  • Payment gateway integration (Razorpay)
  • AI-based crop price prediction

Check It Out

Want to see my other projects or get in touch?

👉 Portfolio: www.saniya.me

I'm open to internships, freelance projects, and collaboration opportunities. Feel free to connect!


Built with ❤️ by Saniya Farooqui — Full-Stack Developer from Mumbai

Tags: #webdev #javascript #react #php #beginners #programming #fullstack #mern #reactnative

Top comments (0)