Campus-focused rental discovery and property management, built for students, teachers, and property owners.
- Searches apartments and parking by area, type, and monthly budget.
- Presents price, availability, amenities, commute context, and nearby essentials together.
- Supports visit requests and rental applications with an approval trail.
- Gives tenants, owners, and administrators role-specific workspaces.
- Provides owner listing tools, booking administration, notifications, payments, reviews, and saved commute routes.
- Falls back to curated demonstration listings when the API is unavailable, while clearly labelling live availability.
| Landing page | Property details |
|---|---|
![]() |
![]() |
| Tenant dashboard | Mobile layout |
|---|---|
![]() |
![]() |
flowchart LR
A[React + Vite client] -->|REST / JSON| B[Express API]
B --> C[(MongoDB)]
B --> D[JWT authentication]
B --> E[Role-based access]
A --> F[Responsive editorial UI]
The repository keeps the client and API separate so either side can be deployed independently:
TenantHub/
├── frontend/ React 19, Vite, responsive UI
├── backend/ Express API, Mongoose models, tests
│ ├── controllers/
│ ├── middleware/
│ ├── models/
│ ├── routes/
│ ├── scripts/ Local demo-data seed
│ └── tests/
├── docs/screenshots/ Verified product captures
└── vercel.json SPA build and routing configuration
Requirements: Node.js 20+, npm, and MongoDB.
git clone https://github.com/Aurpo-001/TenantHub.git
cd TenantHub
npm run install:all
cp backend/.env.example backend/.envSet a strong JWT_SECRET and your local or hosted MONGODB_URI in backend/.env, then run:
npm run dev:api
npm run dev:webThe web client opens at http://127.0.0.1:3000; the API listens at http://127.0.0.1:5001 by default.
After configuring the database:
npm --prefix backend run seed| Role | Password | |
|---|---|---|
| Tenant | student@tenanthub.test |
TenantHub123! |
| Owner | owner@tenanthub.test |
TenantHub123! |
| Administrator | admin@tenanthub.test |
TenantHub123! |
These accounts are only for local demonstrations. Never reuse their password in a deployed environment.
npm testThis builds the production client and runs the API contract tests. The current checks cover the health endpoint, JSON 404 response, and CORS rejection for unapproved origins.
| Area | Base route | Access |
|---|---|---|
| Authentication | /api/auth |
Public / authenticated |
| Properties | /api/properties |
Public browse; owner/admin writes |
| Bookings | /api/bookings |
Authenticated; admin actions protected |
| Dashboard | /api/dashboard |
Owner/admin by role |
| Commute | /api/commute |
Public and authenticated routes |
| Notifications | /api/notifications |
Authenticated |
See backend/API_LIST.md for the expanded endpoint inventory.
- Environment files and dependencies are excluded from version control.
- Self-registration can create tenant or owner accounts, never administrators.
- Protected routes validate JWTs and enforce role checks.
- Browser origins are restricted through
CLIENT_ORIGIN. - Secrets belong in deployment environment variables, not source files.
For responsible disclosure and deployment guidance, see SECURITY.md.
Licensed under the MIT License.




