- FinTracker is an open-source web application to help you take control of your personal finances. Track your income, expenses, budgets, and investments with this flexible and customizable tool.
- This repository manages the backend codebase for the project.
Following features are expected to develop in the future:
- Account Tracking: Manage multiple checking, savings, and credit card accounts.
- Transaction Categorization: Categorize transactions for detailed spending analysis.
- Budgeting: Create budgets and track your progress towards them.
- Insightful Reports: Visualize your financial data.
app/
main.py
- Core FastAPI application.models/
- Pydantic data models (e.g. User, Account, Transaction).routers/
- API endpoint definitions (e.g. accounts.py for account-related endpoints).dependencies/
- Dependency providers (database connection, authentication, etc).services/
- Business logic (functions for users, accounts, transactions, etc).
tests/
- Unit and integration tests.
Prerequisites
- Python 3.7+
- MySQL database
Steps
-
Fork this Repository to Your GitHub (Specially, if you're willing to contribute)
-
Clone the Repository (to run locally):
git clone https://github.com/yourusername/FinTracker.git
-
Install Python Dependencies:
cd FinTracker pip install -r requirements.txt
-
Configure Database (See Connecting to database) :
- Create a MySQL database named
fintracker
. - Update the database connection details in an environment file or configuration mechanism of your choice.
- Create a MySQL database named
-
Run the Backend Development Server:
- Run the main.py file.
-
Results:
- In your browser go to
http://localhost:8000/
. - To see Swagger docs, go to
http://localhost:8000/docs
.
- In your browser go to
- Download MySQL: MySQL Installer.
- Follow on screen instructions to install MySQL.
- Open MySQL workbench.
- Create a database in your local instance of MySQL using workbench:
Here, we have created a database called
CREATE DATABASE fintracker_dev;
fintracker_dev
. - Create the
.env
file in the root directory of the projectfin-tracker-backend
.- Include following variable in the .env file,
SQLALCHEMY_DATABASE_URL_DEV="mysql+pymysql://<username>:<password>@localhost:3306/fintracker_dev"
- Here, replace
<username>
and<password>
with actual values for the database connection. - Please remember to change the
PORT
(3306) in the above connection link if you use a different port.
- Include following variable in the .env file,
- Now you have successfully set up the database connection. Run
main.py
to check whether it works.
We welcome contributions to FinTracker! Please see our contributing guidelines in CONTRIBUTING.md
for details on how to submit issues, propose changes, and submit pull requests.
Discord: Join the Discord Server
This project is licensed under the MIT License.