Cred-Hack is a full-stack application designed to streamline financial management. It features a modern frontend built with Next.js and Tailwind CSS, and a robust backend powered by FastAPI. The application includes tools for bank statement ingestion, categorization, and analysis, as well as AI-powered chat capabilities using OpenAI's API.
- Modern UI: Built with Next.js and styled using Tailwind CSS.
- Bank Statement Upload: Users can upload bank statements in
.xlsxformat for analysis. - Authentication: User authentication and onboarding flows.
- AI Chat: Chat interface powered by OpenAI for financial advice.
- Bank Statement Processing: Parses and categorizes transactions from uploaded bank statements.
- Data Analysis: Provides summaries of income, expenses, and monthly surpluses.
- API Integration: Exposes endpoints for frontend interaction.
The repository is organized as follows:
cred-hack/
├── backend/ # Backend codebase
│ ├── app/ # FastAPI application
│ │ ├── main.py # Entry point for the backend server
│ │ ├── services/ # Business logic and services
│ │ └── __init__.py # Package initialization
│ ├── requirements.txt # Python dependencies
│ └── .env # Environment variables for the backend
├── frontend/ # Frontend codebase
│ ├── src/ # Source code for the Next.js application
│ │ ├── app/ # Application pages and API routes
│ │ ├── components/ # Reusable UI components
│ │ └── styles/ # Global styles
│ ├── package.json # Node.js dependencies
│ ├── .env.local # Environment variables for the frontend
│ └── tailwind.config.js # Tailwind CSS configuration
├── .gitignore # Files and directories to ignore in Git
├── README.md # Project documentation
└── LICENSE # License for the project
This structure separates the backend and frontend codebases, ensuring modularity and maintainability.
- Node.js 18.x or later
- Python 3.11 or later
- Redis (for caching)
- An OpenAI API key
- Navigate to the
backenddirectory:cd backend - Create a virtual environment and activate it:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Set up the
.envfile with the required environment variables:JWT_SECRET_KEY=your_jwt_secret_key OPENAI_API_KEY=your_openai_api_key
- Run the backend server:
uvicorn app.main:app --reload
- Navigate to the
frontenddirectory:cd frontend - Install dependencies:
npm install
- Set up the
.env.localfile with the required environment variables:OPENAI_API_KEY=your_openai_api_key
- Run the development server:
npm run dev
- Start the backend server by following the steps in the Backend section.
- Start the frontend server by following the steps in the Frontend section.
- Open your browser and navigate to http://localhost:3000 to access the application.
- Start the backend server by following the steps in the Backend section of the installation guide.
- Start the frontend server by following the steps in the Frontend section of the installation guide.
- Open your browser and navigate to http://localhost:3000 to access the application.
- Upload a bank statement in
.xlsxformat for analysis. - Use the AI-powered chat interface to get financial advice or insights.
Cred-Hack is a full-stack application with the following architecture:
- Framework: Built with Next.js for server-side rendering and React-based UI.
- Styling: Tailwind CSS for modern and responsive design.
- Features:
- Bank statement upload and analysis.
- User authentication and onboarding flows.
- AI-powered chat interface for financial advice using OpenAI's API.
- Framework: FastAPI for building RESTful APIs.
- Data Processing: Utilizes Pandas for parsing and analyzing bank statements.
- Caching: Redis for caching frequently accessed data.
- Features:
- Bank statement ingestion and categorization.
- Income, expense, and surplus analysis.
- API endpoints for frontend interaction.
- OpenAI API: Used for generating financial advice and insights in the chat interface.
- Storage: SQLite or other relational databases for storing user data and transaction records.
This architecture ensures a seamless user experience with a modern frontend, a robust backend, and AI-powered features for financial management.