C Cornerstone docs · v0.0.0
Documentation

Cornerstone

A property management dashboard for tracking properties, units, tenants, leases, billing, and maintenance from a single console. Built with React 19, TypeScript, and Tailwind CSS v4.

React 19 TypeScript Vite 8 Tailwind CSS v4 Radix UI
Introduction

Modules

Fourteen routed pages under a shared app shell (sidebar + topbar). Each page composes cards and charts from its own src/components/<module>/ folder.

Dashboard

KPI stat cards, revenue and occupancy charts, recent payments, maintenance, and lease-expiry lists.

/

Properties

Portfolio list and detail view with financial summary, amenities, map, and unit-type distribution.

/properties

Units

Unit inventory across properties with occupancy and recent activity.

/units

Tenants

Tenant directory, communication log, open requests, and upcoming lease expiries.

/tenants

Leases

Lease lifecycle management with a calendar view, quick actions, and expiry analytics.

/leases

Invoices

Billing overview with recent and overdue invoice tracking.

/invoices

Payments

Collection overview, transaction history, and manual payment recording.

/payments

Maintenance

Request ticketing, cost overview, and upcoming preventive maintenance.

/maintenance

Documents

Categorized document storage with upload, trends, and storage usage.

/documents

Messages

Conversation inbox with shared files, scoped to tenants and staff.

/messages

Announcements

Community-wide announcements with recent history.

/announcements

Reports

Custom and scheduled reports, categorized, with saved views.

/reports

Analytics

Portfolio-wide income, occupancy trend, and performance insights.

/analytics

Settings

Company profile, general preferences, subscription plan, and activity log.

/settings
Development

Tech Stack

No backend is wired up yet — all data comes from src/data/mock-data.ts.

LayerChoice
UI libraryReact 19 + TypeScript
Build toolVite 8
StylingTailwind CSS v4 (@tailwindcss/vite), CSS variables for theming
Component primitivesRadix UI (dialog, select, tabs, tooltip, popover, …)
Routingreact-router-dom v7
ChartsRecharts
Iconslucide-react
Toastssonner
Lintingoxlint
Development

Getting Started

Requires Node 20+.

git clone https://github.com/codespanda/cornerstone.git
cd cornerstone
npm install
npm run dev

The dev server runs at http://localhost:5173. Port is fixed (strictPort) and configurable via the PORT env var.

Development

Project Structure

src/
├── components/
│   ├── layout/        topbar, sidebar, mobile-sidebar, nav-items
│   ├── ui/             shadcn-style primitives (button, dialog, table, …)
│   └── <module>/       one folder per page (dashboard, properties, leases, …)
├── data/mock-data.ts   static sample data for every module
├── lib/                format.ts (currency/date), utils.ts (cn helper)
├── pages/              one file per route, composes cards from components/<module>
├── types/index.ts       shared TypeScript types
├── App.tsx             route table
├── main.tsx            React root + providers
└── index.css           design tokens + Tailwind layer
Development

Routing

Defined in src/App.tsx. Most routes render inside AppLayout (persistent sidebar + topbar); /sign-in and /sign-up are standalone pages outside it.

PathPage component
/sign-inSignIn (standalone, no AppLayout)
/sign-upSignUp (standalone, no AppLayout)
/Dashboard
/propertiesProperties
/properties/:idPropertyDetail
/unitsUnits
/tenantsTenants
/leasesLeases
/invoicesInvoices
/paymentsPayments
/maintenanceMaintenance
/documentsDocuments
/messagesMessages
/announcementsAnnouncements
/reportsReports
/analyticsAnalytics
/settingsSettings
Development

NPM Scripts

CommandWhat it does
npm run devStart the Vite dev server with HMR
npm run buildType-check (tsc -b) then build the production bundle to dist/
npm run previewServe the production build locally
npm run lintRun Oxlint
Design

Design Tokens

Defined as CSS variables in src/index.css, with a .dark override block. This documentation page reuses the same tokens.

backgroundoklch(0.985 .003 247)
foregroundoklch(0.18 .02 265)
primaryoklch(0.47 .19 264)
secondaryoklch(0.96 .01 260)
mutedoklch(0.96 .008 260)
accentoklch(0.95 .02 260)
successoklch(0.6 .15 155)
warningoklch(0.75 .16 80)
chart-1oklch(0.55 .2 264)
chart-2oklch(0.7 .17 160)
chart-3oklch(0.75 .16 80)
chart-4oklch(0.62 .22 300)

Base radius is 0.75rem (--radius); font stack is Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif.

Operations

Deployment

Hosted on GitHub Pages, deployed automatically by .github/workflows/deploy.yml on every push to main.

Live URLcornerstone.codespanda.com
Custom domainpublic/CNAME holds cornerstone.codespanda.com, auto-assigned via the account's verified codespanda.com domain
Build sourceGitHub Actions (actions/deploy-pages)
Triggerpush to main, or manual workflow_dispatch
Help

FAQ

Why does a hard reload on a route like /properties need special handling?

GitHub Pages is a static host with no file at that path. The build copies index.html to 404.html, so GitHub serves the app for any unmatched path and React Router takes over from the real URL.

How do I add a new page?

Create the page in src/pages/, register its route in src/App.tsx, and add a nav entry in src/components/layout/nav-items.ts.

Where does the data come from?

Everything currently reads from the static fixtures in src/data/mock-data.ts — there is no API or database layer yet.

How do I change the theme?

Edit the CSS custom properties in src/index.css (light tokens under :root, dark tokens under .dark).