A Go microservice that ingests documents (PDF, TXT), extracts their text, and utilizes Large Language Models (LLMs) via OpenRouter to generate summaries and extract key metadata.
Ensure you have the following installed on your local machine:
- Docker & Docker Compose
- Go (for local development)
-
Clone the repository:
git clone <repo-url> cd docai
-
Environment Setup: Copy the example environment file (.env.example):
cp .env.example .env
Note: Update
OPENROUTER_API_KEYin.envif you wish to test actual LLM analysis.
We use a Makefile to orchestrate workflows.
make start-appThis runs migrations, creates a minio bucket and runs the server
The server will start at http://localhost:8080.
For a list of all available commands, run:
make helpThe API is documented using OpenAPI 3.0.
- Swagger UI: Accessible at
http://localhost:8080/swagger/when the server is running. - Spec File: Located at
docs/swagger.yaml.
The project includes end-to-end integration tests.
make testCI runs make test-ci on every push using .github/workflows/ci.yml. It spins up Postgres and MinIO containers for tests.
Tip
Secrets Configuration: To fully enable integration tests, add your .env variables (e.g., OPEN_ROUTER_KEY) to GitHub Secrets. The workflow automatically populates the runner's .env file from these secrets.