first implementation
This commit is contained in:
58
README.md
Normal file
58
README.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# AI Teacher — Neurosurgeon RAG Learning Platform
|
||||
|
||||
A web application for neurosurgeons to upload medical textbooks (PDF), have them
|
||||
embedded into a pgvector store, then select from a predefined topic list to receive
|
||||
AI-generated cross-book summaries, and engage in grounded RAG chat.
|
||||
|
||||
## Architecture
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
User["Neurosurgeon (Browser)"]
|
||||
FE["Frontend\nVue.js 3 / Vite\n:5173"]
|
||||
BE["Backend\nSpring Boot 4 / Spring AI\n:8080"]
|
||||
DB["PostgreSQL + pgvector\n(provided)"]
|
||||
LLM["LLM Provider\n(OpenAI / configurable)"]
|
||||
|
||||
User -->|HTTP| FE
|
||||
FE -->|REST /api/v1/...| BE
|
||||
BE -->|JDBC / pgvector| DB
|
||||
BE -->|Embedding + Chat API| LLM
|
||||
```
|
||||
|
||||
## Stack
|
||||
|
||||
- **Backend**: Spring Boot 4.0.5 + Spring AI 2.0.0-M4, Java 21, Maven
|
||||
- **Frontend**: Vue.js 3 + Vite + TypeScript + Pinia + Axios
|
||||
- **Database**: PostgreSQL 16 + pgvector extension
|
||||
- **Auth**: HTTP Basic (single shared in-memory user)
|
||||
|
||||
## Quick Start
|
||||
|
||||
See [specs/001-neuro-rag-learning/quickstart.md](specs/001-neuro-rag-learning/quickstart.md) for full instructions.
|
||||
|
||||
### Local Dev
|
||||
|
||||
```bash
|
||||
# Start the database
|
||||
docker compose up -d
|
||||
|
||||
# Backend
|
||||
cd backend
|
||||
mvn spring-boot:run
|
||||
|
||||
# Frontend
|
||||
cd frontend
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Environment Variables
|
||||
|
||||
| Variable | Required | Description |
|
||||
|----------|----------|-------------|
|
||||
| `OPENAI_API_KEY` | Yes | OpenAI API key for embeddings and chat |
|
||||
| `APP_PASSWORD` | Yes | Shared password for HTTP Basic auth |
|
||||
| `DB_URL` | Yes | JDBC URL, e.g. `jdbc:postgresql://localhost:5432/aiteacher` |
|
||||
| `DB_USERNAME` | Yes | Database username |
|
||||
| `DB_PASSWORD` | Yes | Database password |
|
||||
Reference in New Issue
Block a user