KeySpace
Problem
Rental property hunting and listing is fragmented, making it difficult for tenants and landlords to connect, manage rental requests, and complete payments in one place.
Solution
Built a modern, responsive rental property marketplace with dedicated roles for Tenants, Landlords, and Admins. Tenants browse and submit rental requests with Stripe payments; Landlords list properties, manage availability, and approve or reject requests; Admins moderate users and monitor platform statistics.
Challenge
Orchestrating a consistent rental state flow from request and approval to payment and activation, while verifying payments on the server with Stripe webhooks to prevent false payment confirmations.
Custom JWT route proxy vs. Next.js middleware
- Tradeoff
- Chose edge-friendly proxy.ts for dynamic fallback routing and HTTP-only cookie management over Next.js middleware to maintain full control over token refresh and role checks.
- What changed
- Enabled route protection for /dashboard nested paths while preserving anonymous access to public property browsing.
Outcome
Secured rental operations with JWT authentication, role-based access control, and ownership checks. Improved responsiveness by caching and synchronizing frequently changing server data with TanStack Query.
Takeaway
Strengthened expertise in end-to-end transactional workflow design, Stripe webhook payment verification, and JWT-based role security. Gained practical experience building full-stack role-based marketplaces with real payment integration.