/budget-manager

A simple budget manager web application 💰

Primary LanguageJavaScriptMIT LicenseMIT

Build Status GitHub GitHub repo size Contributor Covenant

Budget Manager

Web Application to track all the expenses.

Budget Manager

Requirements

  • NodeJS
  • MongoDB
  • Keycloak

UI

Frontend is entirely realized with ReactJS and Apollo Client.

We adopted the WellD react component library to build the frontend interface. The structure of the pages is made with tailwindcss.

During the development the frontend is served by webpack dev server. When the application is installed on QA or PROD environment the FE assets are served by express server (frontend/server.js) and it redirects graphQL requests to the BE.

Installation & run 🏃🏿‍♂️

From frontend folder run yarn install. Now the FE is ready to be started, execute yarn start always from the frontend folder.

BE

We use Express and Apollo GraphQL to expose a graphQL API. Data are stored on mongodb and our ORM is mongoose.

DB

We use mongodb to store the transactions. We have a text index db.transactions.createIndex( { "$**": "text" } ) to perform full text searches.

Authentication & authorization 🔐

Our authentication layer is provided by keycloak. When there is not a valid session or the session is expired the frontend redirect the User to the keycloak login page.

Each request to the backend contains the Authorization header with the Bearer token. The backend validates the token and extracts username and roles from it.

There are 3 roles:

  • read: user with this role can visualize and filter the transaction
  • edit: user with this role can add and modify a transaction
  • delete: user with this role can delete a transaction

QA environment

Test Application is hosted on Heroku and it provides us even the mongoDB. Keycloak server is on private server and it is connected to private LDAP.