How dhruvbhadhotiya/ownsquare works
OwnSquare is an academic fractional-property investment portal for brokers, investors, and administrators; its financial backend is authoritative, while the README says the public marketplace and broker property screens still use fixtures. The principal workflow spans property discovery and listing, investment and wallet activity, portfolio ownership, and eventual property sale and payouts. The graph preserves documented KYC, enquiries, notifications, administration, authentication, and optional media/email capabilities. Evidence is limited to the README and supplied excerpts/index; unsampled implementation links are omitted where their caller is not shown.
Main entry points: backendServices.js Service composition · AppRoutes.jsx Role-based screens · client.js API client · app.js Express API application
Components 28
Client experience
- Role-based screens
client/src/routes/AppRoutes.jsx - Session and capabilities
client/src/context/AuthContext.jsx - API client
client/src/api/client.js - Property marketplace
client/src/pages/public/Marketplace.jsx - Broker property tools
client/src/features/broker/PropertyWizard.jsx - Investor portal
client/src/pages/investor/index.jsx - Administration
client/src/pages/admin/AdminDashboard.jsx - Shared interface
client/src/components
API and access
- Express API application
server/src/app.js - Authentication
server/src/services/auth.service.js - Service composition
server/src/utils/backendServices.js - MongoDB models
server/src/models
Property lifecycle
- Property API
server/src/routes/propertyAdmin.routes.js - Property lifecycle
server/src/services/propertyLifecycle.service.js - Media uploads
server/src/services/upload.service.js - Property enquiries
server/src/routes/enquiries.routes.js
Investment finance
- Investment execution
server/src/services/investment.service.js - Wallet and withdrawals
server/src/services/wallet.service.js - Transaction ledger
server/src/services/ledger.service.js - Portfolio holdings
server/src/services/portfolio.service.js - Sale payouts
server/src/services/payout.service.js
Trust and operations
- Identity verification
server/src/services/kyc.service.js - Admin operations
server/src/services/admin.service.js - Notifications
server/src/services/notification.service.js
Other components
- Visitors
- Signed-in users
- Cloudinary media
- SMTP mail
Connections 35
- Visitors → Role-based screens: browse
client/src/routes/AppRoutes.jsx - Signed-in users → Role-based screens: open workspace
client/src/routes/AppRoutes.jsx - Role-based screens → Property marketplace: routes to
client/src/routes/AppRoutes.jsx - Role-based screens → Broker property tools: routes to
client/src/routes/AppRoutes.jsx - Role-based screens → Investor portal: routes to
client/src/routes/AppRoutes.jsx - Role-based screens → Administration: routes to
client/src/routes/AppRoutes.jsx - Role-based screens → Shared interface: renders
- Session and capabilities → API client: requests sessions
client/src/context/AuthContext.jsx - Property marketplace → API client: loads properties
- Broker property tools → API client: submits listings
- Investor portal → API client: uses portal APIs
- Administration → API client: uses admin APIs
- API client → Express API application: calls API
- Express API application → Authentication: routes requests
- Express API application → Property API: mounts routes
server/src/app.js - Express API application → Service composition: creates services
server/src/app.js - Property API → Property lifecycle: delegates lifecycle
- Property API → MongoDB models: reads property
server/src/routes/propertyAdmin.routes.js - Property enquiries → MongoDB models: reads and writes
server/src/routes/enquiries.routes.js - Service composition → Investment execution: creates service
server/src/utils/backendServices.js - Service composition → Wallet and withdrawals: creates service
server/src/utils/backendServices.js - Service composition → Transaction ledger: creates service
server/src/utils/backendServices.js - Service composition → Portfolio holdings: creates service
server/src/utils/backendServices.js - Service composition → Sale payouts: creates service
server/src/utils/backendServices.js - Service composition → Property lifecycle: creates service
server/src/utils/backendServices.js - Service composition → Media uploads: optionally creates
server/src/utils/backendServices.js - Service composition → Identity verification: creates service
server/src/utils/backendServices.js - Service composition → Admin operations: creates service
server/src/utils/backendServices.js - Service composition → Notifications: creates service
server/src/utils/backendServices.js - Service composition → MongoDB models: uses persistence
- Media uploads → Cloudinary media: hosts media
- Authentication → SMTP mail: sends reset mail
server/src/services/auth.service.js - Authentication → MongoDB models: reads and updates
server/src/services/auth.service.js - Investment execution → Transaction ledger: posts entries
- Sale payouts → Transaction ledger: posts payouts