How kesthav/appartex works
Appartex is a real-estate management web application for independent property owners, with tenant-facing access and public apartment browsing. The primary workflow is to authenticate, browse or manage properties, and maintain related tenants, contracts, bills, repairs, tasks, messages, and status histories. The React client calls a Koa API; MongoDB persists application records. The graph retains the major capabilities documented by the routes and file tree. Several route implementations were not sampled, so their detailed handler-to-model wiring is not inferred.
Main entry points: index.js API route registry · middlewares JWT and role checks · auth.js Authentication API · ContextAPI.jsx Client data context
Components 22
Web client
- React application
client/src/App.js - Apartment browsing
client/src/pages/main.jsx - Owner workspace
client/src/pages/ownerpages - Tenant workspace
client/src/pages/tenantpages/tenantboard.jsx - Login and signup
client/src/components/landingPage - Client data context
client/src/middlewares/ContextAPI.jsx - Route access
client/src/middlewares/AuthRoutes.jsx
API and access
- API route registry
server/routes/index.js - Koa server
server/server.js - Authentication API
server/routes/auth.js - JWT and role checks
server/middlewares
Property management
- Property records API
server/routes - Buildings and apartments
server/models - Tenant and contract API
server/routes - Tenant and contract records
server/models
Work and records
- Bills and histories
server/routes - Tasks and repairs
server/routes - Messages and comments
server/routes/messages.js - Status histories
server/routes - Work record models
server/models
Persistence
- MongoDB
Other components
- Visitor / user
Connections 33
- Visitor / user → React application: opens
- React application → Route access: routes through
- Visitor / user → Apartment browsing: browses
- Apartment browsing → Client data context: reads listings
- Visitor / user → Login and signup: authenticates
- Login and signup → Authentication API: submits credentials
- Owner workspace → Client data context: requests data
- Tenant workspace → Client data context: uses tenant data
- Client data context → Koa server: sends API requests
- Koa server → API route registry: dispatches routes
- API route registry → Authentication API: registers
- API route registry → Property records API: registers
- API route registry → Tenant and contract API: registers
- API route registry → Bills and histories: registers
- API route registry → Tasks and repairs: registers
- API route registry → Messages and comments: registers
- API route registry → Status histories: registers
- Authentication API → JWT and role checks: uses auth checks
- Property records API → JWT and role checks: uses access checks
- Tenant and contract API → JWT and role checks: uses access checks
- Bills and histories → JWT and role checks: uses access checks
- Tasks and repairs → JWT and role checks: uses access checks
- Messages and comments → JWT and role checks: uses access checks
- Status histories → JWT and role checks: uses access checks
- Property records API → Buildings and apartments: manages records
- Tenant and contract API → Tenant and contract records: manages records
- Bills and histories → Work record models: uses record models
- Tasks and repairs → Work record models: manages records
- Status histories → Work record models: records histories
- Authentication API → MongoDB: persists accounts
- Buildings and apartments → MongoDB: persists property data
- Tenant and contract records → MongoDB: persists tenant data
- Work record models → MongoDB: persists work data