Skip to content

abdalrahmanx9/Finance-Tracker-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

md

Finance-Tracker-API

A backend API built with Django for managing personal finances, including budgets and transactions.

Key Features & Benefits

  • Budget Management: Create, read, update, and delete budgets.
  • Transaction Tracking: Record income and expenses with detailed information.
  • User Authentication (Future): Secure user accounts for personalized finance tracking (planned feature).
  • RESTful API: Designed with a RESTful architecture for easy integration with front-end applications.

Prerequisites & Dependencies

  • Python 3.8+: The project is built with Python 3.
  • Django 5.0+: A high-level Python web framework.
  • pip: Python package installer.
  • Virtualenv (Recommended): For creating isolated Python environments.

Installation & Setup Instructions

  1. Clone the repository:

    git clone https://github.com/abdulrahmanx9/Finance-Tracker-API.git
    cd Finance-Tracker-API
  2. Create a virtual environment (Recommended):

    python3 -m venv venv
    source venv/bin/activate  # On Linux/macOS
    # venv\Scripts\activate  # On Windows
  3. Install dependencies:

    pip install -r requirements.txt # Create requirements.txt first, see below

    To create requirements.txt, you can use pip freeze > requirements.txt after installing django. However, given the provided file structure, the required dependencies are only Django. To do this:

    pip install Django
    pip freeze > requirements.txt
  4. Apply Migrations:

    python manage.py migrate
  5. Run the development server:

    python manage.py runserver

    The API will be accessible at http://localhost:8000/.

Usage Examples & API Documentation

While detailed API documentation is under development, here's a basic example:

  • Retrieve all budgets (example):

    GET /budgets/ (Needs implementation in urls.py and views.py).

    Example using curl:

    curl http://localhost:8000/budgets/

    (Assumes a Budget model and corresponding views and URLs are defined.)

API Endpoints (To be Implemented):

Endpoint Method Description
/budgets/ GET List all budgets
/budgets/ POST Create a new budget
/budgets/{id}/ GET Retrieve a specific budget by ID
/budgets/{id}/ PUT Update a specific budget
/budgets/{id}/ DELETE Delete a specific budget
/transactions/ GET List all transactions
/transactions/ POST Create a new transaction
/transactions/{id}/ GET Retrieve a specific transaction by ID
/transactions/{id}/ PUT Update a specific transaction
/transactions/{id}/ DELETE Delete a specific transaction

Note: The API endpoints provided are a suggestion based on RESTful principles and require implementation in the Django project.

Configuration Options

The project settings are configured in app/app/settings.py. You can modify settings such as:

  • SECRET_KEY: Important for security, especially in production. Change this!
  • DEBUG: Set to True during development and False in production.
  • ALLOWED_HOSTS: Configure allowed hostnames for deployment.
  • DATABASES: Configure the database connection settings. By default, it uses SQLite.

Environment Variables:

Consider using environment variables for sensitive information like SECRET_KEY and database credentials, especially for deployment. Libraries like python-dotenv can help manage environment variables.

Contributing Guidelines

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Write clear and concise commit messages.
  4. Submit a pull request with a detailed description of your changes.
  5. Adhere to the project's coding style (e.g., PEP 8).
  6. Include tests for new features and bug fixes.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages