-
Notifications
You must be signed in to change notification settings - Fork 0
sleepy-vn/bitsaver
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
BitSaver is a Django expense tracker designed for database-backed CRUD operations,
reporting, budgeting, and visualizing your financial history. This project was
developed for an Information Systems class and demonstrates dynamic UI construction
from database data, responsive filtering, modern navigation, and clear code structure.
* Features *
- Add, edit, and delete expenses (CRUD)
- Filter, sort, and report expenses by category, date, and amount
- Category dropdown in report filters is built dynamically from the database, never hard-coded
- Budgets: set start/end dates and spending limits, view/manage all active budgets
- Purchase History: monthly or weekly spending visualized with Chart.js
- User settings tab: customize theme color and font size
- Bootstrap-styled interface with tabs for navigation
- All code and UI is clean, readable, and fully documented
* Database Design *
Table 1: Expense
| Field | Type | Description |
|-------------|--------------|-------------------------------------------|
| id | Integer PK | Unique ID |
| title | String | Expense name/description |
| amount | Float | Expense amount |
| date | Float | Date of the expense |
| category | String | Category (pulled directly from DB) |
| description | Text | Optional text notes |
Table 2: Budget
| Field | Type | Description |
|------------|--------------|------------------------|
| id | Integer PK | Unique budget ID |
| title | String | Budget title |
| amount | Float | Budget amount |
| start_date | DateTime | Start date |
| end_date | DateTime | End date |
Table 3: UserSetting
| Field | Type | Description |
|-------------|--------------|----------------------------|
| id | Integer PK | Unique settings record |
| theme_color | String | UI color |
| font_size | IntegerChar | Font size in pixels |
* Dynamic UI Components *
- Category Filter in Reports:
```python
categories = Expense.objects.values_list('category', flat=True).distinct()
```
```django
{% for cat in categories %}
<option value="{{ cat }}">{{ cat|capfirst }}</option>
{% endfor %}
```
Any new category entered via the add/edit form becomes available in filter dropdowns automatically.
* Setup Instructions *
1. Clone or download this project.
2. Install requirements:
```bash
pip install django
```
3. Apply migrations:
```bash
python manage.py makemigrations App
python manage.py migrate
```
4. Start the server:
```bash
python manage.py runserver
```
5. Open http://127.0.0.1:8000/ in your browser.
* Demo Guide *
- Expenses List/Add/Edit/Delete:
Use the tabs to add expenses, edit or delete any entry. See immediate changes reflected everywhere.
- Reports:
Click "Report" to filter expenses by dynamic category list, amount, or date range. Sorting by date and amount is available. Add/edit data and see reports update instantly.
- Dynamic UI demonstration:
Create a new expense with a new category name; that category appears in the report filter dropdown without changing any code.
- Budgets:
Use the "Budgets" tab to create, view, and manage spending limits for any period.
- Purchase History Chart:
The "Purchase History" tab shows a Chart.js graph of your monthly spending from the Expense table.
- Settings:
Use the "Settings" tab to change theme color or font size — updates apply across all pages.
* License *
For Educational Purposes Only; Any questions or clarifications about the code can be directed to the author.
About
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published