Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 4 Next »

Directory Format

npm install
npm run dev       # to run on localhost

/frontend/src/Routes.tsx

  • includes routes to pages

/frontend/src/components/<componentName>

  • create folder for a component in components folder i.e. Dialog folder

  • include in folder:

    • .tsx file for component

    • style.ts for component

    • .test.tsx file for testing

/frontend/src/helpers

  • add files where calculations or helper functions are made eg calculations for average ratings

/frontend/src/logic/functions

  • create files for functions with API requests

  • i.e. getUser.function.ts

/frontend/src/pages/<pageName>

  • create folder for each page i.e. HomePage folder

  • include in folder:

    • .tsx file for page

    • .test.tsx file for tests

    • .style.ts file for style

    • Folders for bigger sections of the page i.e. LoginDialog

We don’t want to call the actual backend to test while developing frontend, so instead we’ll be using a mock server (in /frontend/src/stubbing)

can have a look at the pull request here (ty aimen)
https://github.com/csesoc/cselectives-v2/pull/67

  • No labels