#PopulationCount PopulationCount is a responsive React web application for recording and analysing population data by state and district. It provides user authentication (Supabase Auth), role-based access control (user / admin), CRUD for people, states and districts, dashboards with charts.
#Key features User authentication (Sign up / Login) using Supabase Auth
Role-based access: user and admin
user: create and edit population records, cannot delete other users' data
admin: full access (view/edit/delete users & data, manage roles)
Register people with details (full name, gender, age, state, district)
Manage states & districts (add / list / paginate / search)
Dashboard with totals and charts (Chart.js, Bar + Doughnut)
Responsive UI (Tailwind CSS) and mobile-friendly components
Edit profile UI and metadata stored in Supabase (profiles table)
Server-side Row Level Security (RLS) policies to protect data
Tech stack Frontend: React (V18+), React Router v6, Tailwind CSS, Chart.js, lucide-react
Backend-as-a-Service: Supabase (Auth + Postgres database)
Tooling: Vite (assumed) or Create React App
#Repo structure (important files) /src /components Navbar.jsx ProtectedRoute.jsx EditProfile.jsx /pages Home.jsx Dashboard.jsx RegisterPerson.jsx States.jsx Districts.jsx Signup.jsx Login.jsx ManageUsers.jsx /context AuthContext.jsx supabaseClient.js routes.jsx main.jsx App.jsx
tailwind.config.js vite.config.js (or cra configs)