Alexandria is a document management and knowledge extraction platform. Users upload documents, e.g., research papers, reports, manuals, meeting notes, and the system automatically organizes, tags, and summarizes them. Users get a concise summary and can ask questions about their documents, instead of having to read through a 40-page report to find what they need.
The core workflow is: Upload a document, get an auto-generated summary with extracted key entities, browse and search your knowledge base, and optionally query the GenAI for specific answers concerning your uploaded content.
Alexandria consists of three main subsystems orchestrated via Docker Compose and Traefik:
- Client: A React SPA serving as the web interface.
- Server: A Spring Boot application handling core logic, user management, and the PostgreSQL database.
- GenAI: A Python/FastAPI service using LangChain to extract entities and summarize uploaded documents.
All services are accessed through Traefik as the reverse proxy. See docs/traefik.md for architecture, routing, and configuration details.
Quick reference:
| URL | Service |
|---|---|
| http://localhost/ | Client |
| http://localhost/api/v1/... | Spring API |
| http://localhost/swagger-ui/ | Spring API documentation |
| http://localhost/genai/docs | GenAI API documentation |
| http://localhost/auth/ | Keycloak |
- Azure VM (Terraform + Ansible): Provisioning details live under
infra/azure/README.md. - Kubernetes (Helm): Cluster deployment and troubleshooting details live under
infra/k8s/README.md.
This repository uses pre-commit hooks to enforce code quality, formatting, and OpenAPI spec validity. Install pre-commit and run pre-commit install after cloning.
On every git commit, these checks run automatically. For a full list of enforced hooks and their configurations, refer to .pre-commit-config.yaml.
To run the full hook set manually:
pre-commit run --all-files
Our docker-compose.yml includes both pre-built image references and local build contexts. You can choose to pull images for instant startup or build them locally.
Pull and Run (Fastest):
docker compose pull && docker compose up -d- Open http://localhost/ to view the site.
Build and Run (For Development):
To build the images from your local source: docker compose up --build --force-recreate
For local development, docker compose up works out of the box; safe defaults are embedded in docker-compose.yml. For production or CI, copy .env.example to .env and set the values as needed.
- Make sure to remove all containers and docker volumes if you change to a local .env file. Otherwise, e.g., the postgres service will use the old password, leading to failed connections on the server side. This can be achieved by running
docker compose rm <container>anddocker volume rm <volume>.
Spring Boot application handling the core server logic and database.
For local server development, see services/spring/README.md.
React SPA serving as the web client.
For local client development, see services/client/README.md.
Python/FastAPI service using LangChain to extract entities and summarize documents.
For local Python dev, see services/genai/README.md.