Skip to content

A lightweight, multi-tenant CRM tuned for landlords and property managers. The project ships with a Node.js backend (no external npm dependencies) and a vanilla JavaScript UI, so everything can be executed on a macOS/iOS development machine without extra tooling.

Notifications You must be signed in to change notification settings

zmije1kw/CRM_v5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Lightweight Landlord CRM

A lightweight, multi-tenant CRM tuned for landlords and property managers. The project ships with a Node.js backend (no external npm dependencies) and a vanilla JavaScript UI, so everything can be executed on a macOS/iOS development machine without extra tooling.

Features

Backend API

  • Multi-user (tenant) data separation using an X-Tenant-Id header.
  • User accounts (tenants), team members, properties, customers/residents, leases, and tasks resources with CRUD endpoints.
  • JSON file storage (one file per deployment) keeps the footprint tiny while remaining persistent.
  • Dashboard endpoint aggregates rent pipeline value, portfolio totals, and upcoming tasks.
  • CORS enabled out of the box for the bundled frontend.
  • End-to-end tests written with the built-in Node test runner (node --test).

Frontend UI

  • Zero-build vanilla JS single-page app served from static files.
  • Dashboard, Customers, Properties, Leases, Tasks, and Settings views.
  • User picker and onboarding modal.
  • Inline editing for resident stage, approval status, and lease stage/status.
  • Task tracker with completion toggles.
  • Settings view to change the API base URL and manage portfolio users.

Real estate terminology

  • Users map to the multi-tenant /tenants endpoints and represent a landlord or property management account.
  • Properties reuse the /companies endpoints for buildings or individual rentals, with address, city, state, and unit counts captured directly on the record.
  • Customers/Residents reuse the /contacts endpoints for tenant leads and occupants, and now include an approval status of approved, unapproved, or pending alongside the pipeline stage.
  • Leases reuse the /deals endpoints and support stages inquiry, tour scheduled, application submitted, screening, lease signed with statuses active, leased, or lost.
  • Tasks reuse the /activities endpoints for maintenance, follow-ups, and showings.

Project structure

CRM_v3/
├── server/        # Node.js backend (file-based persistence)
├── client/        # Static frontend (HTML/CSS/JS)
└── README.md      # This file with setup details

Prerequisites

  • Node.js 20+ (for native fetch and the built-in test runner).
  • A modern browser (Safari/Chrome/Firefox) to open the frontend. No bundler is required.

Running the backend

cd server
npm install  # no external deps, but initialises package-lock for reproducibility
npm run dev  # starts the API on http://localhost:4000

The backend persists data to server/data/crm-data.json. Remove the file to reset the environment.

Running the frontend

The UI is plain static content, so you can serve it with any local HTTP server. A simple option using Python:

cd client
python3 -m http.server 5173

Now open http://localhost:5173 in your browser. The UI points to http://localhost:4000/api by default; adjust the API base in Settings → API configuration if you change the backend URL.

First-time setup workflow

  1. Launch the backend (npm run dev in server).
  2. Serve the frontend (e.g. python3 -m http.server inside client).
  3. Visit the UI and create a user using the “New user” button.
  4. Select the user from the dropdown. The rest of the sections will now load.
  5. Use Settings to add team members, then manage customers (residents), properties, leases, and tasks.

API reference

All API endpoints live under /api. Most routes require an X-Tenant-Id header (except tenant creation/listing and health).

Method Path Description
GET /api/health Simple health probe
POST /api/tenants Create a user record (tenant)
GET /api/tenants List users (tenants)
GET /api/users List team members for the selected user
POST /api/users Create a user
GET /api/contacts List customers/residents (supports search, status, approvalStatus)
POST /api/contacts Create a customer/resident lead
PUT /api/contacts/:id Update a customer/resident
DELETE /api/contacts/:id Remove a customer/resident
GET /api/companies List properties
POST /api/companies Create a property
PUT /api/companies/:id Update a property
GET /api/deals List leases (filter by stage, status)
POST /api/deals Create a lease opportunity
PUT /api/deals/:id Update a lease
DELETE /api/deals/:id Remove a lease
GET /api/activities List tasks
POST /api/activities Create a task
PUT /api/activities/:id Update a task
DELETE /api/activities/:id Remove a task
GET /api/dashboard Aggregated metrics for the portfolio

Example request

curl -X POST http://localhost:4000/api/contacts \
  -H "Content-Type: application/json" \
  -H "X-Tenant-Id: <tenant-id>" \
  -d '{
        "firstName": "Jordan",
        "lastName": "Lee",
        "email": "[email protected]",
        "status": "prospect",
        "approvalStatus": "pending"
      }'

Testing

Run the automated backend test suite from the server folder:

cd server
npm test

The tests spin up an isolated API server, create a full portfolio workflow, and verify that the dashboard aggregates data correctly.

Deployment notes

  • Because the backend has zero npm dependencies, deployment is as simple as copying the server directory to any machine with Node.js 20 and running npm run start.
  • The frontend can be hosted from any static file service (e.g. GitHub Pages, S3, or an nginx container). Update the API base URL in Settings after deployment.
  • For production, consider running the backend behind a process manager like pm2 or a systemd service, and place the server/data directory on persistent storage.

Extending the system

  • Replace the JSON storage with a different persistence layer by modifying server/src/storage/dataStore.js.
  • Add new resources by expanding the DataStore class and wiring routes in server/src/routes/index.js.
  • The frontend is modular; add new pages under client/src/pages and register them in src/main.js.

Enjoy building on top of this landlord CRM foundation!

About

A lightweight, multi-tenant CRM tuned for landlords and property managers. The project ships with a Node.js backend (no external npm dependencies) and a vanilla JavaScript UI, so everything can be executed on a macOS/iOS development machine without extra tooling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published