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.
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.
/propertiesUnits
Unit inventory across properties with occupancy and recent activity.
/unitsTenants
Tenant directory, communication log, open requests, and upcoming lease expiries.
/tenantsLeases
Lease lifecycle management with a calendar view, quick actions, and expiry analytics.
/leasesInvoices
Billing overview with recent and overdue invoice tracking.
/invoicesPayments
Collection overview, transaction history, and manual payment recording.
/paymentsMaintenance
Request ticketing, cost overview, and upcoming preventive maintenance.
/maintenanceDocuments
Categorized document storage with upload, trends, and storage usage.
/documentsMessages
Conversation inbox with shared files, scoped to tenants and staff.
/messagesAnnouncements
Community-wide announcements with recent history.
/announcementsReports
Custom and scheduled reports, categorized, with saved views.
/reportsAnalytics
Portfolio-wide income, occupancy trend, and performance insights.
/analyticsSettings
Company profile, general preferences, subscription plan, and activity log.
/settingsTech Stack
No backend is wired up yet — all data comes from src/data/mock-data.ts.
| Layer | Choice |
|---|---|
| UI library | React 19 + TypeScript |
| Build tool | Vite 8 |
| Styling | Tailwind CSS v4 (@tailwindcss/vite), CSS variables for theming |
| Component primitives | Radix UI (dialog, select, tabs, tooltip, popover, …) |
| Routing | react-router-dom v7 |
| Charts | Recharts |
| Icons | lucide-react |
| Toasts | sonner |
| Linting | oxlint |
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.
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
Routing
Defined in src/App.tsx. Most routes render inside AppLayout (persistent sidebar + topbar); /sign-in and /sign-up are standalone pages outside it.
| Path | Page component |
|---|---|
/sign-in | SignIn (standalone, no AppLayout) |
/sign-up | SignUp (standalone, no AppLayout) |
/ | Dashboard |
/properties | Properties |
/properties/:id | PropertyDetail |
/units | Units |
/tenants | Tenants |
/leases | Leases |
/invoices | Invoices |
/payments | Payments |
/maintenance | Maintenance |
/documents | Documents |
/messages | Messages |
/announcements | Announcements |
/reports | Reports |
/analytics | Analytics |
/settings | Settings |
NPM Scripts
| Command | What it does |
|---|---|
npm run dev | Start the Vite dev server with HMR |
npm run build | Type-check (tsc -b) then build the production bundle to dist/ |
npm run preview | Serve the production build locally |
npm run lint | Run Oxlint |
Design Tokens
Defined as CSS variables in src/index.css, with a .dark override block. This documentation page reuses the same tokens.
Base radius is 0.75rem (--radius); font stack is Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif.
Deployment
Hosted on GitHub Pages, deployed automatically by .github/workflows/deploy.yml on every push to main.
| Live URL | cornerstone.codespanda.com |
| Custom domain | public/CNAME holds cornerstone.codespanda.com, auto-assigned via the account's verified codespanda.com domain |
| Build source | GitHub Actions (actions/deploy-pages) |
| Trigger | push to main, or manual workflow_dispatch |
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).