Skip to content
AM
All projects
Real Estate / Marketplace Private

Rentiful Rental Marketplace

A full-stack rental marketplace where tenants search properties on a map, save favourites, apply and track leases and payments, and managers list properties, upload photos and approve applications. Built with Next.js and an Express API on PostgreSQL with PostGIS, using AWS Cognito and S3.

  • Next.js
  • React
  • TypeScript
  • Redux Toolkit
  • Node.js
  • Express.js
  • Prisma
  • PostgreSQL
  • PostGIS
  • AWS Cognito
  • AWS S3
  • Mapbox
  • Tailwind CSS
  • shadcn/ui

Architecture

Overview

Rentiful is a rental marketplace with two kinds of users. Tenants search listings on a map, filter them, save favourites, apply to properties and follow their leases and payment history. Property managers create listings with photos, see their tenants and approve or deny applications.

System

text
Next.js 15 App Router + TypeScript
  │  RTK Query · Tailwind CSS · shadcn/ui · Mapbox GL
  │  AWS Amplify (Cognito sign-in, ID token on every request)
  ▼
Express REST API (TypeScript)
  │  /properties · /applications · /leases · /tenants · /managers
  │  Role check per route (tenant / manager)
  ├──► PostgreSQL + PostGIS via Prisma (raw SQL for geo queries)
  ├──► AWS S3 (property photos)
  └──► OpenStreetMap Nominatim (address geocoding)

Key design decisions

Location as a real geography type. Each property's location is stored as a PostGIS geography(Point, 4326). Map search runs ST_DWithin radius queries written with Prisma.sql, combined with dynamic filters for price, beds, baths, property type, amenities and move-in date.

Geocode once, on write. When a manager creates a listing, the server geocodes the address and stores the point, so searches never call a geocoder per listing.

Managed auth with roles. Sign-up and sign-in use AWS Cognito. The user's role is saved as a custom attribute at sign-up, and the API checks it on each route. On first login, the client creates the matching tenant or manager record if it doesn't exist yet.

One typed API layer on the client. A single RTK Query slice handles every endpoint, attaches the Cognito ID token, and invalidates cached data by tags after mutations.

Shared types. A post-generate script copies the Prisma types into the client, so both sides compile against the same models.

Data model

Property, Location, Manager, Tenant, Application, Lease and Payment, with enums for amenities, highlights, property type, application status and payment status. Approving an application creates the lease in the same step.

Key Implementation Highlights

  1. Built map radius search with PostGIS ST_DWithin in raw Prisma.sql queries, combined with dynamic price, size, type and amenity filters

    Data
  2. Geocoded addresses on the server with OpenStreetMap Nominatim and stored each location as a PostGIS geography point

    Backend
  3. Streamed multi-photo listing uploads to AWS S3 with multer and the AWS SDK's multipart Upload

    Media
  4. Used AWS Cognito sign-in with a custom role attribute, checked by Express middleware on each route

    Security
  5. Built tenant and manager dashboards in Next.js 15 route groups, with one RTK Query API slice handling auth headers and cache tags

    Frontend
  6. Added an interactive Mapbox map with custom markers that stay in sync with the search filters

    Frontend
  7. Made approving an application create the tenant's lease in the same step

    Workflow
  8. Shared Prisma-generated model types between the Express API and the Next.js client

    Architecture

Interested in the technical details?

Let's Talk