GithubHelp home page GithubHelp logo

caburj / kwartrack Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 1.06 MB

Oh well, it's yet another expense tracker.

Home Page: https://kwartrack.vercel.app

JavaScript 0.06% TypeScript 88.63% CSS 0.09% SCSS 0.56% EdgeQL 10.65%

kwartrack's Introduction

Introduction

Use this app to track your expenses based on partitions and categories.

Screenshot 2023-10-23 at 19 17 12 Screenshot 2023-10-23 at 19 17 53

Categories

  • Categories has 3 types - Income, Expense and Transfer.
  • Income categories can be:
    • Salary and Reimbursements
  • Expense categories can be:
    • Groceries, Transportation, Rent, Bills, Restaurants, etc.
  • A transfer category is used to categorize transactions that moves money from one partition to another.

Partitions

  • Our money normally resides in our bank accounts. And to properly manage our money, we create multiple accounts to serve different purpose. For example, one account is for the monthly budget expenses and another is for the savings.
  • In this tracker, we introduce the concept of Partitions where each partition corresponse to a portion of an accounts.
    • Say we have a bank account in ING. In this tracker, we create Main and Savings partitions.
    • With this concept, we have a finer control on how much savings we have without creating another bank account. The two partitions just reside in one bank account.

Transaction

  • With the two concepts above, we can now introduce a transaction.
  • A transaction is composed of a category, a partition (or two if the category is transfer) and the amount.
  • To record an expense, we select an expense category, the partition to deduct the expense and the amount.
  • We can also record a transfer using the transfer category which requires additional info -- the destination partition.
    • Maybe this month we didn't consumed all our budget from our main partition, so we want to move it to the savings.
      • We can create an expense from main and income to savings, however, this is better recorded with a transfer.
      • With a transfer transaction, a destination partition is requested as additional information.
      • In the background, a transfer transaction is actually composed of 2 transactions.

Summary

  • Total amount of money you have in each partition is tracked in the side bar.
  • Total expenses, income and transfer for each category is also summarized.
  • You can also filter the list of transactions you see by clicking the categories and partitions.
  • Extra: One partition can borrow from another which we call Loans in the app.
    • You can also track those.

Getting started

Development mode

  1. Fork this repo and clone the fork in your computer.
  2. Make sure edgedb is installed and have a clerk account.
  3. Create a .env file with the following values filled from edgedb and clerk.
# edgedb cloud (db) requirements
# If blank during development, local db is used.
EDGEDB_INSTANCE=
EDGEDB_SECRET_KEY=

# clerk (auth) requirements
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/

# should point to the base url of the deployed app
NEXT_PUBLIC_HOST=
  1. Initialize edgedb project with edgedb project init.
    • Only done once during initial setup.
  2. Run the script: create-first-user to create your first account. $ pnpm create-first-user --email=... --name=... --username=...
    • Run this everytime edgedb db is cleared and the db of the corresponding user is dropped.
  3. $ pnpm install
  4. $ pnpm dev

Deployment

Unfortunately, we don't have our own resources to have a deployment for many so if you want to use this app, we'd ask you to deploy your own. It's a NextJS app and is backed with EdgeDB. We also use Clerk for authentication.

  • So to deploy, you need an edgedb cloud, clerk and vercel accounts.

    • Complete the env variables below. Values come from edgedb, clerk and vercel.
    # edgedb cloud (db) requirements
    EDGEDB_INSTANCE=
    EDGEDB_SECRET_KEY=
    
    # clerk (auth) requirements
    NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
    CLERK_SECRET_KEY=
    NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
    NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
    NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/
    NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/
    
    # should point to the base url of the deployed app
    NEXT_PUBLIC_HOST=
    
    • Deploy your to vercel.
      • Vercel will ask for the env variables which you'll provide from above.
    • From your computer, make sure you have edgedb installed.
      • Run the script: create-first-user to create your first account.
        • $ pnpm create-first-user --email=... --name=... --username=...
        • When you visit the page and authenticate using the email you specified in the above command, you'll be redirected to the main app.

Authors

kwartrack's People

Contributors

caburj avatar dependabot[bot] avatar binong01 avatar jcaburnay avatar

Forkers

jcaburnay

kwartrack's Issues

Dashboard page

Ideas:

  • Time series of monthly expenses and income.
  • The pie charts

Populate random data for demo

Introduce a script that can populate the database with accounts, partitions and transactions. Having this will be useful for developing the dashboard page.

Reports

Kind of the printable version of the dashboard page

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.