A comprehensive expense tracking and management system with AI-powered features for smarter financial management.
-
π± Frontend
- Modern, responsive React application with TypeScript
- Beautiful green/black themed UI using shadcn/ui components
- Interactive dashboard with charts and analytics
- Mobile-friendly design with collapsible sidebar
- Protected routes with JWT authentication
- Real-time expense tracking and visualization
-
π§ Backend
- RESTful API built with FastAPI
- JWT-based authentication
- AI-powered receipt processing
- Intelligent expense categorization
- Financial insights and analytics
- AI chat assistant for financial advice
- Python 3.12+
- MongoDB (local or MongoDB Atlas)
- Google AI API key
- Node.js 20+ (for frontend, when available)
-
Clone the repository
git clone https://github.com/Sanjeev-Kumar78/Expense_Manager.git cd Expense_Manager/backend -
Set up Python environment
# Create virtual environment python -m venv .venv # Activate virtual environment # Windows .venv\Scripts\activate # macOS/Linux source .venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Configure environment
# Copy environment template cp .env.example .env # Edit .env with your configuration # - MongoDB connection string # - Google AI API key # - JWT secret key
-
Run the server
uvicorn main:app --reload
The API will be available at http://localhost:8000
-
Navigate to frontend directory
cd frontend -
Install dependencies
npm install
-
Set up environment variables
echo "REACT_APP_API_URL=http://localhost:8000" > .env
-
Start the development server
npm start
The frontend will be available at http://localhost:3000
Expense_Manager/
βββ README.md # This file
βββ backend/ # Backend API
β βββ main.py # FastAPI application entry point
β βββ requirements.txt # Python dependencies
β βββ pyproject.toml # Project configuration
β βββ Dockerfile # Docker configuration
β βββ routes/ # API endpoints
β β βββ users.py # User authentication & management
β β βββ expense_transactions.py # Expense & transaction management
β β βββ summary.py # Analytics & AI chat endpoints
β βββ services/ # Business logic
β β βββ chat_agent.py # AI financial assistant
β β βββ preprocessor.py # Receipt processing with AI
β βββ utils/ # Utilities
β βββ db.py # Database operations
βββ frontend/ # Frontend application
βββ src/ # Source code
β βββ components/ # Reusable UI components
β βββ pages/ # Page components
β βββ contexts/ # React contexts
β βββ utils/ # Utility functions
β βββ types/ # TypeScript types
βββ public/ # Static assets
βββ package.json # Node.js dependencies
The backend provides a comprehensive RESTful API with the following main endpoints:
POST /auth/register- User registrationPOST /auth/login- User loginGET /auth/profile- Get user profilePUT /auth/profile- Update user profile
GET /expenses- List user expensesPOST /expenses- Create new expensePUT /expenses/{id}- Update expenseDELETE /expenses/{id}- Delete expensePOST /expenses/receipt- Process receipt with AI
GET /summary/spending- Get spending summaryGET /summary/categories- Category-wise breakdownGET /summary/trends- Spending trendsPOST /summary/chat- Chat with AI assistant
- Upload receipts as images (PNG, JPG) or PDFs
- Automatic text extraction using Google AI
- Smart categorization of expenses
- Amount and merchant detection
- Natural language queries about your expenses
- Personalized insights based on spending patterns
- Budget recommendations and financial advice
- Spending trend analysis
- FastAPI - Modern, fast web framework
- MongoDB - NoSQL database for flexible data storage
- Google AI - Advanced text processing and analysis
- JWT - Secure authentication
- bcrypt - Password hashing
- Motor - Async MongoDB driver
- React/TypeScript - Modern frontend framework with type safety
- shadcn/ui - High-quality, accessible component library
- Tailwind CSS - Utility-first CSS framework
- Recharts - Beautiful, responsive data visualization
- React Router - Client-side routing with protection
- Axios - HTTP client for API communication
The backend includes Docker support for easy deployment:
# Build the Docker image
docker build -t expense-manager-backend ./backend
# Run the container
docker run -p 8000:8000 expense-manager-backendOnce the backend server is running, you can access:
- Interactive API docs: http://localhost:8000/docs
- ReDoc documentation: http://localhost:8000/redoc
- OpenAPI schema: http://localhost:8000/openapi.json
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- β Core API endpoints
- β User authentication
- β Expense management
- β AI receipt processing
- β Financial analytics
- β AI chat assistant
- β Responsive web interface with green/black theme
- β Interactive dashboards with charts and analytics
- β Real-time expense visualization
- β Protected routes with JWT authentication
- β Mobile-responsive design
- β Modern React with TypeScript
- π Smart notifications and alerts
- π± Mobile app (React Native)
- π¦ Bank account integration
- π Advanced reporting and exports
- π₯ Multi-user support for families
- π― Goal setting and tracking
If you have any questions or need help, please:
- Check the documentation
- Search existing issues
- Open a new issue
β Star this repository if you find it helpful!