This LedgerIt is a cloud-native application that allows users to:
- Monitor and manage their expenses effectively.
- Visualize expense trends and category-wise comparisons through an interactive dashboard.
- Upload important receipts securely to prevent misplacement.
- Add expenses manually for accurate tracking.
The project leverages AWS services to ensure real-time data processing, secure storage, and scalable performance.
- Real-Time Expense Tracking: Process transaction data in real time using AWS Kinesis Data Streams and AWS Lambda.
- Analytics Dashboard: View insights such as expense trends and category comparisons via React-based visualizations.
- Secure Receipt Storage: Store receipts in Amazon S3 for safekeeping and accessibility.
- Manual Expense Entry: Add expenses manually to complement receipt uploads.
The architecture includes:
- Data Generation: An EC2 instance generates synthetic transaction data and streams it to AWS Kinesis Data Streams.
- Data Processing: AWS Lambda processes raw data, transforms it, and stores it in Amazon RDS (PostgreSQL) and Amazon S3.
- Frontend and Backend: A React frontend and Flask backend hosted on AWS EC2 interact with the database and storage to display and manage user data.
- Monitoring and Security: AWS CloudWatch and IAM ensure reliability and security across the application.
Below is the architecture diagram for the application:
Follow these steps to deploy the application:
- AWS account with necessary permissions for the following services:
- Kinesis Data Streams
- Kinesis Data Firehose
- Lambda
- S3
- RDS (PostgreSQL)
- Secrets Manager
- EC2
- Python 3.9 or higher installed locally.
- Node.js 16 or higher installed locally.
- Clone the repository:
git clone https://github.com/cu-csci-4253-datacenter-fall-2024/finalproject-real-time-expense-tracker.git cd finalproject-real-time-expense-tracker - Set up the PostgreSQL database in Amazon RDS:
- Run the SQL script
StorageProcedureInsertToRDS.sqlto create necessary tables.
- Run the SQL script
- Install backend dependencies:
pip install -r requirements.txt
- Deploy the
LambdaDataProcessing.pyfile as an AWS Lambda function:- Use the AWS Management Console or AWS CLI.
- Assign IAM roles to Lambda with access to Secrets Manager, S3, and RDS.
- Update the Flask backend (
app.py) with your RDS and S3 configurations. - Host the backend on an EC2 instance and start the Flask service:
python app.py
- Navigate to the React frontend directory:
cd react_frontend - Install dependencies:
npm install
- Update the
src/config.jsfile with API endpoints for the Flask backend. - Start the development server locally:
npm start
- For production deployment, build the app:
Deploy the build files to an EC2 instance or S3 bucket with static website hosting enabled.
npm run build
- Deploy
SimulatedBankDataGeneration.pyon an EC2 instance to generate synthetic transaction data. - Configure the script with your Kinesis Data Stream name.
- Run the script:
python SimulatedBankDataGeneration.py
- Access the frontend via the deployed URL or localhost during development.
- Add test expenses manually or upload receipts using the UI.
- Verify real-time expense updates and visualizations on the dashboard.
- Monitor logs in AWS CloudWatch to ensure successful data processing.
- AWS Services Used:
- Kinesis Data Streams and Firehose
- Lambda
- RDS (PostgreSQL)
- S3
- Secrets Manager
- CloudWatch
- IAM
- Languages and Tools:
- Backend: Flask (Python)
- Frontend: React (JavaScript)
- Data Generation: Python
- Database: PostgreSQL
Click here to watch the video.
- Integrate Optical Character Recognition (OCR) using AWS Textract to automatically extract expense details from uploaded receipts.
- Develop a mobile app using React Native or Flutter for seamless access on the go.
- Enhance the analytics dashboard with customizable filters and trend predictions.
Stay Tuned ....