A modern React + TypeScript dashboard for tracking ADU construction progress, expenses, and milestones with real-time backend data management.
β¨ Current Features:
- π Real-time budget tracking with backend persistence
- π° Customizable multi-phase expense breakdown (configurable via CMS)
- π§Ύ Configurable expense items with dynamic details
- π Animated progress visualization
- π Email-based authentication with whitelist
- Set
WHITELISTED_EMAILSenvironment variable (comma-separated emails) - Dynamically loaded on each request, never hardcoded
- Set
- π Whitelisted users see:
- Full budget including all configured phases
- All project phases and line items
- Data Manager admin panel
- π₯ Non-whitelisted users see:
- Public view with filtered phases
- Project costs based on visibility rules
- π± Fully responsive mobile design
- β‘ Built with React 18, TypeScript, Vite, and Tailwind CSS
- ποΈ Python backend with data persistence to JSON
# Terminal 1: Start Python backend API
python3 server.py
# Runs at http://localhost:8888# Terminal 2: Start React development server
npm install # if needed
npm run dev
# Opens at http://localhost:5173Then open: http://localhost:5173
The dashboard uses email-based authentication to control access to sensitive features.
- The whitelist is loaded dynamically on every request from the
WHITELISTED_EMAILSenvironment variable - This ensures Railway env vars are always fresh (not stale from startup)
- Users with whitelisted emails get access to the Data Manager and full budget details
- Non-whitelisted users see a public view only
Add to .env file:
WHITELISTED_EMAILS=user1@example.com,user2@example.com
The .env file is loaded automatically by python3 server.py via dotenv.
- Go to your Railway project dashboard
- Click Variables
- Add a new variable:
- Name:
WHITELISTED_EMAILS - Value:
email1@example.com,email2@example.com(comma-separated, no spaces)
- Name:
- Deploy - the whitelist is now active
Important: The env var is read at request time, not at startup. This means Railway env vars are guaranteed to be available regardless of deployment timing.
This project follows industry-standard conventions for clean, professional structure:
Documentation & Governance:
README.md- Main project documentation (you are here)CONTRIBUTING.md- Contribution guidelines and workflowLICENSE- MIT LicenseSECURITY.md- Security policy and reportingCODE_OF_CONDUCT.md- Community standards
Configuration:
package.json/package-lock.json- Node dependenciestsconfig.json- TypeScript configurationvite.config.ts- Build configurationtailwind.config.js- CSS frameworkpostcss.config.js- CSS processingeslint.config.mjs- Code lintingjest.config.js- Test framework.env.example- Environment template.gitignore- Git ignore rulesvercel.json- Deployment config
Application:
server.py- Python backend APIindex.html- React entry point
/docs/- Comprehensive documentation (10+ markdown files)/src/- React components and application code/api/- Backend API routes/assets/- Static files and images/tests/- Test suites (Jest + Playwright E2E)
- Contributing Guide - How to contribute, branch workflow, PR process
- Security Policy - Reporting vulnerabilities, security best practices
- Code of Conduct - Community standards and expectations
- License - MIT License
- Quick Reference - Commands, budget, emails, and quick lookup
- Admin Setup - Admin panel features and usage guide
- Project Overview - Current implementation status and features
- Development Summary - Development phases and architecture
- Structure Guide - Detailed directory structure
- Deployment Guide - Deployment options (Vercel, S3, etc.)
- React Migration - React migration history
- Changelog - Version history and release notes
- Git Summary - Complete git organization
- Git History - Detailed commit history
GET /api/data
β Returns all expense phases with line items
POST /api/data
β Save updated expense data to data.json
GET /api/sheets-link?email=USER_EMAIL
β Check if email is whitelisted and return Google Sheets link
GET /api/expenses-signoff
β Return expense sign-off status
Budget Calculation: Dynamically calculated from configured phases
Phases are fully configurable via the Data Manager:
- Each phase can contain multiple line items
- Phase totals are auto-calculated from line items
- Phases can be hidden/shown based on user role
- Budget totals update automatically when data changes
Whitelisted emails are configured in .env file under VITE_WHITELISTED_EMAILS:
VITE_WHITELISTED_EMAILS=user1@example.com,user2@example.com- Deployed automatically from
masterbranch to https://adu-dashboard.vercel.app/ - Only deploys from
master(prevents rate limiting fromdevelopbranch) - Built with Vite + React 18
Critical Setup for Railway:
-
Docker Configuration: Backend uses Dockerfile (not Nixpacks) to avoid building Node.js frontend
- Python 3.11 slim image
- Only copies
server.py - Creates empty
data.jsonon build
-
Environment Variables (set in Railway dashboard):
PORT=8080 (CRITICAL - must match target port) VITE_WHITELISTED_EMAILS=email1@example.com,email2@example.com VITE_API_URL=https://adu-dashboard-production.up.railway.app (for frontend) VITE_GOOGLE_CLIENT_ID=<your-client-id> -
Networking Configuration (Railway dashboard β Settings β Networking):
- Target Port: 8080 (must match PORT env variable)
- Custom Domain: adu-dashboard-production.up.railway.app
-
Health Check (set in
railway.toml):- Path:
/health - Timeout: 300 seconds
- Path:
Deployment Process:
- Commit changes to
masterbranch - Railway auto-detects and rebuilds
- Verifies healthcheck at
/healthendpoint - Routes traffic to port 8080
Troubleshooting:
- If getting 502 errors: Check that
PORT=8080environment variable is set - If build fails: Verify Dockerfile is using Python-only (no npm)
- If health check fails: Ensure
/healthendpoint is responding (check server.py logs)
Users with whitelisted emails see:
- All project expense phases
- Full budget with all line items
- Data Manager admin panel
- Cost breakdown by phase
Whitelisted users can access the Data Manager to:
- Edit phase names and line item descriptions
- Update cost values
- Add/remove line items
- Auto-calculated phase totals
- Save changes to backend (persisted to data.json)
Access: Click "π Data Manager" button on dashboard footer (whitelisted users only)
/
βββ README.md # Main project documentation (you are here)
βββ package.json # Node dependencies and scripts
βββ tsconfig.json # TypeScript configuration
βββ vite.config.ts # Vite build configuration
βββ tailwind.config.js # Tailwind CSS configuration
βββ postcss.config.js # PostCSS configuration
βββ eslint.config.mjs # ESLint configuration
βββ jest.config.js # Jest test configuration
βββ vitest.config.mjs # Vitest configuration
β
βββ .env # Environment variables (local)
βββ .env.example # Environment variables template
βββ .gitignore # Git ignore rules
βββ vercel.json # Vercel deployment config
β
βββ server.py # Python backend API server
βββ index.html # HTML entry point
β
βββ src/ # React source code
βββ api/ # API routes/handlers
βββ assets/ # Static assets
βββ tests/ # Test files
βββ docs/ # π All documentation (organized)
βββ node_modules/ # Dependencies (auto-generated)
βββ .git/ # Git repository
src/
βββ App.tsx # Main app with data filtering
βββ Router.tsx # Page routing (Dashboard/Admin)
βββ pages/
β βββ Admin.tsx # Data manager admin panel
βββ components/
β βββ ExpenseBreakdown.tsx # Phase display
β βββ ProgressBar.tsx # Progress visualization
β βββ StatCard.tsx # Metric cards
β βββ ... (other components)
βββ hooks/
β βββ useAuth.ts # Authentication logic
β βββ useFetchADUData.ts # Data fetching
βββ styles/
β βββ Admin.css # Admin panel styling
β βββ Router.css # Navigation styling
β βββ App.css # Global styles
βββ types/
βββ index.ts # TypeScript interfaces
docs/
βββ QUICK_REFERENCE.md # Quick commands and lookup
βββ ADMIN_SETUP.md # Admin panel guide
βββ PROJECT-OVERVIEW.md # Implementation status
βββ DEVELOPMENT-SUMMARY.md # Development phases
βββ STRUCTURE.md # Detailed directory info
βββ DEPLOYMENT.md # Deployment instructions
βββ CHANGELOG.md # Version history
βββ REACT-MIGRATION.md # Migration notes
βββ GIT_AND_DOCUMENTATION_SUMMARY.md # Git organization
βββ GIT_COMMIT_SUMMARY.txt # Detailed commit history
See Deployment Guide for detailed instructions on:
- Building for production
- Deploying to Vercel
- Deploying to AWS S3 + CloudFront
- Other hosting options
- β Multi-phase expense tracking with dynamic budgets
- β Email-based whitelist for access control
- β Data Manager admin panel with full CRUD operations
- β Backend data persistence to JSON file
- β Role-based budget visibility (whitelisted vs. public)
- β Animated progress visualization
- β Backend API with Python server
- β Railway deployment with Docker
- β Generic example data as fallback (real data from backend)
- β Refactored root directory with industry standards
- β
All documentation moved to
/docsdirectory
Port 8888 already in use:
# Find and kill the process
lsof -i :8888
kill -9 <PID>
# Then restart
python3 server.pyPort 5173 already in use:
npm run dev -- --port 3000
# Will run on http://localhost:3000Dependencies issues:
rm -rf node_modules package-lock.json
npm install
npm run devFor more troubleshooting, see Deployment Guide.
- See Changelog for version history
- See Git History for project timeline
- See Structure Guide for detailed directory info
Project Location: /
Last Updated: February 11, 2026
Status: β
v2.0 Production Ready
Built with: React 18, TypeScript, Python, Tailwind CSS