{"id":40381348,"url":"https://github.com/bakrianoo/mini-rag","last_synced_at":"2026-01-20T12:02:57.077Z","repository":{"id":236858070,"uuid":"764102710","full_name":"bakrianoo/mini-rag","owner":"bakrianoo","description":"An Educational Project (step by step) to teach how to build a production-ready app for RAG application.","archived":false,"fork":false,"pushed_at":"2025-08-15T05:41:12.000Z","size":320,"stargazers_count":336,"open_issues_count":16,"forks_count":110,"subscribers_count":6,"default_branch":"tut-017","last_synced_at":"2025-08-15T07:16:26.933Z","etag":null,"topics":["docker","education","fastapi","genai","python","rag"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=Vv6e2Rb1Q6w\u0026list=PLvLvlVqNQGHCUR2p0b8a0QpVjDUg50wQj\u0026pp=gAQBiAQB","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bakrianoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-02-27T13:39:48.000Z","updated_at":"2025-08-15T02:05:32.000Z","dependencies_parsed_at":"2025-08-04T13:19:13.056Z","dependency_job_id":"7b1e4d6d-552e-4daf-b397-0fc28e5a2e98","html_url":"https://github.com/bakrianoo/mini-rag","commit_stats":null,"previous_names":["bakrianoo/mini-rag"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bakrianoo/mini-rag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakrianoo%2Fmini-rag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakrianoo%2Fmini-rag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakrianoo%2Fmini-rag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakrianoo%2Fmini-rag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bakrianoo","download_url":"https://codeload.github.com/bakrianoo/mini-rag/tar.gz/refs/heads/tut-017","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bakrianoo%2Fmini-rag/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28603307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T12:01:53.233Z","status":"ssl_error","status_checked_at":"2026-01-20T12:01:46.545Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","education","fastapi","genai","python","rag"],"created_at":"2026-01-20T12:02:56.991Z","updated_at":"2026-01-20T12:02:57.069Z","avatar_url":"https://github.com/bakrianoo.png","language":"Python","readme":"# mini-rag\n\nThis is a minimal implementation of the RAG model for question answering.\n\n## The Course\n\nThis is an educational project where all of the codes where explained (step by step) via a set of `Arabic` youtube videos. Please check the list:\n\n| # | Title                                    | Link                                                                                                 | Codes                                              |\n|---|------------------------------------------|------------------------------------------------------------------------------------------------------|----------------------------------------------------|\n| 1 | About the Course ماذا ولمـــاذا          | [Video](https://www.youtube.com/watch?v=Vv6e2Rb1Q6w\u0026list=PLvLvlVqNQGHCUR2p0b8a0QpVjDUg50wQj)         | NA                                                 |\n| 2 | What will we build ماذا سنبنى في المشروع | [Video](https://www.youtube.com/watch?v=_l5S5CdxE-Q\u0026list=PLvLvlVqNQGHCUR2p0b8a0QpVjDUg50wQj\u0026index=2) | NA                                                 |\n| 3 | Setup your tools الأدوات الأساسية        | [Video](https://www.youtube.com/watch?v=VSFbkFRAT4w\u0026list=PLvLvlVqNQGHCUR2p0b8a0QpVjDUg50wQj\u0026index=3) | NA                                                 |\n| 4 | Project Architecture                     | [Video](https://www.youtube.com/watch?v=Ei_nBwBbFUQ\u0026list=PLvLvlVqNQGHCUR2p0b8a0QpVjDUg50wQj\u0026index=4) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-001) |\n| 5 | Welcome to FastAPI                       | [Video](https://www.youtube.com/watch?v=cpOuCdzN_Mo\u0026list=PLvLvlVqNQGHCUR2p0b8a0QpVjDUg50wQj\u0026index=5) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-002) |\n| 6 | Nested Routes + Env Values               | [Video](https://www.youtube.com/watch?v=CrR2Bz2Y7Hw\u0026list=PLvLvlVqNQGHCUR2p0b8a0QpVjDUg50wQj\u0026index=6) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-003) |\n| 7 | Uploading a File                         | [Video](https://www.youtube.com/watch?v=5alMKCbFqWs\u0026list=PLvLvlVqNQGHCUR2p0b8a0QpVjDUg50wQj\u0026index=7) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-004) |\n| 8 | File Processing                         | [Video](https://www.youtube.com/watch?v=gQgr2iwtSBw) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-005) |\n| 9 | Docker - MongoDB - Motor                         | [Video](https://www.youtube.com/watch?v=2NOKWm0xJAk) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-006) |\n| 10 | Mongo Schemes and Models                        | [Video](https://www.youtube.com/watch?v=zgcnnMJXXV8) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-007) |\n| 11 | Mongo Indexing                        | [Video](https://www.youtube.com/watch?v=iO8FAmUVcjE) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-008) |\n| 12 | Data Pipeline Enhancements                        | [Video](https://www.youtube.com/watch?v=4x1DuezZBDU) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-008) |\n| 13 | Checkpoint-1                        | [Video](https://www.youtube.com/watch?v=7xIsZkCisPk) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-008) |\n| 14 | LLM Factory                        | [Video](https://www.youtube.com/watch?v=5TKRIFtIQAY) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-008) |\n| 15 | Vector DB Factory                        | [Video](https://www.youtube.com/watch?v=JtS9UkvF_10) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-009) |\n| 16 | Semantic Search                       | [Video](https://www.youtube.com/watch?v=V3swQKokJW8) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-010) |\n| 17 | Augmented Answers                       | [Video](https://www.youtube.com/watch?v=1Wx8BoM5pLU) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-011) |\n| 18 | Checkpoint-1 + Fix Issues                       | [Video](https://youtu.be/6zG4Idxldvg) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-012) |\n| 19 | Ollama Local LLM Server                       | [Video](https://youtu.be/-epZ1hAAtrs) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-012) |\n| 20 | From Mongo to Postgres + SQLAlchemy \u0026 Alembic                       | [Video](https://www.youtube.com/watch?v=BVOq7Ek2Up0) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-013) |\n| 21 | The way to PgVector                       | [Video](https://www.youtube.com/watch?v=g99yq5zlYAE) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-014) |\n| 22 | App Deployments 1/2                       | [Video](https://www.youtube.com/watch?v=7QRPnAbVssg) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-015) |\n| 22 | App Deployments 2/2                       | [Video](https://www.youtube.com/watch?v=qJ5Hdyc4hDc) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-015) |\n| 24 | Celery Workers 1/2                       | [Video](https://www.youtube.com/watch?v=pX-iWWT2TJo) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-016) |\n| 25 | Celery Workers 2/2                       | [Video](https://www.youtube.com/watch?v=SZ5Aznjf8Kc) | [branch](https://github.com/bakrianoo/mini-rag/tree/tut-017) |\n\n\n\n\n## Requirements\n\n- Python 3.10\n\n#### Install Dependencies\n\n```bash\nsudo apt update\nsudo apt install libpq-dev gcc python3-dev\n```\n\n#### Install Python using MiniConda\n\n1) Download and install MiniConda from [here](https://docs.anaconda.com/free/miniconda/#quick-command-line-install)\n2) Create a new environment using the following command:\n```bash\n$ conda create -n mini-rag python=3.10\n```\n3) Activate the environment:\n```bash\n$ conda activate mini-rag\n```\n\n### (Optional) Setup you command line interface for better readability\n\n```bash\nexport PS1=\"\\[\\033[01;32m\\]\\u@\\h:\\w\\n\\[\\033[00m\\]\\$ \"\n```\n\n### (Optional) Run Ollama Local LLM Server using Colab + Ngrok\n\n- Check the [notebook](https://colab.research.google.com/drive/1KNi3-9KtP-k-93T3wRcmRe37mRmGhL9p?usp=sharing) + [Video](https://youtu.be/-epZ1hAAtrs)\n\n## Installation\n\n### Install the required packages\n\n```bash\n$ pip install -r requirements.txt\n```\n\n### Setup the environment variables\n\n```bash\n$ cp .env.example .env\n```\n\n### Run Alembic Migration\n\n```bash\n$ alembic upgrade head\n```\n\nSet your environment variables in the `.env` file. Like `OPENAI_API_KEY` value.\n\n## Run Docker Compose Services\n\n```bash\n$ cd docker\n$ cp .env.example .env\n```\n\n- update `.env` with your credentials\n\n\n\n```bash\n$ cd docker\n$ sudo docker compose up -d\n```\n\n## Access Services\n\n- **FastAPI**: http://localhost:8000\n- **Flower Dashboard**: http://localhost:5555 (admin/password from env)\n- **Grafana**: http://localhost:3000\n- **Prometheus**: http://localhost:9090\n\n## Run the FastAPI server (Development Mode)\n\n```bash\n$ uvicorn main:app --reload --host 0.0.0.0 --port 5000\n```\n\n# Celery (Development Mode)\n\nFor development, you can run Celery services manually instead of using Docker:\n\nTo Run the **Celery worker**, you need to run the following command in a separate terminal:\n\n```bash\n$ python -m celery -A celery_app worker --queues=default,file_processing,data_indexing --loglevel=info\n```\n\nTo run the **Beat scheduler**, you can run the following command in a separate terminal:\n\n```bash\n$ python -m celery -A celery_app beat --loglevel=info\n```\n\nTo Run **Flower Dashboard**, you can run the following command in a separate terminal:\n\n```bash\n$ python -m celery -A celery_app flower --conf=flowerconfig.py\n```\n\n\nopen your browser and go to `http://localhost:5555` to see the dashboard.\n\n## POSTMAN Collection\n\nDownload the POSTMAN collection from [/assets/mini-rag-app.postman_collection.json](/assets/mini-rag-app.postman_collection.json)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbakrianoo%2Fmini-rag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbakrianoo%2Fmini-rag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbakrianoo%2Fmini-rag/lists"}