- A demo can be found at C-19 Tracker
- ReactJS → for all things frontend
- Typescript → for developer experience
- Tailwindcss → for all things css
- Context API → for managing state in react application natively
- Github Actions → for CI/CD
- React Testing Library → for unit tests
- AWS S3
- Clone and change directory (
cd covid-tracker
) to the repository - Run the commands
npm ci
to clean install and download exatct versions of all the dependencies - To start the setup issue the command
npm run start
, this starts a react client atlocalhost:3000
- The project files are stored in the
./src
directory - The layout components like page layout, header, footer, and side navigations are stored at the
./src/containers
folder - The components used as the table, stats card, etc. are stored at the
./src/components
folder - State in the application is maintained via context APIs, these are placed in the
./src/contexts
folders - Project uses hooks extensively and the custom ones are placed in the
./src/hooks
folder - The project is served on s3 via the
/build
folder that is created withnpm build
- The tests are located in
__tests__/
folders within each folder inside of./src
, this ensures that tests are locallized and yet aggregated at one place - the test runner can be initiated via
npm run test
, this generate./coverage
file, this can be used to further analyse or prevent deployments if the coverage dips below a given threshold, ref:Link Link
- A push to the master branch will upload and deploy your latest changes to S3 via Github
- In case the unit tests do not pass, the deployment fails (the action fails)
- For building the CSS files in development
build:tailwind
command is used vianpm prestart
- For building the CSS files in production
build:css
command is used vianpm prebuild
, this uses@fullhuman/postcss-purgecss
package to remove unused CSS in production
- Set GitHub action secrets via GitHub project page > settings > actions
- Secrets to be set are
AWS_S3_BUCKET
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION