Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created a workflow for both backend and frontend which can be easily extendable in the future #6

Merged
merged 8 commits into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: FastAPI CI
on: [push, pull_request]

jobs:
test:
FastApi-backend:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -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
95 changes: 67 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Loading