Thank you for considering and taking the time to contribute! Product focuses on 100% education as well as upskilling developing countries and rural areas.
The following are guidelines for contributing to this project.
Please open a new issue in the appropriate GitHub repository with steps to reproduce the problem you're experiencing.
Be sure to include as much information including screenshots, text output, and both your expected and actual results.
Firstly please refer to the applicable github-repo and search in the issues-list to make sure that your idea has not been (or is not still) considered.
If it is not yet considered or something more can be added then please create a new issue in the GitHub repositorynew-issue describing your enhancement.
Be sure to include as much detail as possible including step-by-step descriptions, specific examples, screenshots or mockups, and reasoning for why the enhancement might be worthwhile.
- Firstly you have to make your own copy of project. For that you have to fork the repository. You can find the fork button on the top-right side of the browser window. (Refer image below )
- Kindly wait till it gets forked.
- After that copy will look like
<your-user-name>/edu-client
forked fromcodeforcause/edu-client
.
- Now you have your own copy of project. Here you have to start your work.
- Go to desired location on your computer where you want to set-up the project.
- Right click there and click on
git bash
. A terminal window will pop up - Type the command
git clone <your-fork-url>.git
and hit enter.(Refer the image to copy url) - Wait for few seconds till the project gets copied
- Now you have to set up remote repositories
- Type
git remote -v
in terminal to list remote connections to your repo. - It will show something like this:
origin https://github.com/<your-user-name>/edu-client.git (fetch)
origin https://github.com/<your-user-name>/edu-client.git (push)
- Now type the command
git remote add upstream https://github.com/codeforcauseorg/edu-client.git
this will set upstream as main directory - Again type in command
git remote -v
to check if remote has been set up correctly - It should show something like this :
origin https://github.com/<your-user-name>/edu-client.git (fetch)
origin https://github.com/<your-user-name>/edu-client.git (push)
upstream https://github.com/codeforcauseorg/edu-client.git (fetch)
upstream https://github.com/codeforcauseorg/edu-client.git (push)
Whenever you want to contribute to any project. It is best practice that you should create a branch and push the branch as PR rather than directly pushing main/master branch
git branch
will list all the branches in the repository- Now type
git branch <your-branch-name>
to create your branch - You can check the created branch by
git branch
- But still if you start editing the edits will go to the main branch. To change the path , type in
git checkout <your-branch-name>
- Now you are ready to do the desired changes.
- Create a new file
.env
in root directory. - Copy all the default content from
.env.example
file to.env
file. - You can edit this
.env
file to provide your own project credentials if needed in future for specific tweaks and tests.
- Open this clonned folder in text editor of your choice
- If you want to use the project using
npm
then that comes along side when you download and install node js
- Open the terminal and type in
npm install
, to install all the dependencies. - Run:
npm start
- Open http://localhost:3000 to view it in the browser.
- The page will reload if you make edits.
- After doing changes type
npm test
. This launches the test runner in the interactive watch mode. - See the section about running tests for more information.
- Run the command
npm run build
- Builds the app for production to the
build
folder.\ - It correctly bundles React in production mode and optimizes the build for the best performance.
- The build is minified and the filenames include the hashes.
Your app is ready to be deployed! - See the section about deployment for more information.
Skip the yarn part and proceed to the pushing the changes section here
- Open this clonned folder in text editor of your choice
- If you want to use the project using
yarn
then you can do either of the following- Download Yarn Package manager here
- If you already have
npm
installed you can simply type innpm install --global yarn
. - If you already have
choco
installed you can simply type inchoco install yarn
- If you already have
scoop
installed you can simply type inscoop install yarn
- To check if the yarn has installed correctly type in
yarn --version
this should show you the current version of yarn.
- Open the terminal and type in
yarn start
- Open http://localhost:3000 to view it in the browser.
- The page will reload if you make edits.
- You will also see any lint errors in the console.
- After changes type
yarn test
. This launches the test runner in the interactive watch mode. - See the section about running tests for more information.
- Run the command
yarn build
- Builds the app for production to the
build
folder.\ - It correctly bundles React in production mode and optimizes the build for the best performance.
- The build is minified and the filenames include the hashes.
Your app is ready to be deployed! - See the section about deployment for more information.
- Run the command
npm run storybook
- wait on
localhost:6000
- write stories for component in
stories
folder undersrc
folder.
After doing the changes, and when tests are successfully passing you can push your changes to remote.
- Goto your terminal and type
git status
and hit enter, this will show your changes from the files - Then type in
git add
and hit enter, this will add all the files to staging area - Commit the changes by
git commit -m "<message-describing-your-change>"
and hit enter. - Now push your branch to your fork by
git push origin <your-branch-name>
and hit enter.
By this time you can see a message on your github fork as your fork is ahead of codeforcause:master by <number> of commits
and you can also see a button Compare and pull request
.