How khderalromi/rentiful_server works
This is a rental-property management API: tenants and managers use authenticated HTTP endpoints to find and manage listings, submit applications, approve them into leases, and handle lease payments. The graph separates authentication, property discovery, tenancy workflows, and MongoDB-backed domain models. The source excerpts show application approval creating a lease and property operations using location and review data; payment and several other controller details were not excerpted, so their internal relationships are not inferred.
Main entry points: AuthController.ts Authentication · index.ts Express API · PropertiesController.ts Property operations · PropertiesRoutes.ts Property routes
Components 24
API and identity
- Express API
src/index.ts - User routes
src/routes/UserRoutes.ts - Authentication
src/controllers/AuthController.ts
Property marketplace
- Property routes
src/routes/PropertiesRoutes.ts - Property operations
src/controllers/PropertiesController.ts - Review routes
src/routes/ReviewsRoutes.ts - Review creation
src/controllers/ReviewsController.ts
Rental lifecycle
- Application routes
src/routes/ApplicationRoutes.ts - Application workflow
src/controllers/ApplicationController.ts - Lease routes
src/routes/LeaseRoutes.ts - Lease operations
src/controllers/LeaseController.ts - Payment routes
src/routes/PaymentRoutes.ts - Payment operations
src/controllers/PaymentController.ts - Tenant routes
src/routes/TenantRoutes.ts - Tenant operations
src/controllers/TenantController.ts
Domain data
- Applications
src/models/Application.model.ts - Leases
src/models/Leases.model.ts - Payments
src/models/Payment.model.ts - Properties
src/models/Property.model.ts - Locations
src/models/Location.model.ts - Reviews
src/models/reviews.model.ts - Manager accounts
src/models/Manager.model.ts - Tenant accounts
src/models/Tenant.model.ts
Other components
- Tenant or manager
Connections 37
- Tenant or manager → Express API: sends HTTP
- Express API → User routes: mounts routes
src/index.ts - Express API → Property routes: mounts routes
src/index.ts - Express API → Tenant routes: mounts routes
src/index.ts - Express API → Application routes: mounts routes
src/index.ts - Express API → Lease routes: mounts routes
src/index.ts - Express API → Payment routes: mounts routes
src/index.ts - User routes → Authentication: dispatches to
src/routes/UserRoutes.ts - Property routes → Authentication: protects routes
src/routes/PropertiesRoutes.ts - Property routes → Property operations: dispatches to
src/routes/PropertiesRoutes.ts - Property routes → Review routes: mounts nested routes
src/routes/PropertiesRoutes.ts - Review routes → Authentication: protects routes
src/routes/ReviewsRoutes.ts - Review routes → Review creation: dispatches to
src/routes/ReviewsRoutes.ts - Review routes → Property operations: dispatches to
src/routes/ReviewsRoutes.ts - Application routes → Authentication: protects routes
src/routes/ApplicationRoutes.ts - Application routes → Application workflow: dispatches to
src/routes/ApplicationRoutes.ts - Application routes → Lease routes: mounts nested routes
src/routes/ApplicationRoutes.ts - Lease routes → Authentication: protects routes
src/routes/LeaseRoutes.ts - Lease routes → Lease operations: dispatches to
src/routes/LeaseRoutes.ts - Payment routes → Authentication: protects routes
src/routes/PaymentRoutes.ts - Payment routes → Payment operations: dispatches to
src/routes/PaymentRoutes.ts - Tenant routes → Authentication: protects routes
src/routes/TenantRoutes.ts - Tenant routes → Tenant operations: dispatches to
src/routes/TenantRoutes.ts - Authentication → Manager accounts: reads and writes
src/controllers/AuthController.ts - Authentication → Tenant accounts: reads
src/controllers/AuthController.ts - Property operations → Properties: queries and updates
src/controllers/PropertiesController.ts - Property operations → Locations: queries and updates
src/controllers/PropertiesController.ts - Property operations → Reviews: queries
src/controllers/PropertiesController.ts - Review creation → Reviews: creates
src/controllers/ReviewsController.ts - Application workflow → Applications: queries and updates
src/controllers/ApplicationController.ts - Application workflow → Properties: finds manager listings
src/controllers/ApplicationController.ts - Application workflow → Leases: checks and creates leases
src/controllers/ApplicationController.ts - Lease operations → Applications: uses
src/controllers/LeaseController.ts - Lease operations → Leases: uses
src/controllers/LeaseController.ts - Payment operations → Payments: uses
src/controllers/PaymentController.ts - Payment operations → Leases: uses
src/controllers/PaymentController.ts - Tenant operations → Tenant accounts: uses
src/controllers/TenantController.ts