How mayeraasingh/toolshare works
ToolShare is a community tool-lending application. Residents browse or search listings, inspect a tool, then borrow, renew, return, or save it; lenders register and manage listings. Account flows support password and Google sign-in, while profiles and borrower/lender dashboards expose user and rental information. The frontend routes these experiences to an Express API backed by MongoDB models, with Firebase used for Google authentication and profile-image storage. Relationships for unsampled features are included only where documented in the README; source-level details are cited where shown.
Main entry points: App.jsx App routing · toolRoutes.js API routes · OAuth.jsx Google sign-in · UserController.js Account operations
Components 21
Web experience
- App routing
frontend/src/App.jsx - Browse and search
frontend/src/pages/Explore.jsx - Search results
frontend/src/pages/SearchResults.jsx - Tool details
frontend/src/pages/Tool.jsx - List a tool
frontend/src/pages/AddTool.jsx - Borrowed tools
frontend/src/pages/BorrowedTools.jsx - Lender dashboard
frontend/src/pages/RegisteredTools.jsx - Saved tools
frontend/src/pages/ReviewedTools.jsx - Profile management
frontend/src/pages/Manageprofile.jsx
Accounts and state
- Sign-in and registration
frontend/src/pages/Login.jsx - Google sign-in
frontend/src/components/OAuth.jsx - User state
frontend/src/redux/userSlice.js
API and domain logic
- API routes
backend/routes/toolRoutes.js - Tool operations
backend/controllers/ToolController.js - Account operations
backend/controllers/UserController.js - Session verification
backend/middleware/auth.js
Persistence and integrations
- Tool model
backend/models/Tool.js - User model
backend/models/User.js - MongoDB
- Firebase services
Other components
- Resident
Connections 31
- Resident → App routing: uses
README.md - App routing → Browse and search: routes to
frontend/src/App.jsx - App routing → Search results: routes to
frontend/src/App.jsx - App routing → Tool details: routes to
frontend/src/App.jsx - App routing → List a tool: routes to
frontend/src/App.jsx - App routing → Borrowed tools: routes to
frontend/src/App.jsx - App routing → Lender dashboard: routes to
frontend/src/App.jsx - App routing → Saved tools: routes to
frontend/src/App.jsx - App routing → Profile management: routes to
frontend/src/App.jsx - App routing → Sign-in and registration: routes to
frontend/src/App.jsx - Browse and search → API routes: requests catalogue
README.md - Search results → API routes: requests matches
README.md - Tool details → API routes: rents or manages
README.md - List a tool → API routes: submits listing
README.md - Borrowed tools → API routes: renews or returns
README.md - Lender dashboard → API routes: manages listings
README.md - Saved tools → API routes: loads or removes
frontend/src/pages/ReviewedTools.jsx - Profile management → Firebase services: uploads image
README.md - Sign-in and registration → Google sign-in: offers Google sign-in
frontend/src/pages/Login.jsx - Google sign-in → Firebase services: authenticates with
frontend/src/components/OAuth.jsx - Google sign-in → User state: updates
frontend/src/components/OAuth.jsx - Google sign-in → Account operations: posts ID token
frontend/src/components/OAuth.jsx - API routes → Tool operations: dispatches tool routes
backend/routes/toolRoutes.js - API routes → Account operations: dispatches account routes
- API routes → Session verification: guards protected routes
backend/routes/toolRoutes.js - Tool operations → Tool model: reads and updates
backend/controllers/ToolController.js - Tool operations → User model: updates borrower records
backend/controllers/ToolController.js - Account operations → User model: reads and updates
backend/controllers/UserController.js - Tool model → MongoDB: persists tools
backend/models/Tool.js - User model → MongoDB: persists users
backend/models/User.js - Account operations → Firebase services: verifies Google token