gita / Bhagavadgita
Programming Languages
Projects that are alternatives of or similar to Bhagavadgita
A not-for-profit initiative to help spread the transcendental wisdom from the Bhagavad Gita to people around the world. Built for Gita readers by Gita readers.
⚠️ We are in the process of redesigning the app from scratch for v2 and are actively looking for contributors who would be interested in helping out. Please read the Contributing section below if you are interested.
ℹ️ Repositories for v2
For v2 of BhagavadGita.io, we plan to separate the backend and frontend layers. Hence, the code for backend will be hosted here and that for the frontend will be hosted here.
This repository will host general resources like roadmap, v2 plan, documentation etc for BhagavadGita.io.
Contributing
There are many ways in which you can participate in the project, for example:
- Submit bugs and feature requests, and help us verify as they are checked in
- Review source code changes
If you are interested in, please see the following documents -
- Roadmap
- BhagavadGita.io v2 Plan (START HERE)
- Contributing guide
- How to Contribute
- Coding guidelines
- Submitting pull requests
- Finding an issue to work on
Contributors needed -
Please fill out this form if you interested in any of the roles listed below or have suggestions for any other roles.
Developer
Backend, frontend, full-stack devs to build the web application. Android and iOS devs to build android and iOS apps.
Designer
UI and UX designers needed to design the web and mobile apps in order to provide the best possible experience to the user, helping them in reading.
Product manager
to manage the cross-functional team.
SEO expert
to optimize the apps for search engine and app store discovery.
Everyone else interested in contributing.
Suggestions are more than welcome.
Feedback
- Ask a question on Slack
- Request a new feature
- Up vote popular feature requests
- File an issue
- Follow @GitaByKrishna and let us know what you think!
OLD VERSION (v1)
Frontend and REST API for BhagavadGita.io
Backend - Flask
Frontend - Material Design
Database - PostgreSQL, ElasticSearch
REST API
The Bhagavad Gita Application Programming Interface (API) allows a web or mobile developer to use the Bhagavad Gita text in their web or mobile application(s). It follows some of the Best Practices for designing a REST API.
Current version
The current version of the API is v1. We encourage you to explicitly use this version in the url.
Schema
All API access is over HTTPS, and accessed from https://bhagavadgita.io/api/v1. All data is sent and received as JSON.
Authentication
HTTP requests to the BHAGAVAD GITA API are protected with OAUTH2 authentication. To be able to use the API, you need to be a registered BhagavadGita.io user. After signing in, you can register your applications from your Account Dashboard after which you will be issued a Client ID and Client Secret specific to an application that can be used to programatically get the access_token(valid for 300sec).
How to get an access token?
Make a POST request to /auth/oauth/token
with these parameters sent in Headers -
- Client ID - Obtained from Account Dashboard after registering an app.
- Client Secret - Obtained from Account Dashboard after registering an app.
- Grant Type - Use
client credentials
. - Scope - Use
verse
if you just want to access the verses,chapter
if you just want to access the chapters andverse chapter
if you want access to both.
Example -
curl -X POST "https://bhagavadgita.io/auth/oauth/token" -H "accept: application/json" -H "content-type: application/x-www-form-urlencoded" -d "client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&grant_type=client_credentials&scope=verse%20chapter"
Then, you can use the received access_token to access any of the endpoints. You can send the access_token as a header or as a query parameter.
Examples -
- Query Parameter
curl -X GET "https://bhagavadgita.io/v1/chapters?access_token=YOUR_ACCESS_TOKEN" -H "accept: application/json"
- Header
curl -X GET \ https://bhagavadgita.io/v1/chapters \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Documentation
We have 2 types of documenatations available for this API, both based on the Open API specification.
Developing Locally
- Fork this repository and clone the forked repository.
- Create and activate a Python 3 virtualenv.
- Use
pip install -r requirements.txt
to install the requirements. -
python manage.py runserver
to start the server. - Create an environment file
config.env
. Please open an issue or email [email protected] for the credentials of the file. - Frontend can be accessed at
http://127.0.0.1:5000
and API docs can be accessed athttp://127.0.0.1:5000/apidocs/
.