How urbanscope-ph/miriam-lobren-realestate works
UrbanScope is a real-estate discovery and client-inquiry site with separate agent-admin and superadmin portals. Homebuyers browse listings, register or sign in, submit consultation or property inquiries, then manage inquiry history; staff manage listings and inquiries, while superadmins govern accounts and inspect system health. The backend provides API routing, authentication and authorization, and SQLite persistence. README capabilities are retained, but some frontend-to-API wiring and unsampled implementations are shown only where documented; relationships without evidence are omitted.
Main entry points: app.py FastAPI Application · database.py SQLite Database · backend/auth.py Auth and RBAC · routers/auth.py Authentication API
Components 32
Homebuyer Experience
- Property Catalog
frontend/index.js - Property Details
frontend/pages/properties/property-detail.js - Client Sign-in
frontend/pages/auth - Consultation Inquiry
frontend/pages/inquiry/inquiry.js - Inquiry History
frontend/pages/inquiry/history.js - Legal and Privacy
frontend/pages/legal/legal.js
Agent Administration
- Admin Dashboard
frontend/pages/admin/dashboard.js - Property Management
frontend/pages/admin/properties.js - Client Management
frontend/pages/admin/clients.js - Admin Navigation
frontend/pages/admin/admin-shell.js
Superadmin Governance
- Superadmin Console
frontend/pages/superadmin/dashboard.js - Account Governance API
backend/routers/superadmin.py
FastAPI Services
- Web Hosting Routes
backend/routers/web.py - Authentication API
backend/routers/auth.py - Property API
backend/routers/properties.py - Inquiry Lifecycle API
backend/routers/inquiries.py - System API
backend/routers/system.py - FastAPI Application
backend/app.py - SQLite Database
backend/database.py - Request Models
backend/models.py - Admin Guard
backend/middleware.py
Identity and Sessions
- Auth and RBAC
backend/auth.py - Email OTP Service
backend/auth_otp.py - Admin Session Endpoint
api/auth/edge-session.js - Signed Session Library
lib/admin-session.js - Email Auth Utilities
lib/email-auth.js - Registration Code Endpoint
api/auth/register/start.js - Registration Verify Endpoint
api/auth/register/verify.js - Cloud Account Endpoint
api/superadmin/users.js
Other components
- Homebuyer
- Email Delivery
- Supabase Auth Data
Connections 43
- Homebuyer → Property Catalog: browses
- Property Catalog → Property Details: opens listing
- Homebuyer → Client Sign-in: registers or signs in
- Homebuyer → Consultation Inquiry: submits inquiry
- Homebuyer → Inquiry History: manages requests
- Homebuyer → Legal and Privacy: reviews policies
- Admin Dashboard → Property Management: manages listings
- Admin Dashboard → Client Management: tracks clients
- Admin Navigation → Admin Dashboard: provides navigation
- Superadmin Console → Account Governance API: governs accounts
- FastAPI Application → Web Hosting Routes: registers hosting
backend/app.py - FastAPI Application → Authentication API: registers router
backend/app.py - FastAPI Application → Property API: registers router
backend/app.py - FastAPI Application → Inquiry Lifecycle API: registers router
backend/app.py - FastAPI Application → Account Governance API: registers router
backend/app.py - FastAPI Application → System API: registers router
backend/app.py - FastAPI Application → Admin Guard: installs guard
backend/app.py - FastAPI Application → SQLite Database: initializes
backend/app.py - Authentication API → Auth and RBAC: uses identity
backend/routers/auth.py - Authentication API → Email OTP Service: uses OTP
backend/routers/auth.py - Authentication API → SQLite Database: reads and writes
backend/routers/auth.py - Authentication API → Request Models: validates payloads
backend/routers/auth.py - Property API → SQLite Database: reads and writes
backend/routers/properties.py - Property API → Auth and RBAC: checks access
backend/routers/properties.py - Property API → Request Models: uses schemas
backend/routers/properties.py - Inquiry Lifecycle API → SQLite Database: reads and writes
backend/routers/inquiries.py - Inquiry Lifecycle API → Auth and RBAC: checks access
backend/routers/inquiries.py - Inquiry Lifecycle API → Request Models: uses schemas
backend/routers/inquiries.py - Account Governance API → SQLite Database: reads and writes
backend/routers/superadmin.py - Account Governance API → Auth and RBAC: checks role
backend/routers/superadmin.py - System API → SQLite Database: checks system state
backend/routers/system.py - System API → Auth and RBAC: checks access
backend/routers/system.py - Admin Guard → Auth and RBAC: checks authorization
backend/middleware.py - Admin Guard → SQLite Database: loads user
backend/middleware.py - Auth and RBAC → SQLite Database: loads account
backend/auth.py - Admin Session Endpoint → Signed Session Library: creates and reads
api/auth/edge-session.js - Registration Code Endpoint → Email Auth Utilities: issues code
api/auth/register/start.js - Registration Verify Endpoint → Email Auth Utilities: verifies code
api/auth/register/verify.js - Cloud Account Endpoint → Email Auth Utilities: manages accounts
api/superadmin/users.js - Cloud Account Endpoint → Signed Session Library: checks session
api/superadmin/users.js - Email Auth Utilities → Email Delivery: sends code
lib/email-auth.js - Email Auth Utilities → Supabase Auth Data: stores challenges
lib/email-auth.js - Admin Session Endpoint → Supabase Auth Data: verifies staff
api/auth/edge-session.js