How kansalakshat/remote-voting-blockchain works
The repository describes remote voting backed by Hyperledger Fabric, but the visible implementation is a React/Express user-account application: registration and activation, login and token-based profile access, password recovery, and admin user management. The README’s blockchain-voting capability has no corresponding voting, ballot, or ledger modules in the supplied tree, so its integration cannot be traced. The graph covers the implemented account workflow and supporting upload and offline-cache capabilities; relationships are limited to those shown in excerpts, the SOURCE INDEX, or the README.
Main entry points: App.js Application shell · userRouter.js User routes · Body.js Page routing · userCtrl.js Account operations
Components 25
Web client
- Application shell
WebApp/client/src/App.js - Page routing
WebApp/client/src/components/body/Body.js - Account pages
WebApp/client/src/components/body/auth - Profile and admin pages
WebApp/client/src/components/body/profile - Home page
WebApp/client/src/components/body/home/Home.js - Header
WebApp/client/src/components/header/Header.js - Notifications
WebApp/client/src/components/utils/notification/Notification.js - Form validation
WebApp/client/src/components/utils/validation/Validation.js - Offline cache
WebApp/client/src/serviceWorker.js
Client state
- Redux actions
WebApp/client/src/redux/actions - Redux store
WebApp/client/src/redux/store.js - State reducers
WebApp/client/src/redux/reducers
Account API
- HTTP server
WebApp/server.js - User routes
WebApp/routes/userRouter.js - Account operations
WebApp/controllers/userCtrl.js - Token authentication
WebApp/middleware/auth.js - Admin authorization
WebApp/middleware/authAdmin.js - User model
WebApp/models/userModel.js
Supporting services
- Mail delivery
WebApp/controllers/sendMail.js - Upload routes
WebApp/routes/upload.js - Image upload middleware
WebApp/middleware/uploadImage.js - Upload handler
WebApp/controllers/uploadCtrl.js
Other components
- Voter / admin
- MongoDB
- Hyperledger Fabric
Connections 22
- Voter / admin → Application shell: uses
README.md - Application shell → Header: renders
WebApp/client/src/App.js - Application shell → Page routing: renders
WebApp/client/src/App.js - Page routing → Account pages: routes to
WebApp/client/src/components/body/Body.js - Page routing → Profile and admin pages: routes to
WebApp/client/src/components/body/Body.js - Page routing → Home page: routes to
WebApp/client/src/components/body/Body.js - Redux store → State reducers: configures
WebApp/client/src/redux/store.js - Application shell → Redux actions: dispatches
WebApp/client/src/App.js - Redux actions → User routes: requests user info
WebApp/client/src/redux/actions/authAction.js - HTTP server → User routes: mounts routes
WebApp/server.js - HTTP server → Upload routes: mounts routes
WebApp/server.js - User routes → Account operations: dispatches
WebApp/routes/userRouter.js - User routes → Token authentication: authenticates
WebApp/routes/userRouter.js - User routes → Admin authorization: authorizes admins
WebApp/routes/userRouter.js - Admin authorization → User model: reads user
WebApp/middleware/authAdmin.js - Account operations → User model: reads and updates
WebApp/controllers/userCtrl.js - Account operations → Mail delivery: sends email
WebApp/controllers/userCtrl.js - User model → MongoDB: persists users
- Upload routes → Image upload middleware: uses
WebApp/routes/upload.js - Upload routes → Upload handler: dispatches
WebApp/routes/upload.js - Voter / admin → Hyperledger Fabric: casts remote vote
- Offline cache → Application shell: caches client