AI-powered receipt analysis and expense tracking application built with Next.js and FastAPI.
- 📷 Receipt image upload and analysis
- 🤖 AI-powered expense categorization with Azure OpenAI
- 💬 Interactive chat interface with CopilotKit
- 📊 Detailed expense breakdowns and insights
- 🏷️ Smart tagging and business expense detection
- Frontend: Next.js 15, React 19, Tailwind CSS, CopilotKit
- Backend: FastAPI, Python with uv package management
- AI: Azure OpenAI (GPT-4), LangChain, LangGraph
- UI: Radix UI components
- Node.js 18+ and npm
- Python 3.9+ and uv package manager
- Azure OpenAI account with API access
-
Install dependencies:
npm install
-
Configure environment variables:
# Frontend environment cp .env.example .env.local # Backend environment cp agent/.env.example agent/.env
-
Configure Azure OpenAI in
agent/.env:AZURE_OPENAI_ENDPOINT=your_endpoint_here AZURE_OPENAI_API_KEY=your_api_key_here AZURE_OPENAI_API_VERSION=2024-02-01 AZURE_OPENAI_DEPLOYMENT_NAME=gpt-4
Start both frontend and backend:
npm run devThis runs:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
Frontend only:
npm run dev:uiBackend only:
npm run dev:agent├── app/ # Next.js app directory
├── components/ # React components
├── lib/ # Utility functions
├── agent/ # FastAPI backend
│ ├── main.py # FastAPI application
│ ├── receipt_analyzer_agent.py # Receipt analysis logic
│ └── azure_openai_client.py # Azure OpenAI integration
└── scripts/ # Setup scripts
- Open http://localhost:3000
- Upload a receipt image using the file picker
- Click "Analyze Receipt" to extract information
- View detailed analysis including:
- Merchant details and transaction info
- Itemized breakdown
- Expense categorization
- Business deductibility assessment
- Use the chat sidebar for additional insights
GET /- Health checkPOST /copilotkit- CopilotKit agent integrationGET /health- Backend health status
- Fork the repository
- Create a feature branch
- Make your changes
- Test with
npm run lint - Submit a pull request