Skip to content

Abhishek-Dige/CivicBridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

69 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CivicBridge πŸš€

Open Platform for Discovering Public Schemes and Reporting Civic Issues

being built by Abhishek Dige,Parth Badgire and Smit Jain CivicBridge is a civic-tech platform that helps citizens:

  • Discover government schemes they are eligible for
  • Report civic issues like potholes, garbage dumps, and broken infrastructure
  • View issues transparently on a public map

The goal is to improve awareness, transparency, and community participation.


πŸ— Project Architecture

Frontend

  • React
  • Vite

Backend

  • Node.js
  • Express.js

Database & Auth

  • Supabase

## Project Structure
civicbridge/
β”‚
β”œβ”€β”€ README.md
β”œβ”€β”€ .env
β”œβ”€β”€ .gitignore
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   └── logo.svg
β”‚   β”‚
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   β”‚   β”œβ”€β”€ images/
β”‚   β”‚   β”‚   └── icons/
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Footer.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SchemeCard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ IssueCard.jsx
β”‚   β”‚   β”‚   └── MapComponent.jsx
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ Home.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SchemeNavigator.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ReportIssue.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ IssueMap.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Login.jsx
β”‚   β”‚   β”‚   └── Dashboard.jsx
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   β”œβ”€β”€ api.js
β”‚   β”‚   β”‚   β”œβ”€β”€ schemeService.js
β”‚   β”‚   β”‚   └── issueService.js
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”‚   └── useAuth.js
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”‚   β”œβ”€β”€ filterSchemes.js
β”‚   β”‚   β”‚   └── constants.js
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ styles/
β”‚   β”‚   β”‚   └── global.css
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   └── main.jsx
β”‚   β”‚
β”‚   └── package.json
β”‚
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”‚   β”œβ”€β”€ schemeController.js
β”‚   β”‚   β”‚   └── issueController.js
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”‚   β”œβ”€β”€ schemeRoutes.js
β”‚   β”‚   β”‚   └── issueRoutes.js
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   β”œβ”€β”€ schemeService.js
β”‚   β”‚   β”‚   └── issueService.js
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   β”‚   └── authMiddleware.js
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ config/
β”‚   β”‚   β”‚   └── supabaseClient.js
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”‚   └── helpers.js
β”‚   β”‚   β”‚
β”‚   β”‚   └── server.js
β”‚   β”‚
β”‚   └── package.json
β”‚
β”‚
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ schema.sql
β”‚   └── seedData.json
β”‚
β”‚
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ architecture.md
β”‚   └── api.md
β”‚
β”‚
└── scripts/
    └── seedDatabase.js

🧭 Team Git Workflow (Step-by-Step) 1️⃣ Clone the Repository (First Time Only)

Each teammate does this once.

git clone <repo - link> cd civicbridge

Now the project exists on their computer.

2️⃣ Always Pull Latest Code Before Starting Work

Before doing any work, sync with the latest main.

git checkout main git pull origin main

This ensures you are working on the latest version of the project.

πŸš€ Project Setup (For Contributors)

Follow these steps to run the project locally.

1️⃣ Clone the Repository

git clone <repo-url>
cd civicbridge

2️⃣ Setup Frontend

Navigate to the frontend folder and install dependencies.

cd frontend
npm install

Run the development server:

npm run dev

Frontend will run at:

http://localhost:5173

3️⃣ Setup Backend

Open a new terminal and navigate to the backend folder.

cd backend
npm install

4️⃣ Create Environment Variables

Inside the backend folder, create a .env file.

Example:

SUPABASE_URL=your_supabase_project_url
SUPABASE_KEY=your_supabase_anon_key
PORT=5000

Ask the team lead for the Supabase credentials.


5️⃣ Start Backend Server

Run the backend:

npm run dev

Backend will run at:

http://localhost:5000

6️⃣ Running the Full Project(not required if you are only working on frontend)

You should now have two terminals running:

Terminal 1 (frontend)

cd frontend
npm run dev

Terminal 2 (backend)

cd backend
npm run dev

⚠️ Important Notes

  • Do not commit .env files
  • Always pull latest changes before starting work
git pull origin main
  • Work on feature branches, not directly on main

3️⃣ Create a Feature Branch

Never work on main.

Create a branch for your task.

Example:

git checkout -b feature/navbar

Other examples:

feature/scheme-navigator feature/report-issue feature/map-system feature/backend-api

Now you are working safely in your own branch.

4️⃣ Work on Your Feature

Edit files normally.

Example:

src/components/Navbar.jsx 5️⃣ Stage and Commit Changes

When you complete a logical piece of work:

git add . git commit -m "Add navbar component"

Good commit messages:

Add scheme navigator form Implement issue reporting API Fix navbar routing

Avoid:

update stuff changes 6️⃣ Push Your Feature Branch

Upload your branch to GitHub.

git push origin feature/navbar

Now the branch appears on GitHub.

7️⃣ Create a Pull Request (PR)

Go to the repository on GitHub.

You will see:

Compare & Pull Request

Create PR:

feature/navbar β†’ main

This means:

β€œPlease merge my feature into the main branch.”

8️⃣ Review and Merge

Someone checks the code.

If everything is fine:

Click Merge Pull Request.

Now the main branch updates.

9️⃣ Everyone Syncs After Merge

After a PR merges, everyone should update their local repo.

git checkout main git pull origin main

Now everyone has the updated code.

πŸ” Daily Workflow (Short Version)

Every day your team follows this:

git checkout main git pull origin main git checkout -b feature/your-feature

Work β†’ commit β†’ push β†’ PR.

πŸ“¦ Core Features

1️⃣ Scheme Navigator

Users enter basic details:

  • Age
  • Income
  • State
  • Education
  • Occupation
  • Category

System filters and recommends eligible government schemes.

Output shows:

  • Scheme name
  • Description
  • Eligibility criteria
  • Benefits
  • Application link

2️⃣ Civic Issue Reporter

Citizens can report local issues.

Fields:

  • Photo upload
  • Issue type
  • Description
  • Location

Issues appear on a public map for transparency.

Issue Types:

  • Pothole
  • Garbage
  • Water leakage
  • Broken streetlight
  • Road damage

πŸ—‚ Database Schema

Schemes Table

id
name
description
income_limit
age_limit
category
state
link

Issues Table

id
title
description
latitude
longitude
photo_url
status
created_at

Users Table

id
name
email
role

πŸš€ Future Improvements

Possible extensions:

  • Government API integration
  • Issue voting system
  • Civic analytics dashboard
  • Mobile app
  • Community moderation

About

Open Platform for Discovering Public Schemes and Reporting Civic Issues

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors