How realestatesassapplication/avararealestate works
Avara SL is a Sri Lankan property platform for rentals, sales, and short-term stays. Its main user workflow is searching listings, viewing a property, and pursuing a booking or rental; hosts and administrators manage listings and platform activity, while tenants and owners manage ongoing tenancy tasks. The README documents payments, search, moderation, and file storage as additional capabilities. Source excerpts show selected API-to-model and service relationships; many page-to-API links and unsampled integrations are not shown, so those connections are omitted.
Main entry points: applications/route.ts Rental applications API · page.tsx Listing pages · Notification.ts Notification records · maintenance/route.ts Maintenance API
Components 34
Property discovery
- Listing pages
app/listings/page.tsx - Listing detail
app/listings/[id]/page.tsx - Property card
components/property/PropertyCard.tsx - Search filters
components/search/SearchFilters.tsx - Property API
app/api/properties/route.ts - Property service
services/propertyService.ts - Property records
models/Property.ts
Accounts and tenancy
- Authentication API
app/api/auth/login/route.ts - Authentication utilities
lib/auth.ts - User records
models/User.ts - Booking API
app/api/bookings/route.ts - Booking service
services/bookingService.ts - Booking records
models/Booking.ts - Rental applications API
app/api/applications/route.ts - Application records
models/Application.ts - Rental requests API
app/api/rental-requests/route.ts - Request matching
lib/matchRentalRequests.ts - Rent API
app/api/rents/route.ts - Rent service
services/rentService.ts - Rent records
models/Rent.ts - Maintenance API
app/api/maintenance/route.ts - Maintenance records
models/MaintenanceRequest.ts
Platform operations
- Admin dashboard
app/admin/dashboard/page.tsx - Host dashboard
app/host/dashboard/page.tsx - Owner portal
app/owner/page.tsx - Notifications API
app/api/notifications/route.ts - Notification service
services/notificationService.ts - Notification records
models/Notification.ts - PayHere payments
services/paymentService.ts - Transaction records
models/Transaction.ts
Shared runtime
- MongoDB connection
lib/db.ts - S3 file storage
lib/s3.ts - Site header
components/ui/layout/Header.tsx
Other components
- Visitor or renter
Connections 24
- Visitor or renter → Listing pages: browses
README.md - Listing pages → Search filters: offers filters
app/listings/page.tsx - Listing pages → Property card: renders
app/listings/page.tsx - Visitor or renter → Property API: searches listings
README.md - Visitor or renter → Booking API: requests booking
README.md - Visitor or renter → Authentication API: registers or logs in
README.md - Booking API → Booking service: delegates
app/api/bookings/route.ts - Rental applications API → Authentication utilities: authenticates
app/api/applications/route.ts - Rental applications API → MongoDB connection: connects
app/api/applications/route.ts - Rental applications API → Application records: creates applications
app/api/applications/route.ts - Rental applications API → Notification records: creates alerts
app/api/applications/route.ts - Rental requests API → Request matching: finds matches
app/api/rental-requests/route.ts - Rent API → Rent service: delegates
app/api/rents/route.ts - Maintenance API → Maintenance records: creates and reads
app/api/maintenance/route.ts - Maintenance API → Rent records: checks tenancy
app/api/maintenance/route.ts - Notifications API → Notification records: creates and reads
app/api/notifications/route.ts - Admin dashboard → Visitor or renter: moderates platform
README.md - PayHere payments → Transaction records: records payments
- Property API → Property service: uses service
- Property service → Property records: manages listings
- Booking service → Booking records: manages bookings
- Rent service → Rent records: manages rents
- Notification service → Notification records: manages alerts
- Visitor or renter → S3 file storage: uploads images