The official source code repository for Quran.com
Join the Quran.com community
Visit Quran.com
·
Report Bug
·
Request Feature
Ma Sha'a Allah and Tabarak Al Rahman, "The Noble Quran" application serves millions of visitors from all around the world. Al-hamdu Lillah, the project continues to grow.
This success is only with the blessings of Allah Subhana Wa Tala. We're also thankful for the dedicated professionals who volunteer diligently to keep this project beneficial.
Continue reading to learn more about how you can contribute to "the Noble Quran GitHub repository". Your help will surely go a long way, In Sha'a Allah.
The second version of "the Noble Quran" application is developed using Ruby on Rails. Ruby is an interpreted, high-level, general-purpose programming language. Rails, is a server-side web application and a model–view–controller framework. The Rails framework is written in the Ruby programming language, and it provides default structures for a database, web service, and web pages. For more information about Ruby on Rails, see the Ruby on Rails Guide.
Our stack:
Our team would like to keep development libraries up to date. Please refer to the package.json file for the versions of the project dependences. To start contributing, you'll first need to install the prerequisites and set up a local Git repository, as outlined in the next sections.
You'll need:
- Git for source code version control. If you want, you may use another Version Control Software, such as SVN.
- Node.js, a JavaScript runtime environment that executes JavaScript code outside of a browser
- Yarn stands for "Yet Another Resource Negotiator", it's an Apache Hadoop technology
- Follow this guide to install Ruby, Rails & and PostgreSQL together. Select Ruby version
3.0.0
- pgAdmin is a GUI for PostgreSQL
- You're strongly encouraged to install Ruby with Ruby Version Manager (RVM). RVM is a command-line tool that lets you easily install and manage multiple Ruby environments.
The setup instructions assume that you're using Git Bash, but the concepts are the same if you're using Git GUI or another version control software.
-
To begin, fork the current "Noble Quran project repository" on GitHub.
-
Clone the repository of your fork. Launch your terminal, and enter the following command:
git clone https://github.com/<your-username>/quran.com-frontend-v2.git
Replace <your-username>
with your GitHub user name.
- Move into the
quran.com-frontend-v2
directory with the following command:
cd quran.com-frontend-v2
- Assign the forked repository to a remote called "origin".
git remote add origin git://github.com:<your-username>/quran.com-frontend-v2.git
- Assign the original repository to a remote called "upstream".
git remote add upstream git@github.com:quran/quran.com-frontend-v2.git
- Install the frontend packages with yarn:
yarn
- Install the Ruby bundles with the following series of commands:
rvm gemset create quran
rvm gemset use quran
gem install bundler
bundle install
-
Check that PostgreSQL is up and running on your machine. For Linux, use:
-
Download the mini database dump. This dump has the first 15 Ayahs of each surah, for all the Surahs, along with two translations, two audio recitations, and a other required data.
-
Inside the
quran.com-frontend-v2
directory, run:
bundle exec rails db:create
- Load the dump in the PostgreSQL database. This process may vary for different operating systems. For Linux, use:
psql -cxq --quiet -d quran_dev -f dump.sql
- To start the local server with Rails, run:
rails s
In Sha'a Allah, after going through these successfully, you'll see the web application running on localhost:3000
If you're new to Git, see the Git references and the Git training kit to learn more about the Git commands.
-
Review the open issues for a list of known issues and proposed features.
-
Pull the latest changes from "upstream" and push these changes to your forked "origin". You'll need to repeat this step each time you plan to contribute.
git checkout master
git fetch upstream
git rebase upstream/master
git push -f origin master
-
Make a branch for your feature or fix. It's a good practice to make a separate branch for each feature or fix.
git checkout -b branchName
-
Employ your technical chops to resolve an issue or develop a proposed feature. Be sure your code follows our practices, as observed in our source code.
-
Run the following commands before you switch from your current branch to a new branch, to prevent leaking the changes on your current branch to another branch. The
git status
commands shows you the modified files, andgit add .
adds all the changed files to the staging area. Thegit commit
command moves the files from the staging area and makes a commit in the branch. Only the committed changes can be pushed.git status
git add .
git commit -m "this is a commit"
-
When you're done making changes, push your branch to the "origin". The
-u
flag links this branch with the remote branch, so that in the future you can simply typegit push origin
.git push -u origin branchName
-
Navigate to the "Noble Quran project repository" on GitHub. Click on the "Pull Request" button in the project header. Enter a title and description of your pull request, and click on the green "Send pull request" button.
-
Your code will be reviewed. You can also continue to push to your branch in light of discussion and feedback about your commits.
Contributions are what make the open source community an amazing place to learn, inspire, and develop together. The contributions you make are appreciated.
This project is for the sake of Allah Subhana Wa Tala, and our team has good intentions while working on this project. When using our project code or contributing to the project, you agree to abide by the Quran and the Sunnah.
You are not allowed to use or copy the project code for any material gains or improper use.
Distributed under the GNU GPLv3 License. See LICENSE for more information.