GithubHelp home page GithubHelp logo

budgetwise's Introduction

BudgetWise is a small PHP web application to track expenses and debts quickly within a trip with your friends - A clone of SplitWise

Introduction

This application is built up from scratch with Composer autoload features and various PHP packages for the learning purpose of backend-dev with PHP.

Screenshots

Screenshot 2023-07-21 at 6 33 40 PM

Features

  • Authentication with sessions
  • A user can add trips and add users to the trips
  • A user can log transactions to a trip
  • Users can see the trip expense summary and how to resolve debts with other members in the trip

Project Libraries

  • symfony/http-kernel
    • Main application shell (See Router.php), processing requests and produce responses
  • symfony/http-foundation
    • Sensible wrapper around PHP globals such as $_GET, $_POST, $_SERVER with Request object
  • twig/twig
    • Template library
  • doctrine ORM
    • Database stuff
  • php-di/php-di
    • Service container and handle dependency injections (see different Controller class and bootstrap.php)
  • moneyphp/money
    • Library for monetary calculation

Installation

  • By default, the application uses sqlite, feel free to load you own db configuration using in config/database.php
composer install

# Database initialization with doctrine ORM
php bin/doctrine orm:schema-tool:update -f --dump-sql

# Execute fixtures to produce some fake data
php bin/execute_fixture.php

# Run local server
php -S localhost:8000 -t public/

Database Design

Tables

  • users: User information and credentials, used for authentication
    • name
    • email
    • password
  • trips: Trip expenses
    • name
  • transaction
    • name
    • amount
    • currency

Table Relationships

  • One user can belong to many trips
  • One trip can have many users
  • One trip can have many transactions
  • One transaction belongs to one user

TODO

  • Build error page corresponding to HTTP error code (i.e. 403, 404)
  • Session flash error messages
  • Delete / Update transactions
  • Add new members to an existing trip
  • Handle redirect better

Disclaimer

  • This project is for my learning purpose of PHP to see how different pieces are glued together. And it could be helpful to someone who wants to see how to set up a PHP projects from scratch with composer and standalone libraries. Therefore, it's not ready for production.

budgetwise's People

Contributors

max172-hqt avatar

Stargazers

Son Nguyen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.