Skip to content

rana-rohit/upvan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Upvan

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

Features

  • 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

Tech Stack

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

Getting Started

Prerequisites

  • Python 3.10+
  • Node.js 18+

Backend Setup

cd backend
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
uvicorn app.main:app --reload

API docs available at http://localhost:8000/docs

Frontend Setup

cd frontend
npm install
npm run dev

App available at http://localhost:5173


Project Structure

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

API Endpoints

Public

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

Protected (Admin)

Method Endpoint Description
POST /upvans Create forest
PUT /upvans/{id} Update forest
DELETE /upvans/{id} Delete forest
POST /tasks Create maintenance task

Environment Variables

Backend

DATABASE_URL= sqlite:///./upvan.db
JWT_SECRET_KEY= my-secret-key
ACCESS_TOKEN_EXPIRE_MINUTES= 60

Frontend

VITE_API_URL= http://localhost:8000

License

MIT License - see LICENSE for details.

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors