Files
lovdata-chat/README-setup.md
2026-01-18 19:07:20 +01:00

46 lines
1.2 KiB
Markdown

# Lovdata Chat Development Environment
This setup creates a container-per-visitor architecture for the Norwegian legal research chat interface.
## Quick Start
1. **Set up environment variables:**
```bash
cp .env.example .env
# Edit .env with your API keys
```
2. **Start the services:**
```bash
docker-compose up --build
```
3. **Create a session:**
```bash
curl http://localhost/api/sessions -X POST
```
4. **Access the chat interface:**
Open the returned URL in your browser
## Architecture
- **session-manager**: FastAPI service managing container lifecycles
- **lovdata-mcp**: Placeholder for Norwegian legal research MCP server
- **caddy**: Reverse proxy for routing requests to session containers
## Development Notes
- Sessions auto-cleanup after 60 minutes of inactivity
- Limited to 3 concurrent sessions for workstation development
- Each session gets 4GB RAM and 1 CPU core
- Session data persists in ./sessions/ directory
## API Endpoints
- `POST /api/sessions` - Create new session
- `GET /api/sessions` - List all sessions
- `GET /api/sessions/{id}` - Get session info
- `DELETE /api/sessions/{id}` - Delete session
- `POST /api/cleanup` - Manual cleanup
- `GET /api/health` - Health check