ChallengeMe is a n open source project and we encourage you to add from your skill and knowledge for the better of all.
We are happy to see issues brought up in github by our users and are honoured to accept your contributions into are site.
You can see the WIP version of the site here on the Staging Build
Fork the development repository to your account. clone it to your machine and go to the project folder.
from the root directory:
- run
cd server - run
npm i - depending on the changes you want to work on you may need to add certain parameters to the
.envfile for certain systems to work.
- run
cd ../client - run
npm i
the project uses Sequelize to exchange information with a MySQL DataBase. to set it up locally:
- create new db for development - default name is
challenge(can change by.envfile). Also add to.envall the required data to connect to the database. - run structure migrations:
npm run migrate - run test data seeds:
npx sequelize db:seed:all
-
Change the
.example.envfile's name to.envif you haven't already. -
Change
GITHUB_ACCESS_TOKENin.envfile to your github token, you can learn more about that here -
Change
GITHUB_REPOin.envfile to your github forked repository -
Change
IP_ADDRESSin .env file to your client ip address -
Change
SUVELOCITY_MAILin .env file to an email account you want to use for testing. -
Change
SUVELOCITY_PASSWORDin .env file to the email's password. you can read about it here. You are not limited to Gmail of course. -
Change all tokens in
.envfile to some random characters (used as encryption keys)REFRESH_TOKEN_SECRET RESET_PASSWORD_TOKEN ACCESS_TOKEN_SECRET EMAIL_TOKEN_SECRET
Server:
cd servernpm run dev- nodemon hot reloads
Client:
cd clientnpm start
-
Enable GitHub actions in your forked repo - go to https://github.com/{your-user}/{your-repo}/actions and press "I understand my workflows, go ahead and enable them"
-
Github has many issues when it comes to actions and forked repositories.
If you need to add any change for files under.github/workflows, in this step we just need to ensure Github is aware of those changes 🥵.
You may need add a newline at the end of the file or change the name of the folder, then commit it and change it back - in order to ensure the changes are noticed by Github. -
Create .env file from example and fill the params (repo name / access token)
-
You should create an access token from a github user who has admin permission on the forked repo - if you don't, your team leader probably does.