Kalops Budget App
A Next.js budget tracking dashboard for the Kalops FinOps platform. Integrates with Airtable for data storage and Starling Bank for automatic transaction sync.Features
- Dashboard - Real-time budget performance, spending trends, and alerts
- Transactions - View and manage transaction history with auto-categorization
- Categories - Budget category tracking with visual progress indicators
- Alerts - Configurable budget alerts and notifications
- Widget - Embeddable widget for Kalweb integration
Tech Stack
| Category | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| UI | React 19 + shadcn/ui + Tailwind CSS v4 |
| Charts | Recharts |
| Data | TanStack React Query |
| Database | Airtable |
| Bank Integration | Starling Bank API |
| Testing | Vitest + Testing Library |
Quick Start
Prerequisites
- Node.js 20+
- npm
- Airtable account (see source repository for setup guide)
Installation
Scripts
| Command | Description |
|---|---|
npm run dev | Start development server |
npm run build | Build for production |
npm run start | Start production server |
npm run lint | Run ESLint |
npm run test | Run tests in watch mode |
npm run test:run | Run tests once |
npm run test:coverage | Run tests with coverage |
Environment Variables
Copy.env.example to .env.local and configure:
| Variable | Required | Description |
|---|---|---|
AIRTABLE_API_KEY | Yes | Airtable Personal Access Token |
AIRTABLE_BASE_ID | Yes | Airtable Base ID |
NEXT_PUBLIC_APP_URL | Yes | Production URL |
STARLING_ACCESS_TOKEN | No | Starling Bank API token |
NEXT_PUBLIC_LOCALE | No | Locale (default: en-GB) |
NEXT_PUBLIC_CURRENCY | No | Currency (default: GBP) |
.env.example for all options.
Deployment
Vercel (Recommended)
- Push to GitHub
- Import in Vercel Dashboard
- Set root directory:
finops/budget-app - Add environment variables
- Deploy
Docker (Self-hosted)
vercel.json and docker-compose.yml in the source repository for configuration details.
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/health | GET | Health check with connectivity tests |
/api/airtable/transactions | GET | Fetch transactions |
/api/airtable/performance | GET | Category performance data |
/api/airtable/categories | GET | Budget categories |
/api/airtable/alerts | GET, PATCH | Get/acknowledge alerts |
/api/budget/summary | GET | Dashboard summary |
Project Structure
Documentation
Additional documentation available in the source repository:- Airtable Setup Guide - Database configuration
- Starling Bank Integration - Bank API setup
- Architecture Overview - Technical architecture
- Security Documentation - Security configuration
Testing
Security
SeeSECURITY.md in the source repository for:
- Rate limiting configuration
- Security headers
- Input validation
- CORS settings
Contributing
- Create a feature branch
- Make changes with tests
- Ensure lint and tests pass
- Create a pull request