https://github.com/kingflow-23/expense-tracker
A personal finance tracker where users can log and categorize their expenses.
https://github.com/kingflow-23/expense-tracker
backend fastapi frontend sqlalchemy streamlit
Last synced: about 2 months ago
JSON representation
A personal finance tracker where users can log and categorize their expenses.
- Host: GitHub
- URL: https://github.com/kingflow-23/expense-tracker
- Owner: Kingflow-23
- Created: 2025-03-28T05:06:19.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-29T03:36:21.000Z (about 1 year ago)
- Last Synced: 2025-04-07T01:58:56.687Z (about 1 year ago)
- Topics: backend, fastapi, frontend, sqlalchemy, streamlit
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Project Name
#### 💰📊 Expense Tracker – Take Control of Your Finances!
## 📌 Overview
This project is a **user management system** that allows users to **sign up, log in, update their profile, and log out** securely. It utilizes **FastAPI** for the backend and **Streamlit** for the frontend, ensuring a seamless and modern user experience.
## 🚀 Features
- User authentication (signup, login, logout)
- Profile management (update user details)
- Secure API with JWT authentication
- Streamlit-powered frontend for a smooth UI
## 🛠️ Technologies Used
- **Backend:** FastAPI, SQLAlchemy, Pydantic
- **Frontend:** Streamlit
- **Database:** PostgreSQL (or SQLite for development)
- **Authentication:** JWT Tokens
## 📂 Project Structure
```
📦 project-directory
┣ 📂 backend
┃ ┣ 📜 main.py # FastAPI application
┃ ┣ 📜 models.py # Database models
┃ ┣ 📜 routes.py # API endpoints
┃ ┣ 📜 auth.py # Authentication logic
┃ ┗ 📜 database.py # Database connection
┣ 📂 frontend
┃ ┣ 📜 app.py # Streamlit UI
┃ ┗ 📜 components.py # UI Components
┣ 📜 README.md # Project documentation
┣ 📜 requirements.txt # Dependencies
┗ 📜 .env # Environment variables
```
## ⚙️ Installation & Setup
### 1️⃣ Clone the Repository
```bash
git clone https://github.com/Kingflow-23/Expense-Tracker.git
```
### Create a Virtual Environment
```bash
python -m venv .
source ./bin/activate # On Linux/Mac
.\Scripts\activate # On Windows
```
### 2️⃣ Install Dependencies
```bash
python -m pip install --upgrade pip
pip install -r requirements.txt
```
### 3️⃣ Setup Environment Variables
Create a `.env` file and add the required configuration:
```env
DATABASE_URL=postgresql://user:password@localhost/db_name
SECRET_KEY=your_secret_key
ACCESS_TOKEN_EXPIRE_MINUTES=30
```
### 4️⃣ Run the Backend
```bash
uvicorn backend.main:app --reload
```
### 5️⃣ Run the Frontend
```bash
streamlit run frontend/app.py
```
## 🎬 Quick Demo
Below is a quick preview of the application in action:
### 🔹 Login Page

### 🔹 Profile Update

### 🔹 Logout
🚪➡️ Click the logout button to securely exit.
## 🔗 API Endpoints
| Method | Endpoint | Description |
|--------|--------------|------------------------|
| POST | /auth/signup | Register a new user |
| POST | /auth/login | Authenticate user |
| PUT | /auth/update | Update user profile |
| DELETE | /auth/delete | Delete user |
| POST | /expenses | Register new expense |
| GET | /expenses | Retrieve all expenses |
| GET | /expenses/{id} | Retrieve a specific expense |
| PATCH | /expenses/{id} | Update an existing expense |
| DELETE | /expenses/{id} | Delete an expense |
## 📜 License
This project is licensed under the MIT License.
## 🙌 Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you’d like to change.
---
*Made with ❤️ by [KingFlow-23](https://github.com/Kingflow-23)*