Skip to content

Latest commit

Β 

History

331 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’° Penny - AI-Powered Expense Tracker

Penny is a modern, AI-powered expense tracking application built with Next.js, Firebase, and Gemini AI. Track expenses, manage budgets, collaborate in groups, and get intelligent insights - all with a beautiful, mobile-first interface.

Deploy to Firebase Next.js Firebase TypeScript


✨ Features

πŸ€– AI-Powered Expense Tracking

  • Natural Language Input: Describe expenses in plain English
  • Smart Categorization: AI automatically categorizes expenses
  • Receipt OCR: Upload receipts and extract details automatically
  • Conversational Interface: Chat with Penny to manage your finances

πŸ’° Smart Budgeting

  • Personal & Group Budgets: Set budgets at individual or group level
  • Real-time Tracking: Live budget usage with visual indicators
  • Smart Alerts: Get notified at 75%, 90%, and 100% thresholds
  • Budget Impact Preview: See impact before saving expenses

πŸ‘₯ Group Expense Management

  • Shared Groups: Track expenses with family, roommates, or teams
  • Role-Based Permissions: Owner, Admin, Member roles with granular controls
  • Group Invitations: Invite members via email
  • Group Budgets: Set and track budgets for the entire group

πŸ”” Smart Notifications

  • Real-time Updates: Get notified of group activity instantly
  • Budget Alerts: Never exceed your budget unknowingly
  • Smart Grouping: Similar notifications grouped to reduce noise
  • Customizable Settings: Control what you're notified about

πŸ“Š Analytics & Insights

  • Dashboard: Visual overview of spending patterns
  • Category Breakdown: See where your money goes
  • Trends: Track spending over time
  • Group Analytics: Compare personal vs group spending

πŸ” Advanced Security

  • Passkey Authentication: Passwordless login with biometrics
  • Firebase Auth: Secure authentication with email/password
  • Row-Level Security: Firestore rules ensure data isolation
  • Admin Console: Monitoring and management tools

πŸ“± Progressive Web App (PWA)

  • Offline Support: Work without internet connection
  • Mobile-First Design: Optimized for mobile devices
  • Push Notifications: Native-like notification experience
  • Install to Home Screen: Works like a native app

πŸš€ Quick Start

Prerequisites

  • Node.js 20+
  • Firebase account
  • Google Gemini API key (for AI features)

1. Clone and Install

git clone https://github.com/sarathfrancis90/penny.git
cd penny
npm install

2. Configure Environment

cp env.example .env.local
# Edit .env.local with your Firebase and Gemini API keys

3. Deploy Database Configuration

firebase login
firebase deploy --only firestore

4. Run Development Server

npm run dev

Open http://localhost:3000 to see the app!


πŸ“š Documentation

πŸ€– Agentic Engineering

πŸ—„οΈ Database

🎨 Features

🚒 Deployment

πŸ§ͺ Testing

πŸ‘¨β€πŸ’Ό Admin


πŸ—οΈ Architecture

Tech Stack

  • Frontend: Next.js 15, React 18, TypeScript
  • Backend: Next.js API Routes, Firebase Admin SDK
  • Database: Cloud Firestore (NoSQL)
  • Storage: Firebase Storage (receipts/images)
  • AI: Google Gemini 1.5 Pro
  • Authentication: Firebase Auth + Passkeys
  • Styling: Tailwind CSS, Shadcn UI
  • State Management: React Hooks, Firestore Real-time
  • PWA: Workbox, Service Workers

Project Structure

penny/
β”œβ”€β”€ database/                   # Database configuration
β”‚   β”œβ”€β”€ firestore.rules        # Security rules
β”‚   β”œβ”€β”€ firestore.indexes.json # Query indexes
β”‚   └── storage.rules          # Storage rules
β”œβ”€β”€ docs/                       # Documentation
β”‚   β”œβ”€β”€ admin/                 # Admin guides
β”‚   β”œβ”€β”€ database/              # Database docs
β”‚   β”œβ”€β”€ deployment/            # Deployment guides
β”‚   β”œβ”€β”€ features/              # Feature documentation
β”‚   └── testing/               # Testing guides
β”œβ”€β”€ public/                     # Static assets
β”‚   └── manifest.json          # PWA manifest
β”œβ”€β”€ scripts/                    # Utility scripts
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                   # Next.js app router
β”‚   β”‚   β”œβ”€β”€ api/              # API routes
β”‚   β”‚   β”œβ”€β”€ admin-console/    # Admin dashboard
β”‚   β”‚   β”œβ”€β”€ budgets/          # Budget management
β”‚   β”‚   β”œβ”€β”€ groups/           # Group management
β”‚   β”‚   └── settings/         # User settings
β”‚   β”œβ”€β”€ components/            # React components
β”‚   β”‚   β”œβ”€β”€ budgets/          # Budget components
β”‚   β”‚   β”œβ”€β”€ chat/             # Chat interface
β”‚   β”‚   β”œβ”€β”€ groups/           # Group components
β”‚   β”‚   β”œβ”€β”€ notifications/    # Notification UI
β”‚   β”‚   └── ui/               # Shadcn UI components
β”‚   β”œβ”€β”€ hooks/                 # Custom React hooks
β”‚   └── lib/                   # Utilities & services
β”‚       β”œβ”€β”€ services/         # Business logic
β”‚       └── types/            # TypeScript types
└── .github/
    └── workflows/             # CI/CD pipelines

πŸ”§ Development

Available Scripts

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 type-check   # Run TypeScript compiler

Database Management

# Deploy database configuration
firebase deploy --only firestore

# Deploy specific components
firebase deploy --only firestore:rules
firebase deploy --only firestore:indexes
firebase deploy --only storage

# Start emulators for local testing
firebase emulators:start

Environment Variables

See env.example for required environment variables:

  • Firebase configuration
  • Gemini API key
  • JWT secret for passkeys
  • NextAuth configuration

πŸš€ Deployment

Automated CI/CD

Every push to main automatically deploys database configuration via GitHub Actions.

Triggers on changes to:

  • database/firestore.rules
  • database/firestore.indexes.json
  • database/storage.rules
  • firebase.json

Manual Deployment

# Deploy everything
npm run build
vercel --prod

# Deploy only database
firebase deploy --only firestore

See Deployment Guide for detailed instructions.


πŸ“Š Monitoring

Firebase Console

  • Firestore Usage: Monitor read/write operations
  • Storage Usage: Track file storage
  • Auth Users: Monitor active users
  • Performance: Track query performance

Admin Console

Access at /admin-console for:

  • User management
  • Cost monitoring
  • System health
  • Analytics

See Admin Console Guide for details.


🀝 Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Write clear commit messages
  • Add tests for new features
  • Update documentation
  • Ensure CI/CD passes

πŸ“ License

This project is private and proprietary. All rights reserved.


πŸ™ Acknowledgments

  • Next.js Team - Amazing React framework
  • Firebase - Backend infrastructure
  • Google Gemini - AI capabilities
  • Shadcn - Beautiful UI components
  • Vercel - Hosting and deployment

πŸ“ž Support

  • Documentation: Check the docs folder
  • Issues: Open a GitHub issue
  • Questions: Contact the maintainer

πŸ”— Links


Built with ❀️ by Sarath Francis

Making expense tracking effortless with AI

About

A AI powered tax Assistant

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages