3.0 KiB
3.0 KiB
CyberHybridHub TODO
High Priority 🔴
Lease Creation Feature Implementation
Frontend Components
- Create lease creation form component (
components/LeaseForm.tsx)- Rent amount input field
- Security deposit amount input field
- Property selection dropdown
- Lease term start/end date pickers
- Form validation and error handling
- Add "Create New Lease" button next to "Add Property" button on landlord dashboard (
/dashboard/landlordroute) - Create lease creation modal/page (
routes/landlord/create-lease.tsx) - Tenant invitation interface - Email input and invitation sending UI
Backend API Endpoints
- POST
/api/leases- Create new lease endpoint- Request body validation (rent, deposit, propertyId, dates)
- Database insertion with
newstate - Return created lease object
- PUT
/api/leases/:id/invite- Send tenant invitation- Generate invitation token
- Send email to tenant
- Update lease status
- PUT
/api/leases/:id/accept- Tenant accepts invitation- Validate invitation token
- Update lease tenant field and status to
signed
Medium Priority 🟡
Payment Service Fixes
- Implement
getTransactionByStripeId(stripeId: string)inservices/paymentService.ts- Query database by stripe transaction ID
- Return transaction object or null
- Fix TypeScript import errors in receipt API routes
- Check all
routes/api/receipts/files - Fix relative import paths
- Check all
- Add proper TypeScript types for Fresh route handlers
- Define request/response types for API endpoints
- Update handler function signatures
Code Quality & Testing
- Fix TypeScript compilation errors
- Run
deno checkto identify issues - Fix all type mismatches
- Run
- Validate all changed files
- Run
deno fmtfor formatting - Run
deno lintfor code quality - Run
deno checkfor type checking
- Run
- Test lease creation workflow end-to-end
- Manual testing in development environment
- Verify database state changes
- Test tenant invitation flow
Low Priority 🟢
Testing Infrastructure
- Unit tests for lease creation (
tests/unit/lease.test.ts) - Integration tests for tenant invitation flow (
tests/integration/invitation.test.ts) - E2E tests for complete lease lifecycle (
tests/e2e/lease-lifecycle.spec.ts) - Payment service integration tests (
tests/integration/payment.test.ts)
Database Schema Verification Needed
- Verify lease table supports required states
- Check
statecolumn acceptsnewandsigned - Verify
tenant_idcolumn is nullable - Confirm all required fields exist
- Check
Current Blockers
- ❌ TypeScript compilation errors preventing development
- ❌ Missing payment service functions breaking receipt functionality
Next Steps
- Fix immediate TypeScript and payment service issues
- Implement lease creation API endpoints
- Create frontend components for lease management
- Test complete workflow end-to-end