How vinaysingh5706/campusshare works
CampusShare is a campus-only peer-to-peer rental marketplace. Students discover or post resources, request a rental, receive an authoritative quote, and progress through approval, return, deposit, and completion; ratings and trust scoring support safe reuse. The browser calls the FastAPI app, whose route handlers coordinate validation, authentication, services, and persisted records. The README documents the broader capabilities; only selected source excerpts were available, so unsampled feature links are shown only where the README or source index supports them.
Main entry points: main.py FastAPI application · models Marketplace and user records · rentals.py Rental lifecycle and quotes · schemas Request validation
Components 24
Browser client
- Browser client
- Fetch API wrapper
frontend/js/api.js
API and identity
- FastAPI application
app/main.py - JWT and role auth
app/auth.py - Registration and login
app/routes/auth.py - Request validation
app/schemas
Marketplace workflows
- Resource discovery and listings
app/routes/listings.py - Rental lifecycle and quotes
app/routes/rentals.py - Quote and overdue logic
app/services/rental_service.py - Saved resources
app/routes/wishlist.py
Community and moderation
- Profiles and reputation
app/routes/users.py - Trust score engine
app/services/trust_service.py - Peer reviews
app/routes/ratings.py - Peer messaging
app/routes/messages.py - Notifications
app/routes/notifications.py - Notification dispatcher
app/services/notification_service.py - Reports and disputes
app/routes/reports.py - Admin moderation
app/routes/admin.py
Persistence
- Listing records
app/models/listing.py - Rental records
app/models/rental.py - Database sessions
app/database.py - Marketplace and user records
app/models
Other components
- Students
- PostgreSQL or SQLite
Connections 47
- Students → Browser client: use
- Browser client → Fetch API wrapper: makes requests
- Fetch API wrapper → FastAPI application: sends HTTP
- FastAPI application → Registration and login: mounts routes
app/main.py - FastAPI application → Database sessions: uses sessions
app/main.py - FastAPI application → Resource discovery and listings: mounts routes
- FastAPI application → Rental lifecycle and quotes: mounts routes
- FastAPI application → Profiles and reputation: mounts routes
- FastAPI application → Peer reviews: mounts routes
- FastAPI application → Peer messaging: mounts routes
- FastAPI application → Notifications: mounts routes
- FastAPI application → Saved resources: mounts routes
- FastAPI application → Reports and disputes: mounts routes
- FastAPI application → Admin moderation: mounts routes
- Registration and login → JWT and role auth: uses auth
app/routes/auth.py - Registration and login → Request validation: validates with
app/routes/auth.py - Resource discovery and listings → JWT and role auth: checks identity
app/routes/listings.py - Resource discovery and listings → Request validation: validates with
app/routes/listings.py - Resource discovery and listings → Listing records: queries and updates
app/routes/listings.py - Rental lifecycle and quotes → JWT and role auth: checks identity
app/routes/rentals.py - Rental lifecycle and quotes → Request validation: validates with
app/routes/rentals.py - Rental lifecycle and quotes → Quote and overdue logic: calculates and syncs
app/routes/rentals.py - Rental lifecycle and quotes → Rental records: creates and updates
app/routes/rentals.py - Rental lifecycle and quotes → Listing records: reads listing
app/routes/rentals.py - Quote and overdue logic → Rental records: updates overdue
app/services/rental_service.py - Quote and overdue logic → Listing records: reads pricing
app/services/rental_service.py - Profiles and reputation → Trust score engine: uses scoring
app/routes/users.py - Peer reviews → Trust score engine: updates reputation
app/routes/ratings.py - Peer reviews → Notification dispatcher: dispatches notice
app/routes/ratings.py - Peer messaging → Notification dispatcher: dispatches notice
app/routes/messages.py - Notifications → Request validation: validates with
app/routes/notifications.py - Saved resources → Request validation: validates with
app/routes/wishlist.py - Reports and disputes → Request validation: validates with
app/routes/reports.py - Admin moderation → JWT and role auth: guards admin
app/routes/admin.py - Admin moderation → Quote and overdue logic: uses rental logic
app/routes/admin.py - Notification dispatcher → Marketplace and user records: creates notifications
app/services/notification_service.py - Trust score engine → Marketplace and user records: reads and updates scores
app/services/trust_service.py - Database sessions → PostgreSQL or SQLite: connects
- Marketplace and user records → Database sessions: uses ORM base
app/models/listing.py - Resource discovery and listings → Marketplace and user records: queries records
app/routes/listings.py - Rental lifecycle and quotes → Marketplace and user records: queries records
app/routes/rentals.py - Peer reviews → Marketplace and user records: queries records
app/routes/ratings.py - Peer messaging → Marketplace and user records: queries records
app/routes/messages.py - Notifications → Marketplace and user records: queries records
app/routes/notifications.py - Saved resources → Marketplace and user records: queries records
app/routes/wishlist.py - Reports and disputes → Marketplace and user records: queries records
app/routes/reports.py - Admin moderation → Marketplace and user records: moderates records
app/routes/admin.py