Petroly's first initiative frontend source codebase
Table of Contents
Create a high-quality platform where all students share their knowledge and experiences in their KFUPM journeys
- Next.js (a React.js framework)
- react-bootstrap
- react-icons
- sass
- Apollo client for GraphQL
-
make sure to clone the Petroly backend repository in order to run the project, clone link
-
this project runs on
node v16
, so make sure you have the correctnodejs
version installed -
download the python backend dependencies via your selected virtual environment option
- install
pipenv
usingpip install pipenv
- install the dependencies on your virtual envrionments
py -m pipenv install
to install all dependencies from.pipfile
- use
py -m pipenv shell
to run the virtual environment
- install
-
run
python manage.py runserver
to run the backend project at port 8000 after activating your virtual environment -
run
npm install
to install required packages for the frontend -
run
npm run dev
to launch the frontend project on localhost 3000 -
for a headless testing session run
npm run test
, and for a browser session test, usenpm run cy:open
-
to run the telegram bot use
py manage.py startbot
on a separate terminalNote to use the telegram bot setup you need to generate a telegram bot token from BotFather. and use as an environmental variable named
TELEGRAM_BOT_TOKEN
( we recommend usingsecrets
vscode extension ) in the backend codebase. After naming your bot, change the bot name In your fork from the frontend inNotificationsModal.jsx
in the telegram button component to link it to your bot
To gurarantee a uniform maintenance of the project, contributors need to adhere to the following guidelines
-
It is recommended to contribute to targeted services in the
Projects
tab -
No direct pull requests to the master branch will be accepted under any circumstances
-
Every pull request title shall confirm to the following paradigm
@feature: contribution summary
feature
: the name of the targeted feature, or the issue ID in case of a bugfix
-
No empty-body pull request will be accepted
-
please utilize tags and link your commit to the respective project in
Projects
tab -
Comments on your code are mandatory
-
a screenshot or a video recording of the commit would be highly appreciated
-
submitting off-scratch commits on issues labelled
on progress
will be ignored, please branch off the existing progress so that we avoid duplicate contributions. -
please make sure that your commits pass all the automated testing checks, if you find a problem in the testing suite, do not hesitate to contact us
-
If you have a new service in mind, please consult us to formulate a plan and an archtiecture before implementing it and committing it directly to your branch
- Provide the sequence to re-produce the issue you have faced (a video or screenshot would be appreciated)
- Provide the needed tags to your issue
- the issue title shall confirm to the following scheme:
@service-name: issue summary
[service-name]
: the service name in theProjects
tab and shall be in CamelCase
- failing to meet requirements will lead to rejecting the issue
- to minimize merge-conflicts, each contributor shall work on a separate branch with the following title scheme:
username@service-name
service-name
shall be in CamelCase, and included in theProjects
tab
- only core-team members can merge branches to the master branch to ensure testing the code properly
You can help covering the costs of the ongoing maintenance of the Petroly Initiative by becoming a Patreon member using the sponsor button.
The Details of our targeted services are in the Projects
tab of the repository
Special thanks to everyone who has supported us by complementing us despite the shortcomings, interacting with our platform, giving us feedback, and helping us in maintaining this project, and to those who are willing to support us with their invaluable contributions in the future
You can contact the core maintainers of the project through our official support email support@petroly.co