Data structure and System Architecture - earmuff-jam/invoicer GitHub Wiki
General Directives
For the invoicer application, we are using React as a frontend tool for UI and leveraging netlify functions to support backend functionalities. We also are using firebase / firestore setup to read / write info for the user and for the authentication mechanism.
Existing infrastructure
We use local storage to save and display information for the user. pdfDetails, receiver and sender are three json objects that we use to transform the invoicer application. We should attempt to re-use this for easy invoicer setup within the application.
New infrastructure
One of the primary objectives is to create a owner - tenant relationship. One owner can have many tenants. This one to many relationship is useful to build out this system infrastructure. Although we are not using a relational database, we should be able to make this adjustment with the NoSql database as well.
Login portal should allow users to sign up. They carry the role property. This role property defines their admin rights. Recommendation here is to use enum data structures. Logged in users have the ability to view their dashboard ( which we already have built and it also supports multiple invoices ). Logged in users should also be able to setup payment structures. Eg, a logged in owner should be able to setup his / her stripe account information and a logged in tenant should be able to send money to that account. This is a technical challenge that we need to overcome.
Logged in users should also be able to get recurring emails notifying rent due. This email setup should occur on a monthly basis. An automated reminder form template can be drafted so that the owner can send that drafted template via email. We should leverage netlify functions for this feature or we should leverage the firestore db.
Logged in users should also be able to use DocuSign or something similar to store and sign documents. These documents can be saved to Amazon s3 which then can be pulled and displayed to the client. Both parties should be able to view their respective documents when they click on the list.