SmartBook is a modern, AI-powered bookkeeping application that helps users manage their personal finances with intelligent transaction categorization and insights.
- PDF/CSV Upload: Upload bank statements in PDF or CSV format
- AI-Powered Categorization: Automatic transaction categorization using OpenAI
- Manual Categorization: Ability to manually categorize transactions
- Transaction Export: Export transactions to CSV format
- Income and expense tracking
- Balance overview
- Transaction history
- Category-wise spending analysis
- Modern, responsive design using Tailwind CSS
- Dark mode support
- Interactive data visualization
- Real-time search and filtering
- Framework: Next.js 14 with App Router
- UI Library: React with TypeScript
- Styling: Tailwind CSS with shadcn/ui components
- Authentication: NextAuth.js
- State Management: React Hooks
- API Routes: Next.js API Routes
- PDF Processing: FastAPI (Python) backend for PDF parsing
- AI Integration: OpenAI API for transaction categorization
- Database: (Add your database details)
smartbook/
├── app/ # Next.js app directory
│ ├── api/ # API routes
│ ├── dashboard/ # Dashboard page
│ ├── upload/ # Upload page
│ └── page.tsx # Home page
├── components/ # React components
│ ├── dashboard/ # Dashboard components
│ ├── transactions/ # Transaction components
│ ├── upload/ # Upload components
│ └── ui/ # Reusable UI components
├── lib/ # Utility functions
│ ├── formatters.ts # Data formatting utilities
│ └── utils.ts # General utilities
└── public/ # Static assets
- Displays user's financial overview
- Shows income, expenses, and balance
- Provides export functionality for transactions
- Lists all transactions with pagination
- Supports search and category filtering
- Allows CSV export of filtered transactions
- Displays transaction details with category badges
- Handles PDF/CSV file uploads
- Integrates with FastAPI backend for PDF processing
- Supports drag-and-drop functionality
export function downloadCSV(data: any[], filename = "transactions.csv")- Converts transaction data to CSV format
- Handles proper escaping of special characters
- Creates and triggers download of CSV file
- Currency formatting
- Date formatting
- Category color mapping
- Clone the repository
git clone Nishant
cd smartbook- Install dependencies
npm install- Set up environment variables
NEXTAUTH_SECRET=your_secret
NEXTAUTH_URL=http://localhost:3000
OPENAI_API_KEY=your_openai_key- Start the development server
npm run dev- Start the FastAPI backend (for PDF processing)
cd backend
python -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
pip install -r requirements.txt
uvicorn main:app --reload- Fork the repository
- Create your 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.