Skip to content

Nishu1103/smartBook

Repository files navigation

SmartBook - AI-Powered Bookkeeping Application

SmartBook is a modern, AI-powered bookkeeping application that helps users manage their personal finances with intelligent transaction categorization and insights.

Features

1. Transaction Management

  • 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

2. Dashboard Analytics

  • Income and expense tracking
  • Balance overview
  • Transaction history
  • Category-wise spending analysis

3. User Interface

  • Modern, responsive design using Tailwind CSS
  • Dark mode support
  • Interactive data visualization
  • Real-time search and filtering

Tech Stack

Frontend

  • 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

Backend

  • 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)

Project Structure

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

Key Components

DashboardHeader

  • Displays user's financial overview
  • Shows income, expenses, and balance
  • Provides export functionality for transactions

TransactionList

  • Lists all transactions with pagination
  • Supports search and category filtering
  • Allows CSV export of filtered transactions
  • Displays transaction details with category badges

UploadTransactions

  • Handles PDF/CSV file uploads
  • Integrates with FastAPI backend for PDF processing
  • Supports drag-and-drop functionality

Utility Functions

CSV Export (lib/utils.ts)

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

Data Formatting (lib/formatters.ts)

  • Currency formatting
  • Date formatting
  • Category color mapping

Getting Started

  1. Clone the repository
git clone Nishant
cd smartbook
  1. Install dependencies
npm install
  1. Set up environment variables
NEXTAUTH_SECRET=your_secret
NEXTAUTH_URL=http://localhost:3000
OPENAI_API_KEY=your_openai_key
  1. Start the development server
npm run dev
  1. 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

Contributing

  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

License

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

Acknowledgments

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors