https://github.com/akshar-raaj/ramayanquiz
Drives backend for RamayanQuiz.com
https://github.com/akshar-raaj/ramayanquiz
api mongodb postgresql python rabbitmq
Last synced: 2 months ago
JSON representation
Drives backend for RamayanQuiz.com
- Host: GitHub
- URL: https://github.com/akshar-raaj/ramayanquiz
- Owner: akshar-raaj
- Created: 2024-08-23T09:07:38.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-05-15T03:47:08.000Z (about 1 year ago)
- Last Synced: 2025-08-22T21:07:36.735Z (10 months ago)
- Topics: api, mongodb, postgresql, python, rabbitmq
- Language: Python
- Homepage: https://ramayanquiz.com
- Size: 127 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Overview
[](https://github.com/akshar-raaj/ramayanquiz/actions/workflows/linting.yml) [](https://github.com/akshar-raaj/ramayanquiz/actions/workflows/unit_tests.yml) [](https://github.com/akshar-raaj/ramayanquiz/actions/workflows/code_coverage.yml)
An application at the intersection of my 3 interests:
- Software Engineering
- Quizzing
- Ramacharitamanas(रामचरितमानस)
This application drives [api.ramayanquiz.com](https://api.ramayanquiz.com/_health). See [API Docs](https://api.ramayanquiz.com/docs).
## Tech Stack
 





| Category | Option |
|----|-----|
| Programming Language | Python, a mature language enabling Rapid Application Development. Let's talk about Duck Typing! |
| API Framework | FastAPI, a modern and performant API framework |
| Transactional Database | PostgreSQL, battle-tested relational database |
| Standby Database | MongoDB, a document database, allows RAD at the expense of data integrity and guarantees |
| Message Broker | RabbitMQ, flexible message broker with more capabilities than a simple message queue |
| Search Engine | Elasticsearch, a full-text search engine with built-in support for stop-words removal, stemming, lemmatization, synonym search, similarity and more |
| Workflow Management | Airflow |
| SQL Toolkit | SQLAlchemy |
| Unit Testing | Pytest, simple and extensible testing framework |
| CI/CD | Github Action, allows CI and CD. Simpler than Jenkins |
| OpenAI | OpenAI API for translating between different languages, ChatGPT! |
## Setup
Ensure the relevant data stores exist. We need the following:
- PostgreSQL
- MongoDB
- RabbitMQ
The following Docker commands should help you setup these data stores if they don't already exist.
docker container run --name ramayanquiz-postgres -p 5432:5432 --volume ramayanquiz-postgres:/var/lib/postgresql/data -d postgres
docker container run --name ramayanquiz-mongo -p 27017:27017 --volume ramayanquiz-mongo:/data/db -d mongo
docker run --name ramayanquiz-rabbitmq -p 5672:5672 -p 15672:15672 -v ramayanquiz-rabbitmq:/var/lib/rabbitmq -d rabbitmq:3.13-management
Ensure to create a `.env` file with appropriate values. Use `.env.example` for reference.
Start the web application container.
docker run -d --name ramayanquiz -p 8000:8000 -v .:/app ramayanquiz
Ensure the container is running properly. Check http://localhost:8000/docs.
## Feature List
- Database tables for entities - Done
- API to create questions - Done
- Add questions through csv upload - Done
- Secure the API - Done
- Persist user answers to localstorage - Done
- User answer report:
- Pie chart: Unattempted, attempted
- Pie chart: Correct, Incorrect - Done
- Bar chart: Correct, incorrect for difficulty levels - Done
- Bar chart: Correct, incorrect for tags
- Stacked Bar chart: Total, correct, incorrect for difficulty levels
- Share report on Linkedin, Twitter and Facebook
- Hindi translation - Done
- Allow users to upvote or downvote a question
- Allow users to contribute a question
- Before contributing, search if a similar question exists
- Give an information icon in front of each question. This gives context about this question.
## More
Along with PostgreSQL, we will also use MongoDB. This is only for demonstration purpose to understand which things are easy/difficult in PostgreSQL vs MongoDB.
Compare Elasticsearch with Postgres full text search.
Compare Redis with memcache and see if Redis in-built data structures provide an advantage compared to storing everything as JSON dump.
Introduce an Analytical database to perform analytical queries which can generate reports.
Implement websocket so that any new question added starts showing up immediately.
Add ML to predict the kanda and difficulty for a question
Implement suggestions and question recommendations based on earlier questions attempted.
Mobile Application
Add integration tests, end to end tests including database calls