DATUM is a revolutionary personal finance application built on three core principles:
- π§ Mindful Entry - Manual transaction logging forces intentional financial awareness
- π Data Sovereignty - You own your data, stored in YOUR Supabase instance with end-to-end encryption
- π Powerful Insights - AI-driven analysis and sophisticated forecasting tools
Unlike traditional finance apps that automatically sync with your bank accounts, DATUM requires you to manually log every transaction. This "friction by design" approach makes you more mindful of your spending habits. Your data is never stored on our serversβit lives in your personal Supabase database, encrypted with a key only you possess.
- Manual Transaction Entry with amount, type, date, category, tags, mood, and notes
- Mood-Based Tracking - Tag transactions with emotions (π Happy, π Necessary, π€ Impulse, π Regret)
- Flexible Tagging System - Create custom tags for deep analysis (#work, #lunch, #client-meeting)
- Recurring Transaction Templates - Create templates that require manual approval (maintaining mindfulness)
- Where It Went - Pie charts of spending by category
- Mood Monitor - Visualize your emotional relationship with money
- Tag Deep Dive - Analyze spending patterns by custom tags
- Net Worth / Cash Flow - Track income vs expenses over time
- Goal Tracker - Set and monitor financial goals
- What-If Forecasting - Scenario planning with goal integration
- Pattern recognition and spending trend analysis
- Mindful nudges and positive reinforcement
- Conversational interface for financial questions
- Privacy-first: data is anonymized before AI analysis
- CSV Import - Quick start with existing data
- JSON/CSV Export - Full data ownership with easy export
- Real-time Sync - Automatic syncing across all your devices
- Framework: Next.js 14 (App Router)
- Database: Supabase (User's own instance)
- Styling: Tailwind CSS
- UI Components: shadcn/ui + Radix UI
- Charts: Recharts
- AI: Vercel AI SDK
- State Management: Zustand
- Encryption: Web Crypto API (AES-GCM with PBKDF2)
- Node.js 18+ and npm/yarn
- A free Supabase account (supabase.com)
```bash git clone cd datum npm install ```
```bash npm run dev ```
Open http://localhost:3000 to start the onboarding process.
The app will guide you through this, but here's a summary:
- Go to supabase.com and create a free account
- Create a new project (choose any name and password)
- Go to Settings β API in your project
- Copy your Project URL and anon public key
- Go to the SQL Editor in Supabase
- Open the
supabase-schema.sqlfile from this project - Copy the entire SQL script and paste it into the SQL Editor
- Click Run to create all necessary tables
- Return to the DATUM app and enter your Supabase credentials
Choose one of two options:
- Create a strong master password (minimum 8 characters)
- You'll need this password every time you access DATUM
- More secure as the key is derived from your password
- The app generates a cryptographically secure random key
- CRITICAL: You must save this key in a password manager
- If you lose this key, your encrypted data cannot be recovered!
After setup, you'll be taken to your dashboard where you can:
- Add your first transaction
- Create custom categories and tags
- Set financial goals
- Explore AI-powered insights
- Key Generation: When you complete onboarding, a unique encryption key is generated
- Client-Side Encryption: All sensitive data (amounts, notes, AI insights) is encrypted in your browser using AES-GCM before being sent to Supabase
- Zero-Knowledge: Your Supabase database stores only encrypted ciphertext. Even you can't read your data without the encryption key!
- Key Storage:
- Option A: Key is derived from your master password using PBKDF2 (100,000 iterations)
- Option B: Key is stored in browser localStorage (less secure but more convenient)
β
Transaction amounts
β
Transaction notes
β
Goal names and targets
β
AI insights
β Transaction dates (needed for date-based queries)
β Transaction types (expense/income/investment)
β Category and tag IDs (references to unencrypted lookup tables)
β Mood tags (happy/necessary/impulse/regret)
``` datum/ βββ app/ β βββ dashboard/ # Main dashboard pages β βββ globals.css # Global styles β βββ layout.tsx # Root layout β βββ page.tsx # Home page (onboarding router) βββ components/ β βββ ui/ # shadcn/ui components β βββ onboarding-wizard.tsx βββ lib/ β βββ encryption.ts # Web Crypto API wrapper β βββ supabase.ts # Supabase client wrapper β βββ store.ts # Zustand state management β βββ types.ts # TypeScript definitions β βββ utils.ts # Utility functions βββ supabase-schema.sql # Database schema for user's Supabase βββ package.json βββ tailwind.config.js ```
Categories are stored in your Supabase database. You can add more through the UI or directly in your Supabase dashboard:
```sql INSERT INTO categories (name, icon, color) VALUES ('Groceries', 'π', '#10b981'), ('Gym', 'πͺ', '#f59e0b'); ```
Dashboard widgets are configured in the dashboard_widgets table. You can customize the layout, add new widget types, or hide existing ones.
To enable AI-powered insights, you need to configure an AI provider:
- Get an API key from platform.openai.com
- Create a
.env.localfile in the project root:
```env OPENAI_API_KEY=your-api-key-here ```
```env ANTHROPIC_API_KEY=your-api-key-here ```
When you use the AI Insight Coach:
- Only the last 30 days of transactions are sent to the AI
- Transaction notes and personal details are anonymized
- Only aggregated patterns are analyzed
- The AI never stores your data permanently
If you're uncomfortable with this, you can use DATUM without AI features!
- Project initialization and configuration
- Supabase SQL schema
- Encryption utilities (Web Crypto API)
- Onboarding wizard
- Supabase client wrapper
- State management (Zustand)
- Basic dashboard layout
- Transaction entry form with all fields
- Dashboard widgets (charts and visualizations)
- AI Insight Coach integration
- Recurring transaction templates
- What-If forecasting lab
- Goal setting and tracking
- CSV import/export
- Real-time sync across devices
- Mobile responsive design improvements
- Dark mode support
-
PowerShell Execution Policy: If you encounter script execution errors, run PowerShell as Administrator and execute: ```powershell Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser ```
-
TypeScript Errors: Some type errors may appear in development. These will be resolved as dependencies are fully installed.
This is a personal project, but contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - feel free to use this project as you wish!
- Next.js - The React framework
- Supabase - Open source Firebase alternative
- shadcn/ui - Beautiful UI components
- Vercel AI SDK - AI streaming utilities
- Recharts - Composable charting library
For issues, questions, or feature requests, please open an issue on GitHub.
Remember: With great data sovereignty comes great responsibility. Always back up your encryption key and Supabase credentials!