AgroRoot ek full-stack web application hai jo farmers aur agriculture ecosystem ke liye modern digital solutions provide karta hai. Yeh project scalable architecture ke saath design kiya gaya hai jisme frontend aur backend clearly separated hain.
- Project Overview
- Features
- Tech Stack
- Project Structure
- System Architecture
- Installation Guide
- Running the Project
- API Communication
- Environment Variables
- Troubleshooting
- Build & Deployment
- Future Improvements
AgroRoot ka aim hai agriculture domain ko digitalize karna by providing:
- User-friendly interface
- Fast backend APIs
- Scalable system design
- Real-time interaction capability (extendable)
- Responsive UI
- Fast navigation (Vite powered)
- API-based dynamic data rendering
- REST API architecture
- Modular backend structure
- Easy scalability
- Clean separation of frontend & backend
- React.js
- Vite
- JavaScript (ES6+)
- CSS
- Java
- Spring Boot
- Maven
- REST APIs
AgroRoot/
โ
โโโ AgroRoot--Frontend-main/
โ โโโ src/
โ โโโ public/
โ โโโ package.json
โ โโโ vite.config.js
โ
โโโ AgroRoot--Backend-main/
โ โโโ src/main/java/
โ โโโ src/main/resources/
โ โโโ pom.xml
โ โโโ mvnw[ React Frontend ] ---> [ Spring Boot Backend ] ---> [ Database (optional/future) ]
|
| HTTP (REST API Calls)
โ
JSON Responses
Ensure system me ye installed ho:
| Tool | Version |
|---|---|
| Node.js | 16+ |
| npm/yarn | Latest |
| Java | JDK 17+ |
| Maven | 3.6+ |
Check versions:
node -v
java -version
mvn -vgit clone <your-repo-url>
cd AgroRootcd AgroRoot--Frontend-mainnpm installnpm run dev๐ Runs on:
http://localhost:5173
cd AgroRoot--Backend-mainmvnw.cmd spring-boot:run./mvnw spring-boot:run๐ Runs on:
http://localhost:8080
Frontend backend APIs ko call karta hai via HTTP requests.
- Backend must run before frontend
- API URL sahi hona chahiye
Example:
const BASE_URL = "http://localhost:8080";Create .env file in frontend:
VITE_API_BASE_URL=http://localhost:8080Use in code:
import.meta.env.VITE_API_BASE_URLserver.port=8080- User frontend pe action karta hai
- React API call bhejta hai
- Spring Boot request handle karta hai
- Response JSON me return hota hai
- UI update hoti hai
- Run:
npm install - Check Node version
- Java version check karo
- Maven install verify karo
-
Check:
- Backend running hai?
- Port correct hai?
- CORS enabled hai?
npm run buildOutput:
dist/ folder
./mvnw clean packageOutput:
target/*.jar
Run jar:
java -jar target/app.jar- Vercel
- Netlify
- Render
- AWS EC2
- Railway
- Authentication system (JWT)
- Database integration (MySQL/PostgreSQL)
- Role-based access
- Real-time notifications
- AI-based recommendations
- Fork repo
- Create branch
- Make changes
- Commit
- Open Pull Request
This project is intended for learning and development purposes.
AgroRoot Development Team