https://github.com/yangjeep/leaselab
Leaselab is an AI-first ops system for rental property management.
https://github.com/yangjeep/leaselab
ai antigravity claude-code cloudflare-workers hono nextjs opencode real-estate rental-management saas-application tailwindcss vercel
Last synced: about 1 month ago
JSON representation
Leaselab is an AI-first ops system for rental property management.
- Host: GitHub
- URL: https://github.com/yangjeep/leaselab
- Owner: yangjeep
- License: mit
- Created: 2025-11-18T04:10:22.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2026-03-27T14:24:48.000Z (3 months ago)
- Last Synced: 2026-03-27T15:58:30.361Z (3 months ago)
- Topics: ai, antigravity, claude-code, cloudflare-workers, hono, nextjs, opencode, real-estate, rental-management, saas-application, tailwindcss, vercel
- Language: TypeScript
- Homepage: https://www.leaselab.ai/
- Size: 14.6 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# LeaseLab
Event-sourced, workflow-centric, multi-tenant property management platform.
## Quick Start
```bash
pnpm install
pnpm dev # Runs leaselab-site + ops (port 3002) concurrently
```
Worker API:
```bash
cd apps/worker && pnpm dev # localhost:8787
```
## Architecture
- **Frontend:** Next.js 15 (multiple apps — see Project Structure), deployed to Vercel
- **Backend:** Cloudflare Workers (Hono), event-sourced with D1 (SQLite)
- **Auth:** Clerk (JWT)
- **Storage:** Cloudflare R2 + KV
All mutations go through `appendEvent` — no direct SQL writes. Multi-tenant isolation via `org_id` on every query.
## Project Structure
```
apps/
worker/ Cloudflare Worker API (Hono, D1, R2, KV)
ops/ Internal operations dashboard (Next.js)
storefront-alda/ ALDA-branded live tenant storefront — connects to production API
leaselab-site/ LeaseLab marketing landing page
workflow/ Cloudflare Workflows (application evaluation, lease activation)
packages/
domain/ Domain events, workflow types, ULID generation
shared/
config/ Zod validation schemas
api/ Response envelope + route helpers
api-client/ Typed API client
types/ Storage interfaces
utils/ Shared utilities
```
## Commands
| Command | Description |
|---------|-------------|
| `pnpm dev` | Run all dev servers |
| `pnpm build` | Build all apps |
| `pnpm test` | Run unit tests |
| `pnpm test:e2e` | Run Playwright E2E tests |
| `pnpm lint` | Lint all workspaces |
| `pnpm typecheck` | Typecheck all workspaces |
## Release Flow
LeaseLab uses a two-branch promotion model with automated release notes.
### Branches
- **`main`** — Development integration branch. All PRs merge here. Preview deployments run on every push.
- **`prod`** — Production promotion branch. A push to `prod` represents a production release event.
### How releases work
1. **PR preview** — When a PR targeting `prod` is opened or updated, a bot comment previews the candidate release notes. No version or tag is created at this stage.
2. **Formal release** — When code is pushed to `prod`, a GitHub Actions workflow automatically:
- Computes the next version using format `vYY.MM.NN` (e.g., `v26.03.17`)
- Creates a GitHub Release with the computed tag and GitHub-generated release notes
3. **Idempotency** — If the pushed commit already has a release tag, the workflow skips.
Release history is maintained entirely through [GitHub Releases](https://github.com/yangjeep/leaselab/releases).
## Documentation
- [Domain Model](docs/domain/domain-model.md)
- [MVP Product Requirements](docs/prd/mvp.md)
- [API Contract](docs/contracts/api.md)
- [Architectural Decisions](docs/decisions/architectural-decisions.md)
- [Property Workflow](docs/workflows/property.md)
- [Listing Workflow](docs/workflows/listing.md)
- [Security](SECURITY.md)
## Agent Instructions
For Claude Code and AI agents:
| File | Role |
|------|------|
| [`CLAUDE.md`](CLAUDE.md) | Primary execution contract — read first |
| [`.agent/README.md`](.agent/README.md) | `.agent/` system overview — read second |
| [`.agent/INDEX.md`](.agent/INDEX.md) | Reading order and task-based navigation |
Detailed binding rules live under `.agent/rules/`, `.agent/workflows/`, and `.agent/checklists/`.
Key rules: all mutations via `appendEvent`; `org_id` on every query; demo data in `apps/leaselab-site` is frontend-only and must not import from worker, shared packages, or production logic.