SellScale App is a React app that primarily uses the Mantine component library and Tailwind. We also use Jest for unit testing, lodash as our main functional utility library, tabler for our icons, and recoil as our global state management solution.
This app is our primary resource for customers to interact with our systems, such as:
- import prospects from CSVs
- view prospect statuses
- write notes on prospects
- create personas and manage CTAs
- check up on their campaigns ... and more
The source directory is as follows
- public
(for non-transpiled static files, mainly SEO stuff)
- src
- assets
(for images, fonts, etc)
- auth
(for user authentication code)
- components
(for React components, where most of the code is)
- constants
(for static values/variables)
- utils
(for library and utility code)
- __tests__
- category 1
- test1.js
- test2.js
- category 2
- ...
- ...
This structure keeps our code clean and ensures we know where to find unit tests easily.
If setting up from a fresh machine, make sure you have the following installed before continuing:
The following steps assume that you have the above prerequisites installed - any necessary installations should be added to the list above.
-
Install the dependancies (in the future, we shouldn't need
--force
)npm i --force
-
Create a
.env
file and paste the following example. Ensure that theREACT_APP_API_URI
points to your locally running the API.REACT_APP_API_URI=http://localhost:5000
-
To start the app, run the following
npm start
-
Make sure that everything is setup but running some unit tests.
- Run Unit Tests: Run all the unit tests by typing
npm test
. There should not be any failures.
In general, when making changes, follow these guidelines:
- Make a new branch:
<YOUR_NAME>_<YEAR-MONTH-DAY>_<DESCRIPTION-SEPARATED-BY-HYPHENS>
Examples would be aakash_2023-01-01_adding-delete-api-for-prospects
or david_2023-01-02_generate-new-hash-keys
-
Check out the new branch, and make your feature changes. INCLUDE DOC
-
Add unit tests! (Do not forget to add unit tests!)
-
Run all unit tests locally. If everything passes, push to branch.
-
Get a peer review from a fellow engineer and have them 'check it off'
-
Verify your Pull Request in Github. If things look good, merge into Master (and it will automatically deploy via our Render pipeline)
None for now