The all-in-one platform for student housing in Egypt β find a room, match with the right roommate, and manage everything in one place.
Student Hub connects students with verified accommodation and compatible roommates. Property owners list rooms and manage bookings; students search by location, filter by budget, book a place, and get matched with potential roommates through an AI compatibility engine. The platform also bundles community groups, in-app messaging, reviews, payments, and real-time notifications into a single experience.
Built as a full-stack application with a Django REST backend and a React (Vite) frontend.
- Browse and search student housing with map-based discovery (Leaflet).
- Filter by city, university proximity, budget, and amenities.
- Detailed property listings with image galleries.
- Save favorites and revisit them later.
- Build a roommate profile (lifestyle, study habits, cleanliness, budget, etc.).
- Get ranked matches via scikit-learn cosine similarity β not naive field counting.
- Discover compatible students filtered by university and city.
- Send, accept, reject, and withdraw roommate requests.
- Request a booking and track its status (request β deposit paid β confirmed β completed).
- Stripe-powered deposit and payment flow with webhook handling.
- Owner-side booking management and status updates.
- Direct conversations between students and landlords.
- Community groups and posts for student discussions.
- Leave star ratings and reviews on properties and profiles.
- Real-time notifications (booking updates, new messages, reviews) via Django Channels (WebSockets).
- JWT-based authentication with role separation (Student / Landlord).
- KYC verification through Persona webhooks.
- Document upload for landlord verification.
- Built-in chatbot widget for support.
- Services lookup directory.
| Layer | Technologies |
|---|---|
| Backend | Django 6, Django REST Framework, SimpleJWT |
| Real-time | Django Channels (ASGI), Redis |
| Database | PostgreSQL |
| AI / ML | scikit-learn (cosine similarity) |
| Payments | Stripe |
| Identity | Persona (KYC) |
| Frontend | React, Vite, React Router v6, Tailwind CSS |
| UI / Maps | Lucide icons, Leaflet / react-leaflet |
The backend is organized into clean, domain-oriented apps, each exposing its own REST router:
/api
βββ auth/ β accounts (registration, login, profiles, verification)
βββ properties/ β listings, search, owner CRUD
βββ bookings/ β booking lifecycle
βββ favorites/ β saved properties
βββ reviews/ β property & profile reviews
βββ roommates/ β AI matching, requests
βββ community/ β groups & posts
βββ messaging/ β conversations & messages
βββ notifications/ β real-time alerts (Channels)
βββ payments/ β Stripe checkout + webhooks
βββ services/ β services directory
βββ chatbot/ β support assistant
βββ kyc/ β Persona identity verification
JWT tokens are obtained at
/api/token/and refreshed at/api/token/refresh/. Stripe and Persona events are handled at/api/webhooks/stripe/and/api/webhooks/persona/.
- Python 3.11+
- Node.js 18+
- PostgreSQL
- Redis (for Channels / real-time features)
git clone <your-repo-url>
cd student-hubcd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
# Configure your .env (see below), then:
python manage.py migrate
python manage.py createsuperuser
python manage.py runservercd frontend
npm install
npm run devThe frontend runs on Vite's dev server (default http://localhost:5173) and the API on http://localhost:8000.
Create a .env file in backend/ with at least:
SECRET_KEY=your-django-secret-key
DEBUG=True
DATABASE_URL=postgres://user:password@localhost:5432/studenthub
REDIS_URL=redis://localhost:6379/0
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
PERSONA_API_KEY=...
PERSONA_WEBHOOK_SECRET=...Populate the database with realistic test data:
# Roommate test users (with varying AI match scores)
python manage.py seed_roommate_data
python manage.py seed_roommate_data --reset # wipe and re-seed
# 40 properties across 10 landlords (with real images)
python manage.py seed_properties
python manage.py seed_properties --reset # wipe and re-seed
python manage.py seed_properties --skip-images # fast, no network needed| Username | Password | Role | Notes |
|---|---|---|---|
test_student1 |
Test1234! |
Student | Main test account (Cairo University) |
seed_rm_ahmed_sayed |
Test1234! |
Student | ~100% AI match with test_student1 |
seed_rm_mohamed_farouk |
Test1234! |
Student | ~94% AI match |
seed_rm_khaled_mostafa |
Test1234! |
Student | ~84% AI match |
seed_rm_amir_samir |
Test1234! |
Student | ~49% AI match |
seed_rm_tarek_nabil |
Test1234! |
Student | ~29% AI match |
seed_landlord_001β010 |
Pass1234! |
Landlord | 10 landlords with 40 properties |
A roommate profile must have
is_active = Trueto appear in AI matching.
| Token | Value |
|---|---|
| Primary blue | #155BC2 |
| Dark navy | #091E42 |
| Neutrals | Tailwind slate palette |
| Cards | rounded-3xl |
| Icons | lucide-react |
student-hub/
βββ backend/
β βββ api/ # DRF app routers (auth, properties, roommates, β¦)
β βββ accounts/ # User & profile models
β βββ properties/ # Property models + seed command
β βββ roommates/ # Roommate models + AI matching + seed command
β βββ postman/ # API collections
β βββ manage.py
βββ frontend/
βββ src/
βββ pages/ # Home, FindRoom, Roommate, Messaging, Community, β¦
βββ assets/components # Navbar, PropertyCard, ChatbotWidget, β¦
βββ hooks/ # useMessagingInbox, β¦
βββ utils/ # properties helpers, β¦
- Password recovery / reset flow
- Send-message endpoint for ongoing conversations + WebSocket delivery
- Community comments, likes, and shares
- Full owner property CRUD with media management
- Student payment-history screens
- Production deployment & end-to-end QA
Released under the MIT License.