Project description...
This document is to help developers understand the platform and the development requirements of the project. The document will be updated from time to time to meet project expectations and standards.
During the development of the project, branches will be created for specific features/components/function development.
PR will be created against this issue and will be merged to the development
branch of the repository.
To find new issues please visit Projects or visit the Issue tab. A developer can request for clarification of an issue before going on so to ensure full compliance with development expectations and requirements.
The folder structure is as follows
- public
- public/assets :
For images used in the project
- app
For route pages
- app/components
for app components
- lib
for app functions
Folder naming would be responsibility of the collaborators.
The naming convention for components files would be
[name]_comp.js
eg. addButton_comp.js, highlightTree_comp.js
We'll be using the single file export system for our components and page exports,
We'll also be using regular javascript function to define component
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 with your browser to see the result.
A PR should request a reviewer once ready for review
The naming convention for PRs would be
[category]-[name]:[title of tasks]
. category could be Feature, Bug-Fix, Documentations. E.g. Feature-Praise:authentication-context-proviver
To enhance the development experience and streamline component testing, we have integrated Storybook into this project. Follow these steps to get started with Storybook:
Ensure you have Node.js and npm installed on your system.
Install Storybook globally using npm (already listed as a dev dependency)
-
Cd to
developers
-
Run
npm install
-
In the development directory of the project, run the following command to start Storybook:
npm run storybook
Storybook will start running at http://localhost:6006 by default. You can access it in your web browser.
Create a .stories.js file in the component directory to document and visualize your components in Storybook.
For example,
Create a story for a Button.jsx in the same directory, like so:
Button.stories.js
Open your web browser and navigate to http://localhost:6006.
You'll see a list of components, including "Button."
Jest is a JavaScript testing framework commonly used for unit testing. To get started with Jest in this app, follow these steps:
Install Jest as a development dependency (already listed as a dev dependency)
-
Cd to
developers
-
Run
npm install
-
Create test files for your components with a .test.js or .spec.js extension, e.g., Button.test.js.
Place these test files in the same directory as the component you want to test. -
Write your unit tests using Jest and the testing utilities provided by @testing-library/react.
-
Run Jest tests using the following command:
npm test
Cypress is a modern end-to-end testing framework for web applications. To get started with Cypress in your app, follow these steps:
Install Cypress as a development dependency (already listed as a dev dependency)
- Cd to
developers
- Run
npm install
- Create Cypress test files in the developers/cypress/e2e directory. For example, you can create a login.cy.js file to test the login functionality.
Write your end-to-end tests using the Cypress API.
Start Cypress using the following command:
- npx cypress:open
Cypress will open a GUI where you can select and run your test files.