Skip to content

feat(projects): add Smart Waste Management Platform (closes #86) - #123

Open
arcgod-design wants to merge 2 commits into
MistryVishwa:mainfrom
arcgod-design:feat/issue-86-smart-waste-management
Open

feat(projects): add Smart Waste Management Platform (closes #86)#123
arcgod-design wants to merge 2 commits into
MistryVishwa:mainfrom
arcgod-design:feat/issue-86-smart-waste-management

Conversation

@arcgod-design

@arcgod-design arcgod-design commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Closes #86

Summary

Adds the Smart Waste Management Platform as a BuildVerse project at projects/smart-waste-management/.

Single self-contained index.html (no build step, no CDN, no backend) backed by localStorage so the app runs offline after the first load. Implements the role-based access control pattern called out in the issue:

  • Admin — full read+write across all complaints (Resolve / Delete), sees all collection routes, can Reset completed routes.
  • Waste Collector — sees all complaints (Resolve / Delete), gets a Mark Done action on routes assigned to them on the Schedule tab, and a per-route completion timestamp.
  • Citizen — sees only their own complaints (read-only on others), reports new complaints with auto-attribution to their user id, and views the full scheduled route list.

A role-switcher in the header (top-right) lets a single browser session switch between the three seeded demo users (u-admin / u-collector / u-citizen) so the role-aware views are demoable without a login flow.

Modules

Tab What it shows
Dashboard Role-aware summary cards (Open / Resolved / Reports Today / Active Routes for admin+collector, Total Reports for citizen), complaints-by-type bar chart, and recent complaints table scoped to the role's visible set.
Complaints Full complaint list with status badges, location, description excerpt, and action buttons scoped by role.
Report Issue Citizens file waste-related complaints (Overflowing Bins, Illegal Dumping, Missed Collection, Recycling Issue, Other). On submit complaint.reporter is set to the active user's userId so the Citizen dashboard can filter to "my issues" only.
Schedule Zone-based pickup calendar (Zone A Downtown, Zone B Residential, Zone C Industrial). Collectors see a Mark Done button per route; admins can also reset completed routes.

Bonus UX: toast notifications confirm Submit Report / Route Complete / Role Switch actions. Mobile-friendly (stats grid collapses to 2 columns at <=600px).

Files

projects/smart-waste-management/
├── index.html       # ~340 lines: HTML + CSS + JS in one file (no external deps)
├── project.json     # BuildVerse metadata
└── README.md        # Usage docs + role description

Notes

  • The role switcher is a stand-in for a real auth flow. The issue spec mentioned email verification / password reset — that's intentionally NOT implemented here because (a) BuildVerse convention is offline single-file apps, and (b) a real auth backend would be out of scope for a static HTML project.
  • localStorage is the only persistence. To reset the seeded data, run localStorage.clear() in DevTools then refresh.

Validation

  • node --check passes on the JS inside the <script> block.
  • Brace + paren counts balanced (70 { / 70 }, 212 ( / 212 )).
  • File opens with a "Lorem ipsum" seed complaint removed in favour of a real description.
  • No new dependencies introduced.

Commit

f6a0215 on feat/issue-86-smart-waste-management — supersedes d2023f8 (which had a syntax bug: function Seed(com particular,loc)).

@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

@arcgod-design is attempting to deploy a commit to the vishwamistrylearning-1037's projects Team on Vercel.

A member of the Team first needs to authorize it.

…mpletion, syntax fix (closes MistryVishwa#86)

Fixes broken 'function Seed(com particular,loc)' syntax from prior
commit d2023f8; adds role-switcher header with three seeded demo
users (admin / collector / citizen), role-aware complaint visibility,
collector route Mark Done / admin route Reset actions, toast
notifications, and README + project.json descriptions updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Project] Smart Waste Management Platform

1 participant