Added AI route and explanation authored by Simon Frank's avatar Simon Frank
# `19squared` - Just more than 360
**This wiki serves as a central repository for all information about deployment, configuration, architecture, and operational procedures of 19squared.**
......@@ -68,7 +67,7 @@ This document outlines the technologies used to build this project.
* **Node.js/npm:** Used to install all JavaScript dependencies (https://nodejs.org/en).
* **Python/pip:** Used to install all Python dependencies and as the programming language for the backend (https://www.python.org/).
* **Flask:** Used as the backend framework (https://palletsprojects.com/p/flask/).
* FastAPI: An async backend Python framework (https://fastapi.tiangolo.com/).
* **FastAPI**: An async backend Python framework (https://fastapi.tiangolo.com/).
### AI-Servers (optional)
......@@ -77,21 +76,35 @@ This document outlines the technologies used to build this project.
### Database
* **PostgreSQL:** Used as the database management system (https://www.postgresql.org/).
* MinIO: Object Storage to store assets (https://minio-docs.tf.fo/).
* **MinIO**: Object Storage to store assets (https://minio-docs.tf.fo/).
### Infrastructure
* **Docker:** Used to containerize all services and make the application deployable in a stable environment (https://www.docker.com/).
* **Nginx:** Used as the web server that delivers the required files to the user's web browser (https://www.f5.com/go/product/welcome-to-nginx).
![19squared_architecture.png](uploads/51b01ae62d2b92f65fe6bbcfb9f51e80/19squared_architecture.png){width=1417 height=805}
![19squared_architecture.png](uploads/51b01ae62d2b92f65fe6bbcfb9f51e80/19squared_architecture.png){width="1417" height="805"}
## Code Structure
```
🌱 19squared
├── 📁 src
│ ├── 📁 app
│ ├── 📁 api (FastAPI)
│ │ ├── 📁 ai (AI-Integration)
│ │ │ ├── 📁 agents (Supervisor, Interview)
│ │ │ ├── 📁 memory (Persistance Adapters)
│ │ │ ├── 📁 models (Implementation of LLMs)
│ │ │ ├── 📁 schemas
│ │ │ ├── 📁 services
│ │ │ ├── 📁 tools (AI-Tools)
│ │ │ └── 📁 utils
│ │ ├── 📁 auth
│ │ ├── 📁 core
│ │ ├── 📁 models (DB Models)
│ │ └── 📁 v1
│ │ └── 📁 endpoints (FastAPI Routes)
│ ├── 📁 app (Flask)
│ │ ├── 📁 Uploaded_Media
│ │ ├── 📁 auth
│ │ ├── 📁 base
......@@ -135,11 +148,22 @@ Before running the project, create a `.env` file from the `.env.template` to set
|----------------|-------------|-----:|
| `19sq-nginx` | Nginx Web Server | `5001` |
| `19sq-flask` | Flask Application | \- |
| `19sq-mariadb` | MariaDB Database | \- |
| `19sq-fastapi` | FastAPI Backend | \- |
| `19sq-postgres` | Postgres Database | \- |
| `19sq-ladsh` | Learning Analytics Dashboard | `2000` |
| `19sq-minio` | Object Storage | `80` |
We integrated an optional AI assistant. The bundles of this assistant are excluded by default. You can opt in by setting `AI-INTEGRATION=1` in your `.env` file and running `docker compose up --profile ai -d --build`. This will add the AI routes and dependencies to the application and start additional Docker containers:
| Container Name | Description | Port |
|----------------|-------------|-----:|
| `19sq-searxng` | SearXNG Meta Search Engine | `8080` |
| `19sq-valkey` | SearXNG related service | \- |
## Routing Traffic
> This setup will change, as we have added Caddy for a more straightforward setup.
:arrows_counterclockwise: Reverse Proxy `80/443` \>\> :desktop: 19sq-nginx `5001` \>\>_(via `frontend` network)_ :snake: 19sq-flask \>\>_(via `backend` network)_ :floppy_disk: 19sq-mariadb
To make your application accessible, you'll want to route external traffic to the `19sq-nginx` container on port `5001`. [Nginx Proxy Manager](https://nginxproxymanager.com/) might simplify the setup of a reverse proxy. It provides an interface for:
......
......