A full-stack web application for managing community forests across India using the Miyawaki afforestation method.
Live Demo
| Frontend | Backend API |
|---|---|
| upvan.vercel.app | upvan-api.onrender.com |
- Interactive map to explore community forests across India
- Real-time impact statistics (trees planted, species, CO2 offset)
- Forest management with plant clusters and task tracking
- Role-based access control with JWT authentication
- Modern glassmorphism UI with smooth animations
| Layer | Technologies |
|---|---|
| Frontend | React, Vite, React Router, Framer Motion, Leaflet |
| Backend | FastAPI, SQLAlchemy, Pydantic |
| Database | SQLite (development), PostgreSQL (production) |
| Auth | JWT with PBKDF2-SHA256 password hashing |
- Python 3.10+
- Node.js 18+
cd backend
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
uvicorn app.main:app --reloadAPI docs available at http://localhost:8000/docs
cd frontend
npm install
npm run devApp available at http://localhost:5173
upvan/
├── backend/
│ ├── app/
│ │ ├── core/ # Security and configuration
│ │ ├── db/ # Database setup
│ │ ├── models/ # SQLAlchemy ORM models
│ │ ├── routes/ # API endpoints
│ │ ├── schemas/ # Pydantic validation
│ │ └── main.py
│ └── requirements.txt
│
├── frontend/
│ ├── src/
│ │ ├── api/ # HTTP client configuration
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Route-based pages
│ │ └── App.jsx
│ └── package.json
│
└── docs/
├── system_design.md
└── future_scope.md
| Method | Endpoint | Description |
|---|---|---|
| GET | /upvans | List all forests |
| GET | /upvans/{id} | Get forest details |
| GET | /upvans/{id}/clusters | Get plant clusters |
| POST | /auth/login | User authentication |
| POST | /auth/register | User registration |
| Method | Endpoint | Description |
|---|---|---|
| POST | /upvans | Create forest |
| PUT | /upvans/{id} | Update forest |
| DELETE | /upvans/{id} | Delete forest |
| POST | /tasks | Create maintenance task |
DATABASE_URL= sqlite:///./upvan.db
JWT_SECRET_KEY= my-secret-key
ACCESS_TOKEN_EXPIRE_MINUTES= 60
VITE_API_URL= http://localhost:8000
MIT License - see LICENSE for details.