Skip to content

Capt-AJ/NestFlow

Repository files navigation

NestFlow

NestFlow is an AI-assisted tenant lifecycle platform for property managers.

This repository currently implements the first MVP wave end-to-end:

  • Property creation with public application links
  • Tenant application submission through /apply/[token]
  • AI application scoring (structured + cached)
  • Applicant review (including top-3 shortlist)
  • Accept/reject decisions with lease draft creation
  • Lease signing with tenant activation
  • Tenant portal gating and maintenance request submission
  • AI maintenance urgency scoring (structured + cached + manual refresh)

Tech Stack

  • Next.js 15 (App Router)
  • TypeScript
  • Prisma + PostgreSQL
  • Tailwind CSS
  • Zod
  • Google Gemini API

Quick Start

cp .env.example .env
npm install
npx prisma generate
npm run db:push
npm run db:seed
npm run dev

Open http://localhost:3000.

Environment Variables

  • DATABASE_URL
  • GEMINI_API_KEY
  • GEMINI_MODEL (optional, defaults to gemini-2.5-flash)
  • BLOB_READ_WRITE_TOKEN (reserved for future upload integration)

Primary Demo Routes

  • /dashboard Manager landing
  • /properties Property creation + application links
  • /apply/harbour-view-demo Public application form
  • /properties/:id Applicant review + top 3 + accept/reject
  • /lease/:leaseId Lease draft + signing
  • /tenant?applicationId=:applicationId Tenant portal (gated)
  • /maintenance Manager maintenance queue + urgency scoring display

Architecture Summary

NestFlow follows a modular monolith pattern:

  • app/*: pages, route handlers, and server actions
  • features/*: domain services and Zod contracts
  • lib/db/repositories/*: DB-only persistence helpers
  • lib/ai/*: Gemini wrapper and AI output schemas

Rules enforced in implementation:

  • UI does not call Gemini directly
  • Server actions call services
  • Services orchestrate repositories and AI helpers
  • AI outputs are structured JSON validated with Zod
  • AI results are cached in DB and reused when possible

Current Demo Scope Notes

  • Identity is demo-scoped via route/query context (not full auth yet)
  • AI outputs are advisory only and do not make autonomous decisions
  • Maintenance urgency does not auto-update request status
  • Move-in/move-out inspection comparison is planned, not implemented in this wave

Documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors