Skip to content

Adelkazzaz/MiniRag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mini RAG

Overview

Mini RAG From A to Z is a FastAPI-based project that processes and manages project data. It includes functionalities for uploading files, processing file content into chunks, and storing these chunks in a MongoDB database.

Features

  • Upload files to specific projects
  • Validate file types and sizes
  • Process file content into manageable chunks
  • Store project and chunk data in MongoDB
  • Retrieve and manage project data

Project Structure

file:

## Project Structure
miniRag/
├── docker/
│   ├── .gitignore
│   └── docker-compose.yml
├── src/
│   ├── assets/
│   │   ├── .gitignore
│   │   ├── .gitkeep
│   │   └── adel.txt
│   ├── controllers/
│   │   ├── BaseController.py
│   │   ├── DataController.py
│   │   ├── ProcessController.py
│   │   ├── ProjectController.py
│   │   └── __init__.py
│   ├── helpers/
│   │   ├── __init__.py
│   │   └── config.py
│   ├── models/
│   │   ├── BaseDataModel.py
│   │   ├── ChunkModel.py
│   │   ├── ProjectModel.py
│   │   ├── __init__.py
│   │   ├── db_schemas/
│   │   │   ├── __init__.py
│   │   │   ├── data_chunk.py
│   │   │   └── project.py
│   │   ├── enums/
│   │   │   ├── DataBaseEnum.py
│   │   │   ├── ProcessingEnum.py
│   │   │   ├── ResponseEnum.py
│   │   │   └── __init__.py
│   ├── routes/
│   │   ├── base.py
│   │   ├── data.py
│   │   ├── schemas/
│   │   │   ├── __init__.py
│   │   │   └── data_schema.py
│   │   └── __init__.py
│   ├── .gitignore
│   ├── .gitkeep
│   ├── env.txt
│   ├── error.txt
│   ├── main.py
│   ├── requirements.txt
│   └── run.sh
├── LICENSE
└── 
README.md

This structure provides an overview of the project's organization, making it easier for contributors and users to navigate the codebase. This structure provides an overview of the project's organization, making it easier for contributors and users to navigate the codebase.

Getting Started

Prerequisites

  • Python 3.8+
  • Docker
  • MongoDB

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/miniRag.git
    cd miniRag
  2. Create a virtual environment and activate it:

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install the dependencies:

    pip install -r src/requirements.txt
  4. Set up environment variables:

    cp src/env.txt .env
    # Edit .env file with your configuration
  5. Start the MongoDB service using Docker:

    cd docker
    cp env.txt .env
    docker-compose up -d
  • And Update .env file with your credentials

Running the Application

  1. Run the FastAPI application:

    cd src
    ./run.sh
  2. Access the application at http://localhost:5000.

API Endpoints

  • Home: GET /api/v1/
  • Upload Data: POST /api/v1/data/upload/{project_id}
  • Process Data: POST /api/v1/data/process/{project_id}

Configuration

The application configuration is managed via environment variables defined in the .env file. Key settings include:

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any changes.

License

This project is licensed under the terms specified in the LICENSE file.

Acknowledgements

Special thanks to all contributors and open-source projects that made this project possible.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published