A comprehensive SMB (Small and Medium Business) Financial Health Dashboard that empowers businesses with AI-powered financial insights, automated bookkeeping, cash flow management, and intelligent business analytics.
BUFI is a full-stack financial management platform designed specifically for growing businesses. It combines modern web technologies with AI-powered financial analysis to provide actionable insights for business owners, investors, and financial stakeholders.
- π Real-time Financial Health Monitoring: Track business metrics with automated insights
- π€ AI-Powered Financial Assistant (FinSage): Intelligent chatbot for financial planning and analysis
- π° Comprehensive Cash Flow Management: Monitor income, expenses, and cash burn rates
- π Predictive Analytics: AI-driven forecasting for revenue and expense trends
- π¦ Bank Integration: Secure API connections with real-time transaction monitoring
- π Automated Compliance: Tax calculation, GST management, and regulatory compliance
- π₯ Investor Relations: Stakeholder management and investment tracking
- Revenue Tracking: Multi-source income monitoring with growth analysis
- Expense Management: Categorized spending with budget alerts and optimization insights
- P&L Visualization: Automated profit and loss statements with trend analysis
- Cash Burn Analysis: Runway estimation and sustainability metrics
- Invoice Management: Create, send, and track invoices with automated reminders
- FinSage Assistant: Conversational AI for financial queries and planning
- Predictive Analytics: Future profit projections and seasonal analysis
- Smart Categorization: Automatic transaction categorization using ML
- Risk Assessment: Business health scoring and early warning systems
- Optimization Recommendations: AI-suggested improvements for financial efficiency
- Bank API Integration: Real-time account monitoring (RBI Account Aggregator)
- Payment Gateway Support: Razorpay, Stripe, PayU integrations
- Tax Automation: GST calculation and compliance tracking
- Document Management: Automated financial document organization
- Reporting Engine: Customizable financial reports and analytics
- Investor Dashboard: Track investments, equity, and stakeholder communications
- Team Collaboration: Multi-user access with role-based permissions
- Client Management: Customer analysis and revenue distribution insights
- Compliance Tracking: Regulatory requirements and deadline management
{
"framework": "Next.js 14.2",
"language": "TypeScript",
"styling": "Tailwind CSS + shadcn/ui",
"state_management": "React Query (TanStack)",
"database": "Prisma ORM + SQLite",
"ui_components": "Radix UI primitives",
"charts": "Recharts",
"authentication": "JWT + bcryptjs",
"animations": "Framer Motion"
}{
"framework": "FastAPI 0.109",
"language": "Python 3.8+",
"database": "SQLAlchemy + PostgreSQL",
"authentication": "JWT + PassLib",
"migrations": "Alembic",
"validation": "Pydantic 2.6",
"async_support": "Uvicorn ASGI server",
"email_validation": "email-validator"
}{
"@radix-ui/react-*": "UI primitives and components",
"@tanstack/react-query": "Server state management",
"recharts": "Data visualization charts",
"framer-motion": "Smooth animations",
"next-themes": "Dark/light theme support",
"zod": "Schema validation",
"react-hook-form": "Form management"
}{
"fastapi": "High-performance async web framework",
"sqlalchemy": "Database ORM and query builder",
"python-jose": "JWT token management",
"passlib": "Password hashing and verification",
"pydantic": "Data validation and parsing",
"alembic": "Database migrations"
}- Node.js 18+ and npm/yarn
- Python 3.8+ with pip
- PostgreSQL (for production) or SQLite (for development)
- Git for version control
git clone https://github.com/r04nx/Bufi.git
cd Buficd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set up environment variables
cp .env.example .env
# Edit .env with your database and API keys
# Run database migrations
python database/migrations.py
# Start the FastAPI server
python run.pycd frontend
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your API endpoints
# Initialize Prisma database
npm run db:push
npm run db:seed
# Start the development server
npm run dev- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
- Sign Up: Create your business account with basic information
- Onboarding: Complete the business profile setup wizard
- Bank Integration: Connect your bank accounts for real-time data
- Data Import: Upload historical financial data or connect payment gateways
- Dashboard Setup: Customize your financial dashboard and metrics
- Navigate to Dashboard for overview metrics
- View Revenue section for income analysis
- Check Transactions for detailed expense tracking
- Review Reports for comprehensive financial statements
- Click the FinSage chat icon in the bottom right
- Ask questions like:
- "What's my cash burn rate this month?"
- "Should I make this large purchase now?"
- "How can I improve my profit margins?"
- Get intelligent recommendations and insights
- Go to Investors section
- Add investor profiles and investment details
- Track equity distribution and investment rounds
- Generate investor reports and communications
- Visit Tax dashboard for compliance overview
- Monitor GST calculations and filing deadlines
- Track deductible expenses automatically
- Generate tax reports and documentation
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Backend β β Database β
β (Next.js) βββββΊβ (FastAPI) βββββΊβ (PostgreSQL) β
β β β β β β
β β’ React/TS β β β’ Python β β β’ SQLAlchemy β
β β’ Tailwind CSS β β β’ Pydantic β β β’ Prisma ORM β
β β’ Prisma Client β β β’ JWT Auth β β β’ Migrations β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
Bufi/
βββ frontend/ # Next.js React application
β βββ app/ # App router pages
β β βββ dashboard/ # Main dashboard pages
β β βββ sign-in/ # Authentication pages
β β βββ onboarding/ # User onboarding flow
β βββ components/ # Reusable UI components
β β βββ ui/ # shadcn/ui components
β β βββ charts/ # Data visualization components
β β βββ bot/ # AI chatbot components
β βββ lib/ # Utility functions and configurations
β βββ prisma/ # Database schema and migrations
β βββ types/ # TypeScript type definitions
βββ backend/ # FastAPI Python application
β βββ app/ # Main application code
β β βββ models/ # Database models
β β βββ routes/ # API route handlers
β β βββ schemas/ # Pydantic schemas
β β βββ services/ # Business logic services
β β βββ utils/ # Utility functions
β βββ database/ # Database configuration and migrations
β βββ requirements.txt # Python dependencies
βββ docs/ # Documentation and assets
- User: Business owner authentication and profile
- Profile: Detailed business information and settings
- Transaction: Financial transactions and categorization
- Revenue: Income tracking and source analysis
- Invoice: Billing and accounts receivable
- Investor: Stakeholder and investment management
- TaxRecord: Compliance and tax planning
- Subscription: Billing and plan management
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-nextauth-secret
DATABASE_URL=file:./dev.db
NEXT_PUBLIC_API_URL=http://localhost:8000DATABASE_URL=postgresql://user:password@localhost/bufi_db
JWT_SECRET_KEY=your-super-secret-jwt-key
FRONTEND_URL=http://localhost:3000
ENVIRONMENT=developmentcd frontend
npm run db:push
npm run db:seed# Set up PostgreSQL database
createdb bufi_production
# Run migrations
cd backend
python database/migrations.pycd frontend
# Run unit tests
npm test
# Run integration tests
npm run test:integration
# Run E2E tests
npm run test:e2ecd backend
# Run unit tests
python -m pytest tests/
# Run with coverage
python -m pytest tests/ --cov=app# Install Vercel CLI
npm i -g vercel
# Deploy to Vercel
cd frontend
vercel --prod# Build Docker image
docker build -t bufi-backend ./backend
# Deploy to Railway
railway deploy
# Or deploy to Heroku
heroku container:push web -a your-app-name
heroku container:release web -a your-app-name# Build and run with Docker Compose
docker-compose up -d
# Access application
# Frontend: http://localhost:3000
# Backend: http://localhost:8000- Natural Language Processing: Understands financial queries in plain English
- Contextual Responses: Provides answers based on user's actual financial data
- Proactive Insights: Sends alerts and recommendations based on spending patterns
- Learning Capability: Improves recommendations based on user interactions
- Real-time Monitoring: Live updates from connected bank accounts
- Predictive Modeling: AI-powered cash flow forecasting
- Scenario Planning: "What-if" analysis for major financial decisions
- Alert System: Low balance warnings and irregular spending notifications
- Customer Analysis: Identify top customers and revenue concentration
- Expense Optimization: Categorize and analyze spending patterns
- Growth Metrics: Track KPIs and business performance indicators
- Benchmark Comparison: Industry-standard financial ratio analysis
- Data Encryption: End-to-end encryption for sensitive financial data
- Secure Authentication: JWT-based auth with refresh token rotation
- Audit Trails: Complete transaction and access logging
- Regulatory Compliance: GDPR, PCI-DSS, and local financial regulations
- Advanced AI Features: Machine learning-based expense categorization
- Mobile Application: React Native mobile app for iOS and Android
- Advanced Integrations: QuickBooks, Xero, and accounting software sync
- Multi-currency Support: International business support
- Advanced Reporting: Custom report builder with drag-drop interface
- Real-time Collaboration: Team features with role-based access
- API Marketplace: Third-party integrations and plugins
- White-label Solution: Customizable branding for partners
- Advanced Analytics: Machine learning insights and predictions
- Enhanced UI/UX: Improved dashboard design and user experience
- Performance Optimization: Faster loading and real-time updates
- Security Enhancements: Advanced authentication and data protection
- Bug Fixes: Stability improvements and error handling
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Install dependencies for both frontend and backend
- Make your changes following the coding standards
- Test your changes thoroughly
- Commit your changes:
git commit -m 'Add amazing feature' - Push to your branch:
git push origin feature/amazing-feature - Submit a Pull Request
- TypeScript: Use strict type checking and interfaces
- Python: Follow PEP 8 style guidelines
- Testing: Write unit tests for new features
- Documentation: Update README and inline documentation
- Commit Messages: Use conventional commit format
# Install pre-commit hooks
npm install -g pre-commit
pre-commit install
# Run linting
npm run lint # Frontend
python -m flake8 # Backend
# Format code
npm run format # Frontend
python -m black . # BackendPOST /api/auth/register # User registration
POST /api/auth/login # User login
GET /api/auth/me # Get current user
POST /api/auth/refresh # Refresh access tokenGET /api/transactions # List transactions
POST /api/transactions # Create transaction
GET /api/revenues # List revenue records
POST /api/revenues # Create revenue record
GET /api/invoices # List invoices
POST /api/invoices # Create invoiceGET /api/analytics/dashboard # Dashboard metrics
GET /api/analytics/cash-flow # Cash flow analysis
GET /api/analytics/trends # Financial trends
GET /api/analytics/predictions # AI predictionsPOST /api/bot/chat # Send message to FinSage
GET /api/bot/history # Chat history
POST /api/bot/feedback # Provide feedback# Clear Next.js cache
rm -rf .next/
npm run build
# Reset Prisma client
npx prisma generate
npm run db:push# Reset database
python database/migrations.py --reset
# Check API health
curl http://localhost:8000/api/health# Test database connection
python -c "from app.db import engine; print(engine.execute('SELECT 1').scalar())"
# Reset migrations
alembic stamp head
alembic revision --autogenerate -m "reset"- Server-side Rendering: Next.js SSR for faster initial page loads
- Database Indexing: Optimized queries with proper indexing
- Caching Strategy: Redis caching for frequently accessed data
- CDN Integration: Static asset delivery via CDN
- Lazy Loading: Component and route-based code splitting
- Application Metrics: Built-in performance monitoring
- Error Tracking: Comprehensive error logging and alerts
- User Analytics: Usage patterns and feature adoption tracking
- Infrastructure Monitoring: Server health and resource utilization
This project is licensed under the MIT License - see the LICENSE file for details.
- r04nx - Project Lead & Full-Stack Developer - GitHub
We welcome contributions! Please see our Contributing Guidelines for details.
- Next.js Team - Outstanding React framework
- FastAPI - High-performance Python web framework
- Radix UI - Excellent accessible UI primitives
- Tailwind CSS - Utility-first CSS framework
- Prisma - Next-generation database toolkit
- shadcn/ui - Beautiful and accessible UI components
- π Documentation: Project Wiki
- π Bug Reports: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π§ Email: support@bufi.ai
- π€ Partnerships: partnerships@bufi.ai
- πΌ Enterprise: enterprise@bufi.ai
- π― Sales: sales@bufi.ai
β Star this repository if you find it useful!
BUFI - Empowering businesses with intelligent financial insights.
- π₯ EVOLVE SaaS Hackathon Winner - Best Financial Technology Solution
- π Logithon Recognition - Innovation in Business Intelligence
- ποΈ Featured Project - GitHub trending repositories
Built with β€οΈ for the small business community.