A full-stack fintech application for tracking and managing recurring subscriptions with AI-powered insights.
- CSV Upload: Import bank transactions via CSV upload
- Smart Detection: AI-powered recurring subscription detection
- Dashboard: Comprehensive overview of all subscriptions
- Insights & Analytics: Visual charts and spending analytics
- Proration Calculator: Calculate refunds for cancelled subscriptions
- Upcoming Renewals: Track upcoming billing dates
- Category Breakdown: Spending analysis by category
SubSmart-1/
βββ backend/ # FastAPI backend
β βββ app.py # Main application
β βββ database.py # Database configuration
β βββ models/ # SQLAlchemy models
β βββ routers/ # API endpoints
β βββ utils/ # Utility functions
β
βββ frontend/ # Next.js frontend
βββ app/ # App router pages
βββ components/ # Reusable components
βββ lib/ # Utilities and API helpers
- FastAPI: Modern Python web framework
- SQLAlchemy: ORM for database operations
- SQLite: Lightweight database
- Pydantic: Data validation
- Next.js 16: React framework with App Router
- TypeScript: Type-safe JavaScript
- TailwindCSS 4: Utility-first CSS framework
- Recharts: Beautiful chart library
- Lucide Icons: Modern icon set
- Axios: HTTP client
- Python 3.8+
- Node.js 18+
- npm or yarn
- Navigate to the backend directory:
cd backend- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r ../requirements.txt- Run the backend server:
python app.pyThe API will be available at http://localhost:8000
- Navigate to the frontend directory:
cd frontend- Install dependencies:
npm install- Create a
.env.localfile:
NEXT_PUBLIC_API_URL=http://localhost:8000- Run the development server:
npm run devThe application will be available at http://localhost:3000
POST /api/upload- Upload CSV fileGET /api/transactions- Get all transactions
GET /api/subscriptions- List all subscriptionsGET /api/subscriptions/{id}- Get subscription detailsPOST /api/subscriptions/detect- Detect recurring subscriptionsPUT /api/subscriptions/{id}- Update subscriptionDELETE /api/subscriptions/{id}- Delete subscriptionPOST /api/subscriptions/{id}/prorate- Calculate proration
GET /api/insights- Get analytics and insights data
Your transaction CSV file should have the following format:
date,description,amount
2024-01-15,Netflix Subscription,15.99
2024-01-20,Spotify Premium,9.99
2024-02-15,Netflix Subscription,15.99
...Required columns:
date: Transaction date (YYYY-MM-DD format)description: Merchant name or transaction descriptionamount: Transaction amount (numeric value)
A sample CSV file is included in the root directory as sample-data.csv.
- Drag-and-drop file upload
- CSV validation
- Multi-step upload process
- Real-time progress tracking
- Overview statistics
- Monthly and yearly spending
- Active subscription count
- Upcoming renewals section
- All subscriptions grid
- Detailed subscription information
- Proration calculator
- Delete functionality
- Status management
- Spending trend charts (line graph)
- Category breakdown (pie chart)
- Spending by category (bar chart)
- Highest spend analysis
- Upcoming payments calendar
- Unused subscription detection
# Backend tests
cd backend
pytest
# Frontend tests
cd frontend
npm testcd backend
# The backend can be deployed on platforms like:
# - Heroku
# - AWS Lambda
# - Google Cloud Run
# - Railwaycd frontend
npm run build
npm start- Push code to GitHub
- Connect repository to Railway/Render
- Set environment variables
- Deploy
- Push code to GitHub
- Import project to Vercel
- Set
NEXT_PUBLIC_API_URLenvironment variable - Deploy
- No environment variables required for local development
- For production, configure database URL and CORS origins in
app.py
NEXT_PUBLIC_API_URL: Backend API URL (default: http://localhost:8000)
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
- Your Name - Hackathon Project
- Next.js team for the amazing framework
- FastAPI team for the excellent backend framework
- All open-source contributors
For support, email your-email@example.com or open an issue in the repository.
Made with β€οΈ for smarter subscription management