This is a Firebase Function + Express API for referral codes, with Firestore as the database.
- Create a new referral code using an existing one, this will link the newly created referral code with the one used in a tree like structure.
- Perfom an action using a referral code, this will update all the parents of the referral code with the action as well.
- View the referral code data: parent referral code, children referral code, data on children referral code actions.
- [WIP] Send lifecyle emails update. When someone created a referral code or performed an action using your referral code.
First, install the following VSCode extensions: ESLint, Jest, sort-imports, Prettier - Code formatter.
Then navigate to the repo using the terminal and install the depencencies:
npm run ci
Finally, run the development server:
npm run serve
You will also need to run unit tests before making a pull request or changing the tests with:
npm run test
TODO - update this section
- pages - where all the pages are found.
- components - where all the commonly used components are found. Ex: button, links, input.
- pages/api - where the backend apis are found, mostly to interact with the database.
Firebase:
- Firebase Console - (you will need to request access to access this link) view stats about the website, manage resource and interact with the database.
- Firestore Documentation - documentation on functions to interact with the firestore database.