diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7d5148..3c1f409 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: FastAPI CI on: [push, pull_request] jobs: - test: + FastApi-backend: runs-on: ubuntu-latest steps: @@ -38,3 +38,38 @@ jobs: echo "Health check failed" exit 1 fi + + Vue-frontend: + runs-on: ubuntu-latest + needs: FastApi-backend + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + + - name: Install frontend dependencies + run: | + cd frontend + npm install + + - name: Run frontend development server + run: | + cd frontend + nohup npm run dev > /dev/null 2>&1 & + sleep 20 + + - name: Verify frontend server is running + run: | + response=$(curl -s http://127.0.0.1:9000/2) + sleep 10 + if echo "$response" | grep -q "rag app for small business"; then + echo "Frontend is running and contains 'DOC-INFO'" + else + echo "Frontend did not return expected content" + exit 1 + fi diff --git a/README.md b/README.md index 5c90ccb..d1eabd0 100644 --- a/README.md +++ b/README.md @@ -1,52 +1,91 @@ # RAGGI AI-Oracle -more text will be added soon... +RAGGI AI-Oracle is an application designed to leverage AI for advanced document handling and natural language processing. This repository contains both backend and frontend components to get the application up and running. -# Installation +## Installation -## Backend +### Backend -create a virtual env +1. **Create a virtual environment:** -> python -m venv venv + ```bash + python -m venv venv + ``` -install all packages +2. **Activate the virtual environment:** -> pip install -r requirements.txt + - On Windows: + ```bash + venv\Scripts\activate + ``` + - On macOS/Linux: + ```bash + source venv/bin/activate + ``` -run following command to run the dev server +3. **Install all required packages:** -> fastapi dev + ```bash + pip install -r requirements.txt + ``` -## Frontend +4. **Run the development server:** -navigate to **frontend/raggi** folder and following command to install all packages needed: + ```bash + fastapi dev + ``` -> npm install +### Frontend -then run following command to run the dev server: +1. **Navigate to the frontend directory:** -> quasar dev + ```bash + cd frontend/raggi + ``` -# Settings +2. **Install all necessary packages:** -## Environments + ```bash + npm install + ``` -1. add an .env file inside **rag** folder that contains Setting for Langfuse: +3. **Run the development server:** - - SECRET_KEY - - PUBLIC_KEY - - LANGFUSE_HOST + ```bash + npm run dev + ``` -2. add also an .env file in side **frontend/raggi** folder for the setting of the UI: +## Settings - - API="http://ip-adress-of-api:port" +### Environments -# Features +1. **Backend Environment Settings:** -### Backend + Create an `.env` file inside the `rag` folder with the following settings for Langfuse: + + ```env + SECRET_KEY=your_secret_key + PUBLIC_KEY=your_public_key + LANGFUSE_HOST=your_langfuse_host + ``` + +2. **Frontend Environment Settings:** + + Create an `.env` file inside the `frontend/raggi` folder with the following settings for the UI: + + ```env + API=http://ip-address-of-api:port + ``` + + +## Contributing + +Contributions are welcome! Please open an issue or submit a pull request to contribute to the project. + +## License + +This project is licensed under the MIT License. + +## Contact -- [ ] Add a digest worker for emebding documents -- [ ] Extend user permissions -- [ ] Add new documents to db -- [ ] Add meta data to a document +For any questions or inquiries, please contact.