Skip to content

About

Fi-Mi-Cash helps you manage your money by automatically tracking your spending from emails. It sorts your expenses and gives you easy-to-understand insights into where your money is going. Stay in control of your finances with simple, clear reports.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

64 Commits

Folders and files

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

Repository files navigation

Fi-Mi-Cash

Version Status License

A full-stack financial management and intelligence application that automates transaction tracking through email processing, powered by AI for smart categorization and comprehensive spending analytics.

πŸ’‘ About Fi-Mi-Cash

Fi-Mi-Cash was created to simplify financial management through automation. By combining email processing with AI categorization, it provides users with a clear, real-time view of their spending patterns and financial health.

Whether you're tracking personal expenses or managing business transactions, Fi-Mi-Cash turns raw financial data into actionable insights, helping you make informed financial decisions.

🌟 Features

  • Smart Email Processing: Automatically processes and categorizes transaction emails from your bank
  • AI-Powered Categorization: Leverages OpenAI's GPT for intelligent transaction categorization
  • Real-time Analytics: Dynamic financial summaries with spending patterns and trends
  • Advanced Filtering: Filter transactions by date ranges and custom categories
  • Responsive Design: Seamless experience across all devices
  • Secure Authentication: OAuth 2.0 integration with Google for secure access to email data

πŸ“Έ Screenshots

Dashboard View

Dashboard screenshot coming soon

Transaction Analysis

Analysis screenshot coming soon

πŸ”§ Tech Stack

Backend

  • FastAPI
  • Python 3.8+
  • OpenAI API
  • Gmail API
  • SQLite/PostgreSQL
  • Pydantic for data validation
  • SQLAlchemy ORM

Frontend

  • React 18
  • TailwindCSS
  • React Query for data fetching
  • Headless UI components
  • React DatePicker
  • Recharts for data visualization
  • Axios for API communication

πŸ“‹ Prerequisites

  • Python 3.8 or higher
  • Node.js 14 or higher
  • Gmail API credentials
  • OpenAI API key
  • PostgreSQL (optional, SQLite works for development)

πŸš€ Quick Start

Backend Setup

  1. Clone the repository:
git clone https://github.com/fimicash/fi-mi-cash.git
cd fi-mi-cash
  1. Set up Python virtual environment:
python -m venv venv
source venv/bin/activate  # Linux/Mac
venv\Scripts\activate     # Windows
  1. Install dependencies:
pip install -r backend/requirements.txt
  1. Configure environment variables:
cp .env.example .env
# Edit .env with your credentials
  1. Run database migrations:
cd backend
alembic upgrade head
  1. Run the backend:
uvicorn app.main:app --reload --port 8000

Frontend Setup

  1. Navigate to frontend directory:
cd frontend
  1. Install dependencies:
npm install
  1. Configure environment (optional):
cp .env.example .env.local
# Edit .env.local with your settings
  1. Start the development server:
npm start
  1. Access the application at http://localhost:3000

πŸ”‘ Environment Variables

Backend (.env)

# API Configuration
API_V1_PREFIX=/api/v1
DEBUG=True
SECRET_KEY=your_secret_key_here
ALLOWED_ORIGINS=http://localhost:3000

# Database
DATABASE_URL=sqlite:///./app.db
# For PostgreSQL:
# DATABASE_URL=postgresql://user:password@localhost:5432/fimicash

# Authentication
OAUTH_CLIENT_ID=your_google_client_id
OAUTH_CLIENT_SECRET=your_google_client_secret
OAUTH_REDIRECT_URI=http://localhost:8000/api/v1/auth/callback

# OpenAI
OPENAI_API_KEY=your_openai_api_key

Frontend (.env.local)

REACT_APP_API_URL=http://localhost:8000/api/v1
REACT_APP_AUTH_DOMAIN=localhost

πŸ“ Project Structure

/fi-mi-cash
β”œβ”€β”€ /backend
β”‚   β”œβ”€β”€ /alembic                 # Database migration scripts
β”‚   β”œβ”€β”€ /app
β”‚   β”‚   β”œβ”€β”€ /api                 # API endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ /v1              # API v1 routes
β”‚   β”‚   β”‚   └── deps.py          # Dependency injection
β”‚   β”‚   β”œβ”€β”€ /core                # Core functionality
β”‚   β”‚   β”‚   β”œβ”€β”€ config.py        # Application configuration
β”‚   β”‚   β”‚   β”œβ”€β”€ security.py      # Authentication and security
β”‚   β”‚   β”‚   └── logger.py        # Logging configuration
β”‚   β”‚   β”œβ”€β”€ /db                  # Database modules
β”‚   β”‚   β”‚   β”œβ”€β”€ base.py          # Base DB classes
β”‚   β”‚   β”‚   └── session.py       # DB session management
β”‚   β”‚   β”œβ”€β”€ /models              # SQLAlchemy models
β”‚   β”‚   β”œβ”€β”€ /schemas             # Pydantic schemas/models
β”‚   β”‚   β”œβ”€β”€ /services            # Business logic
β”‚   β”‚   β”‚   β”œβ”€β”€ /email           # Email processing services
β”‚   β”‚   β”‚   β”œβ”€β”€ /ai              # AI categorization services
β”‚   β”‚   β”‚   └── /analytics       # Financial analytics services
β”‚   β”‚   β”œβ”€β”€ /tests               # Test modules
β”‚   β”‚   └── main.py              # FastAPI application entrypoint
β”‚   β”œβ”€β”€ alembic.ini              # Alembic configuration
β”‚   └── requirements.txt         # Python dependencies
β”œβ”€β”€ /frontend
β”‚   β”œβ”€β”€ /public                  # Static public assets
β”‚   β”œβ”€β”€ /src
β”‚   β”‚   β”œβ”€β”€ /assets              # Images and static resources
β”‚   β”‚   β”œβ”€β”€ /components          # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ /common          # Reusable components
β”‚   β”‚   β”‚   β”œβ”€β”€ /layout          # Layout components
β”‚   β”‚   β”‚   └── /charts          # Visualization components
β”‚   β”‚   β”œβ”€β”€ /contexts            # React contexts
β”‚   β”‚   β”œβ”€β”€ /hooks               # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ /pages               # Page components
β”‚   β”‚   β”œβ”€β”€ /services            # API services
β”‚   β”‚   β”œβ”€β”€ /types               # TypeScript interfaces/types
β”‚   β”‚   β”œβ”€β”€ /utils               # Utility functions
β”‚   β”‚   β”œβ”€β”€ App.tsx              # Root component
β”‚   β”‚   └── index.tsx            # Entry point
β”‚   β”œβ”€β”€ package.json             # Node.js dependencies
β”‚   └── tsconfig.json            # TypeScript configuration
β”œβ”€β”€ .env.example                 # Example environment variables
β”œβ”€β”€ .gitignore                   # Git ignore file
β”œβ”€β”€ docker-compose.yml           # Docker composition
└── README.md                    # This file

πŸ“ˆ API Endpoints

Transactions

  • GET /api/v1/transactions/: Get transactions with filtering options
  • GET /api/v1/transactions/{id}: Get transaction details
  • PUT /api/v1/transactions/{id}: Update transaction (e.g., category)
  • DELETE /api/v1/transactions/{id}: Delete transaction

πŸ” Troubleshooting

Common Issues

  • Email Access Issues: Ensure you've enabled the Gmail API in Google Cloud Console and authorized the correct scopes
  • Database Connection Errors: Check your DATABASE_URL environment variable
  • API Key Invalid: Verify your OpenAI API key is correct and has sufficient credits
  • CORS Errors: Make sure the frontend URL is included in ALLOWED_ORIGINS

Getting Help

If you encounter issues:

  1. Check the Issues page for similar problems
  2. Enable debug mode for more detailed logs
  3. Create a new issue with detailed reproduction steps

πŸ› οΈ Development

Running Tests

# Backend tests
cd backend
pytest

# Frontend tests
cd frontend
npm test

Code Style

  • Backend follows PEP 8 and uses Black for formatting
  • Frontend uses ESLint with Airbnb config and Prettier

Linting

# Backend
cd backend
flake8 .
black --check .

# Frontend
cd frontend
npm run lint

🀝 Contributing

We welcome contributions to Fi-Mi-Cash!

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

Please ensure your code follows our style guidelines and includes appropriate tests.

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • OpenAI for GPT API
  • Google for Gmail API
  • All contributors and users

πŸ“§ Contact

Project Team - team@fimicash.dev

Project Link: https://github.com/fimicash/fi-mi-cash


🎯 Coming Soon

  • Multi-bank support
  • Custom category creation
  • Budget planning and tracking
  • Expense predictions using AI
  • Mobile app version
  • Export reports in multiple formats
  • Multi-currency support
  • Automated bill detection and reminders

About

Fi-Mi-Cash helps you manage your money by automatically tracking your spending from emails. It sorts your expenses and gives you easy-to-understand insights into where your money is going. Stay in control of your finances with simple, clear reports.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages