Run your business smarters
Discord
·
Website
·
Issues
Midday is an all-in-one tool designed to help freelancers, contractors, consultants, and solo entrepreneurs manage their business operations more efficiently. It integrates various functions typically scattered across multiple platforms into a single, cohesive system.
Time Tracking: Allows for live time tracking of projects to boost productivity and collaboration, providing insightful project overviews.
Invoicing: Create web-based invoices with a visual editor, real-time collaboration, PDF generation, tax override system, and invoice search capabilities.
Magic Inbox: Automatically matches incoming invoices or receipts to the correct transactions, simplifying financial tracking and organization. Includes Gmail integration for seamless email processing.
Vault: Secure storage for important files like contracts and agreements, keeping everything in one place for easy access. Includes file deletion safety warnings.
Transaction Management: Advanced filtering system, inline editing, transaction categorization, and bulk export to CSV/XLSX with customizable settings and email delivery to accountants.
Invoice Products: Full-featured product catalog with autocomplete, reusable templates, and usage tracking for efficient invoice creation.
Bank Connections: Multi-provider support including GoCardLess (EU), Plaid (Canada/US), Teller (US), and Enable Banking (EU) for comprehensive account aggregation.
Assistant: Provides tailored insights into financial situations, helping users understand spending patterns, cut costs, and find documents.
- Transaction Filtering System - Advanced filter capabilities for transaction management with improved search and filtering UI
- Transaction Inline Editing - Edit transactions directly from the transaction list without opening a modal
- Invoice Search - Search functionality to quickly find invoices by various criteria
- Gmail Integration - Connect Gmail account for automated invoice and receipt processing through Magic Inbox
- Tax Override Feature - Manual VAT/tax calculation overrides for invoices with automatic tax rate resolution
- Export Settings & Transaction Export - Enhanced export capabilities with CSV/XLSX formats, configurable delimiters, and optional email delivery to accountants
- Enable Banking Integration - Complete integration with Enable Banking provider for European bank connections with JWT-based security
- Invoice Products Management - Full product catalog system with autocomplete, reusable templates, and usage tracking
- Bulk Invoice Operations - Download multiple invoices at once and perform bulk actions on invoice lists
- Category Management Refactor - Modernized category management with improved forms, parent category selection, and better UX
- Invoice Summary & Multi-Currency Support - Enhanced invoice summary calculations with automatic multi-currency totals
- Vault File Deletion Safety - Warning dialogs when deleting vault files to prevent accidental deletions
- Teams API Endpoint - New REST API endpoint for team management operations
- CASA Implementation - Enhanced middleware architecture with advanced routing rules and improved security headers
- SEO Optimization - Blog URL migration (/blog/ → /updates/) and metadata enhancements
- Country Selector UX - Improved popover z-index and portal support
- Middleware Stability - Locale cookie handling and edge case fixes
- Realtime Data Synchronization - Improved realtime data updates across the application
- Global Sheets Management - Centralized sheet management system for better state handling
- Search Query Improvements - Enhanced search functionality across the application
We are working on the documentation to get started with Midday for local development: https://docs.midday.ai
git clone [email protected]:Nicholas0350/nicholas.git midday
cd midday
bun installCreate a new Supabase project at https://supabase.com/dashboard
Run in Supabase SQL Editor:
CREATE EXTENSION IF NOT EXISTS vector;
CREATE EXTENSION IF NOT EXISTS pg_trgm;Run in Supabase SQL Editor:
-- nanoid function
CREATE OR REPLACE FUNCTION nanoid(size int DEFAULT 21)
RETURNS text AS $$
DECLARE
id text := '';
i int := 0;
alphabet char(64) := '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_';
bytes bytea := gen_random_bytes(size);
byte int;
BEGIN
WHILE i < size LOOP
byte := get_byte(bytes, i);
id := id || substr(alphabet, (byte & 63) + 1, 1);
i := i + 1;
END LOOP;
RETURN id;
END
$$ LANGUAGE plpgsql VOLATILE;
-- generate_inbox function
CREATE OR REPLACE FUNCTION generate_inbox(size int DEFAULT 10)
RETURNS text AS $$
BEGIN
RETURN nanoid(size);
END
$$ LANGUAGE plpgsql VOLATILE;
-- extract_product_names function
CREATE OR REPLACE FUNCTION extract_product_names(products json)
RETURNS text AS $$
DECLARE
result text := '';
BEGIN
IF products IS NOT NULL THEN
SELECT string_agg(p->>'name', ' ') INTO result
FROM json_array_elements(products) AS p;
END IF;
RETURN COALESCE(result, '');
END
$$ LANGUAGE plpgsql IMMUTABLE;
-- generate_inbox_fts function
CREATE OR REPLACE FUNCTION generate_inbox_fts(display_name text, product_names text)
RETURNS tsvector AS $$
BEGIN
RETURN to_tsvector('english', COALESCE(display_name, '') || ' ' || COALESCE(product_names, ''));
END
$$ LANGUAGE plpgsql IMMUTABLE;
-- Create private schema and auth function
CREATE SCHEMA IF NOT EXISTS private;
CREATE OR REPLACE FUNCTION private.get_teams_for_authenticated_user()
RETURNS SETOF uuid AS $$
BEGIN
RETURN QUERY
SELECT team_id FROM users_on_team WHERE user_id = auth.uid();
END
$$ LANGUAGE plpgsql SECURITY DEFINER STABLE;cd packages/db
DATABASE_SESSION_POOLER="postgresql://postgres:[PASSWORD]@db.[PROJECT_ID].supabase.co:5432/postgres" npx drizzle-kit push --forceIf drizzle-kit has connection issues, run the migration SQL directly in Supabase SQL Editor:
- Copy contents of
apps/api/migrations/0000_bumpy_chat.sql - Remove the first 3 comment lines and
-->markers - Run in SQL Editor
# Supabase
SUPABASE_URL=https://[PROJECT_ID].supabase.co
NEXT_PUBLIC_SUPABASE_URL=https://[PROJECT_ID].supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=[ANON_KEY]
SUPABASE_SERVICE_KEY=[SERVICE_ROLE_KEY]
SUPABASE_JWT_SECRET=[JWT_SECRET]
# Database
DATABASE_PRIMARY_URL=postgresql://postgres:[PASSWORD]@db.[PROJECT_ID].supabase.co:5432/postgres
# Local Development
PORT=3003
NEXT_PUBLIC_URL=http://localhost:3001
NEXT_PUBLIC_API_URL=http://localhost:3003
ALLOWED_API_ORIGINS=http://localhost:3001,http://localhost:3000
# Engine
ENGINE_API_KEY=secret
ENGINE_API_URL=http://localhost:3002
# Invoice
INVOICE_JWT_SECRET=secret
# Webhook
WEBHOOK_SECRET_KEY=[RANDOM_UUID]# Supabase
NEXT_PUBLIC_SUPABASE_URL=https://[PROJECT_ID].supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=[ANON_KEY]
SUPABASE_SERVICE_KEY=[SERVICE_ROLE_KEY]
SUPABASE_URL=https://[PROJECT_ID].supabase.co
# Local Development
NEXT_PUBLIC_URL=http://localhost:3001
NEXT_PUBLIC_API_URL=http://localhost:3003
# Engine
ENGINE_API_KEY=secret
ENGINE_API_URL=http://localhost:3002
# Invoice
INVOICE_JWT_SECRET=secret
# Webhook
WEBHOOK_SECRET_KEY=[RANDOM_UUID]From Supabase Dashboard:
- Project URL: Settings → General → Project URL
- Anon Key: Settings → API Keys → Legacy anon, service_role API keys → anon key
- Service Role Key: Settings → API Keys → Legacy anon, service_role API keys → service_role key
- JWT Secret: Settings → JWT Keys → Legacy JWT Secret
- Database Password: Settings → Database → Connection string (click Connect button)
For email/password auth (simplest):
- Go to Authentication → Providers → Email
- Enable email provider
For Google OAuth:
- Go to Authentication → Providers → Google
- Add Google OAuth credentials
- Set redirect URL to
http://localhost:3001
Option A: Run all services
bun run devOption B: Run services separately
API (uses tsx/Node.js to avoid Bun DNS issues):
cd apps/api
npx tsx src/index.ts
# Runs on http://localhost:3003Dashboard:
cd apps/dashboard
bun run dev
# Runs on http://localhost:3001Engine (if needed for bank connections):
cd apps/engine
bun run dev
# Runs on http://localhost:3002The dashboard includes a dev-only password bypass for quick local testing:
- Go to http://localhost:3001
- You'll see a dev login form with pre-filled credentials:
- Email:
[email protected] - Password:
dev123
- Email:
- Click "Sign in" - this bypasses email verification for local development
Note: This dev login only works in NODE_ENV=development and is automatically disabled in production.
For production-like testing, use one of these methods:
Email/Password:
- Go to http://localhost:3001
- Enter your email
- Check your email for the magic link
- Click the link to sign in
Google OAuth (if configured):
- Click "Sign in with Google"
- Authorize with your Google account
- You'll be redirected back to the dashboard
After logging in:
- You'll be prompted to create a team (or you'll be added to an existing one)
- Complete your profile information
- Start using the dashboard at http://localhost:3001
To populate your local database with test data for development:
# Connect to your Supabase database
psql -h localhost -U postgres -d midday < supabase/seed.sql
# Or run the seed script directly
cd supabase
psql -h db.[PROJECT_ID].supabase.co -U postgres -d postgres < seed.sqlThe seed script creates:
- Test user account
- Sample team ("Test Company")
- Transaction categories (income, expenses, etc.)
- Bank connection and accounts
- 12 months of sample transactions for charts
After seeding, the dashboard charts (Revenue, Profit, Burn Rate, Expense) will display with realistic data.
Bun DNS errors: Use npx tsx instead of bun to run the API:
cd apps/api && npx tsx src/index.tsCORS errors: Ensure ALLOWED_API_ORIGINS in API .env.local includes your dashboard URL.
Auth errors: Make sure you're using the Legacy JWT-format keys from Supabase, not the new sb_publishable_* format.
Database schema missing: Run the SQL functions above, then push the schema with drizzle-kit or run the migration SQL directly.
- Monorepo
- Bun
- React
- TypeScript
- Nextjs
- Supabase
- Shadcn
- Tauri
- Expo
- TailwindCSS
- Supabase (database, storage, realtime, auth)
- Vercel (Website, Dashboard)
- Fly.io (API/tRPC)
- Trigger.dev (background jobs)
- Resend (Transactional & Marketing)
- Github Actions (CI/CD)
- GoCardLess (Bank connection EU)
- Plaid (Bank connection in Canada and US)
- Teller (Bank connection in the US)
- Enable Banking (Bank connection EU)
- OpenPanel (Events and Analytics)
- Polar (Payment processing)
- Typesense (Search)
- Mistral
- Gemini
- OpenAI
This project is licensed under the AGPL-3.0 for non-commercial use.
For commercial use or deployments requiring a setup fee, please contact us for a commercial license at [email protected].
By using this software, you agree to the terms of the license.