A React + TypeScript + Vite application for the DWELIX multi-tenant property rental platform, designed for deployment on Google Cloud Platform.
- Frontend Framework: React 18 with TypeScript
- Build Tool: Vite for fast development and optimized builds
- UI Library: shadcn/ui components with Tailwind CSS
- State Management: Zustand for global state
- Routing: React Router v6 with role-based dashboard routing
- Deployment: GCP Cloud Run with automated CI/CD
- 8 Role-Based Dashboards: Tenant, Landlord, Scout, Agent, Lawyer, Support, Admin, Super Admin
- Scout-Only Property Access: Secure key custody management system
- Real-time GPS Tracking: For scout check-in/check-out operations
- Lawyer-Verified Agreements: Legal document management workflow
- Paystack Integration: Secure payment processing for Nigerian market
- Node.js 18+
- npm or yarn
- GCP account (for deployment)
-
Clone and Install
cd client-side npm install -
Environment Setup
cp .env.example .env # Edit .env with your configuration -
Start Development Server
npm run dev
Application will be available at
http://localhost:3000
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build locallynpm run lint- Run ESLintnpm run type-check- Run TypeScript type checking
The application supports 8 distinct user roles with separate dashboards:
| Role | Dashboard Features | Key Responsibilities |
|---|---|---|
| Tenant | Property search, viewing requests, applications | Find and rent properties |
| Landlord | Property management, key handover, applications | List and manage properties |
| Scout | Task management, GPS tracking, property verification | Field operations and verification |
| Agent | Key custody, checkout/return management | Secure key storage and distribution |
| Lawyer | Ownership verification, agreement drafting | Legal services and documentation |
| Support | User assistance, issue resolution | Customer support operations |
| Admin | Platform management, user oversight | System administration |
| Super Admin | Full system access, configuration | Complete platform control |
src/
├── components/ # Reusable UI components
│ └── ui/ # shadcn/ui components
├── pages/ # Page components
│ └── dashboards/ # Role-specific dashboards
├── store/ # Zustand state management
├── types/ # TypeScript type definitions
├── lib/ # Utility functions
└── hooks/ # Custom React hooks
-
Setup GCP Project
gcloud config set project YOUR_PROJECT_ID gcloud services enable cloudbuild.googleapis.com gcloud services enable run.googleapis.com
-
Deploy via Cloud Build
gcloud builds submit --config cloudbuild.yaml
-
Build Container
docker build -t gcr.io/YOUR_PROJECT_ID/dwelix-client . docker push gcr.io/YOUR_PROJECT_ID/dwelix-client -
Deploy to Cloud Run
gcloud run deploy dwelix-client \ --image gcr.io/YOUR_PROJECT_ID/dwelix-client \ --platform managed \ --region us-central1 \ --allow-unauthenticated
| Variable | Description | Example |
|---|---|---|
VITE_API_BASE_URL |
Backend API endpoint | https://api.dwelix.com |
VITE_PAYSTACK_PUBLIC_KEY |
Paystack public key | pk_live_... |
VITE_GOOGLE_MAPS_API_KEY |
Google Maps API key | AIza... |
VITE_GCP_PROJECT_ID |
GCP project identifier | dwelix-prod |
| No special Google OAuth setup required | The app uses a manual "Add to Google Calendar" link which opens a pre-filled Google Calendar event in the browser. No OAuth or API credentials are needed for this flow. |
VITE_ENABLE_SCOUT_GPS- Enable GPS tracking for scoutsVITE_ENABLE_KEY_CUSTODY- Enable key custody managementVITE_ENABLE_LAWYER_VERIFICATION- Enable lawyer verification workflow
Built with shadcn/ui and Tailwind CSS for consistent, accessible design:
- Design System: Consistent color palette and typography
- Responsive: Mobile-first responsive design
- Accessible: WCAG 2.1 compliant components
- Themeable: Light/dark mode support
- Role-Based Access Control: Strict dashboard separation
- Input Validation: Client-side validation with TypeScript
- Secure Headers: CSP, HSTS, and other security headers
- Environment Isolation: Separate configs for dev/staging/prod
- Progressive Web App: PWA-ready with service worker support
- Touch-Friendly: Optimized for mobile interactions
- Offline Support: Basic offline functionality for critical features
- Code Splitting: Route-based code splitting
- Tree Shaking: Unused code elimination
- Asset Optimization: Image compression and lazy loading
- CDN Ready: Static asset optimization for CDN delivery
- Unit Tests: Component and utility function testing
- Integration Tests: User flow and API integration testing
- E2E Tests: Critical path automation testing
- Performance Tests: Core Web Vitals monitoring
- Error Tracking: Integrated error reporting
- Performance Monitoring: Real User Monitoring (RUM)
- Usage Analytics: User behavior tracking
- Health Checks: Application health monitoring
- Follow the established code style and patterns
- Ensure TypeScript strict mode compliance
- Add tests for new features
- Update documentation for API changes
Proprietary - DWELIX Platform © 2026