Git Product home page Git Product logo

gita / bhagavadgita Goto Github PK

View Code? Open in Web Editor NEW
161.0 10.0 23.0 44.59 MB

A non-profit initiative to help spread the transcendental wisdom from the Bhagavad Gita to people around the world.

Home Page: https://bhagavadgita.io

License: GNU General Public License v3.0

Python 46.11% CSS 6.59% HTML 45.02% JavaScript 1.73% SCSS 0.55% Procfile 0.01%
bhagavad-gita rest-api flask api swagger oauth2 python frontend krishna open-source

bhagavadgita's Introduction

Bhagavad Gita

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 join our Discord server below if you are interested.

New Repositories 👇


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 -

  1. Client ID - Obtained from Account Dashboard after registering an app.
  2. Client Secret - Obtained from Account Dashboard after registering an app.
  3. Grant Type - Use client credentials.
  4. Scope - Use verse if you just want to access the verses, chapter if you just want to access the chapters and verse 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 -

  1. Query Parameter

curl -X GET "https://bhagavadgita.io/v1/chapters?access_token=YOUR_ACCESS_TOKEN" -H "accept: application/json"

  1. 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.

  1. Swagger UI
  2. ReDoc

Developing Locally

  1. Fork this repository and clone the forked repository.
  2. Create and activate a Python 3 virtualenv.
  3. Use pip install -r requirements.txt to install the requirements.
  4. python manage.py runserver to start the server.
  5. Create an environment file config.env. Please open an issue or email [email protected] for the credentials of the file.
  6. Frontend can be accessed at http://127.0.0.1:5000 and API docs can be accessed at http://127.0.0.1:5000/apidocs/.

bhagavadgita's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar gupta-anubhav12 avatar redraushan avatar samanyougarg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bhagavadgita's Issues

Better UI design scheme for Verse card

What

  • Elements of the Verse card should be more aligned.
  • Social sites liks - FB, Twitter, and share should be shown at the bottom of the card, giving more clarity to the Mantra heading.
  • Unified design for the Buttons.
  • Better contrast ratio between background color and font-color of the verse.

How

I have created a POC that that demonstrates the above mentioned changes, also I am adding the current version of the Verse card. Please compare both and and let me know any changes you would like to make to make it more better.

Current Verse Card

old-verse

POC Verse Card

screenshot-bhagavadgita io-2019 02 24-09-00-40

Iteration Plan January 2020

This plan captures our work in January. This iteration will mainly be focused on getting contributors to the project, writing down the requirements for the features and planning the overall tech architecture of the project. Everyone is encouraged to contribute.

Please refer to the Roadmap before starting.

Planned Features

1. Verse of the day

👉Every day a new verse is selected and sent to users via email, push notifications etc. Similar to how it is implemented in v1.
👉Could rethink the process of selecting verses.

2. Full-Text Search

👉Should be fast and in realtime.
👉Could use something like Algolia.
👉Search by chapter, verse, phrase or person to quickly find what you are looking for.
👉Language independent.

3. Verse Page

  • Each verse should have - >
    👉Sanskrit verse
    👉Transliteration of the Sanskrit verse
    👉 Word meanings
    👉Translation by an authorized source
    👉Commentary by an authorized source
    👉Audio (See feature 4 for more detail)

Actions for each verse page / on selecting a verse on the chapter page -
👉copy text
👉share text (Verse sharing should have chapter and Verse number and link for that Verse.)
👉bookmark/favourite
👉add notes (See feature 18)
👉highlight

4. Audio for verses

👉Audio for the Sanskrit verse, translation as well as commentary for all the verses.
👉 Initial Hindi and English support and later add for more languages.
👉Use Alexa or Google Wavenet for text to speech.

5. Progress Tracking  

👉User should be able to keep track of their Chapter-wise, Overall and Monthly Progress using detailed graphs and statistics. (something to similar to what's there in v1)
👉Add a GitHub like streak chart.
👉Time connected with Krishna (daily/weekly/monthly)

6. Achievements System

👉 Reward user with badges etc on completing certain tasks (eg 100 verses read).
👉 Allow user to share the achievement.

7. Reading Plans 

👉 Allow users to subscribe to reading plans so that they can improve their Gita reading habits.
👉 Eg - monthly, yearly etc.

8. Favourites 

👉 Allow users to mark verses as a favourite so that they can read those later.

9. Theme Customization

👉Allow users to personalize the theme by allowing them to change the -

  1. font size
  2. colours

👉Add option for dark mode.

10. Offline availability

👉Allow users to download the verses so they can read when there is no internet connection.

11. Settings

👉Choose verse transliteration language
👉Choose translation/commentary source and language
👉Choose secondary commentary source and language
👉Choose font size, style and theme

12. Last read verse

👉Show user's last read verse on the homepage so that they can quickly navigate to it.

13. Random verse

👉 Display a random verse on the homepage
👉 New verse on each refresh

14. Navigate to specific chapter and verse

👉 Allow the user to go to a specific chapter and verse

15. Subscription popup (full screen for mobile)

👉 Display the first time and if not subscribed then again after x number of times.
👉 Option to subscribe later (display after some time)

16. Chat and forum

👉A community to chat and discuss topics related to the Bhagavad Gita.

17. Daily Alarm

👉Remind the user to read the Gita each day.

18. Notes for each verse

👉A popup that allows a user to enter notes for a particular verse.
👉Options like save, delete, share and copy.

19. History

👉List of all the verses read by the user in reverse chronological order.

20. Quiz

👉Daily quizzes on the Bhagavad Gita.

21. Dictionary

👉A dictionary of all the word meanings from the Gita.

22. Hierarchical ordering

👉Structure the shlokas methodologically. Arrange them into Chapter No. And Shloka No. and add meta accordingly in frontend as well as API. 3.67 would mean Shloka no. 67 of Chapter 3.

23. Setup Patreon + merchandises

👉Setup patreon for donations and merchandise store.


Please feel free to contribute to the features above.


Tech Architecture

Backend: Flask
Frontend: ReactJS (SSR, maybe with NextJS)
Mobile Apps(Android and iOS): React Native / (Java and Swift) depending on the experience of devs.
Database: PostgreSQL
CI/CD: Travis
Analytics: Google Analytics
Application Performance Monitoring: AppDynamics
CDN: Cloudflare
Unit Testing: JEST (for JS), unittest (for Python)
Integration Testing: Cyprus (for JS)

Reset progress after reading plan

Hi,
I am a user of the app. First, thanks for the great app, all the features are awesome.
I would like to report a few bugs, which if fixed would be a great help.

I find that the progress immediately on completing a reading plan shows as 0% though the progress circle shows 100%.

  1. There is currently no way to reset this back to unread.
  2. There is no way to restart a reading plan after it has been completed. For example, if I complete the 30 day plan, it shows a tick mark, but no button to start again.

Thanks again.

Not responsive on mac os

Describe the bug
I found that this site is not responsive in mac os. The left side toggle button on mac and che content is not looking good.

To Reproduce
Steps to reproduce the behaviour:

  1. just open the site on mac os, and you will encounter

Expected behaviour
There should be a toggle button at the left for small screen laptopns like mac, which make it attractive and more custamized.

Screenshots

Screenshot 2022-10-06 at 1 33 15 AM

Desktop (please complete the following information):

  • OS: MAC OS
  • Browser CHROME
  • Version mac m1 chip, latest versio

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
I would like to work on this issue. Please assign it to me.

How about a random verse feature?

I don't know how you are coming up with verse of the day. I think it's random. however it changes once in a day.

But another page for showing a random verse on each refresh would be nice to have.

Dark mode button

Is your feature request related to a problem? Please describe.
Here we are following an extended mode for dark buttons and language changes, its UI is also not that attractive.

Describe the solution you'd like
We can add a toggle button for dark mode.

Describe alternatives you've considered

Additional context
Add any other context or screenshots about the feature request here.

Red font color for words by Krishna

Is your feature request related to a problem? Please describe.
No. Just a feature request to add color to the words spoken by Lord Krishna.

Describe the solution you'd like
Adding red color will make words spoken by Lord Krishna easily identifiable.

Describe alternatives you've considered
Maintain status quo / Implement this feature in V. 2 : )

Additional context
None.

xxx

Hello!

How about adding color to the words of Lord Krishna... as the bible adds red color to the words of Jesus? This will make the words of Lord Krishna easily identifiable.

Thanks!

Development Environment not running on windows

What:

Not able to run project locally on windows, Followed the development guide mentioned at - https://github.com/gita/BhagavadGita#developing-locally

Why:

Throws 'foreman' is not recognized as an internal or external command, operable program or batch file. while issuing the command foreman start -f local to start the server.

Expected:

Local development server should run by issuing the command - foreman start -f local

Python version: 3.7.2
OS Name: Microsoft Windows 10 Enterprise
OS Version: N/A Build 17134

Scroll to top icon is not clickable in ios safari

What

  1. Clicking scroll-to-top icon is not scrolling the page in ios safari browser, however the same functionality is working in chrome on ios.

  2. The scroll-to-top icon is not getting clicked if the same is getting overlapped with any clickable content.

Expected

  1. Clicking scroll-to-top icon should work across the browser.
  2. The scroll-to-top icon should be always on top with greater z-index to make it clickable in case of overlapping.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.