update ignore files

This commit is contained in:
Adrien
2026-04-03 20:33:04 +02:00
parent bcc80d250b
commit fc5b22fba1
1844 changed files with 100 additions and 1387221 deletions

46
backend/.gitignore vendored Normal file
View File

@@ -0,0 +1,46 @@
# Maven
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
# IntelliJ IDEA
.idea/
*.iws
*.iml
*.ipr
# Eclipse
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
# VS Code
.vscode/
# NetBeans
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
# Logs
*.log
logs/
# OS
.DS_Store
Thumbs.db
# Environment
.env
.env.local
*.env

View File

@@ -6,7 +6,6 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.time.Instant;
import java.util.List;
import java.util.Map;
import java.util.UUID;

View File

@@ -1,52 +0,0 @@
spring:
datasource:
url: ${DB_URL:jdbc:postgresql://master:30432/aiteacher}
username: ${DB_USERNAME:user}
password: ${DB_PASSWORD:password}
driver-class-name: org.postgresql.Driver
jpa:
hibernate:
ddl-auto: false
show-sql: false
properties:
hibernate:
format_sql: false
dialect: org.hibernate.dialect.PostgreSQLDialect
open-in-view: false
flyway:
enabled: true
locations: classpath:db/migration
ai:
vectorstore:
pgvector:
dimensions: 1536
distance-type: COSINE_DISTANCE
index-type: HNSW
initialize-schema: true
openai:
api-key: ${OPENAI_API_KEY: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}
chat:
options:
model: gpt-4o-mini
embedding:
options:
model: text-embedding-3-small
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB
task:
execution:
pool:
core-size: 4
max-size: 8
queue-capacity: 50
app:
auth:
password: ${APP_PASSWORD:changeme}

View File

@@ -1,33 +0,0 @@
-- ============================================================
-- V1: Initial schema
-- Spring AI manages the vector_store table separately.
-- ============================================================
CREATE TABLE IF NOT EXISTS book (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
title VARCHAR(500) NOT NULL,
file_name VARCHAR(500) NOT NULL,
file_size_bytes BIGINT NOT NULL,
page_count INT,
status VARCHAR(20) NOT NULL DEFAULT 'PENDING',
error_message TEXT,
uploaded_at TIMESTAMPTZ NOT NULL DEFAULT now(),
processed_at TIMESTAMPTZ
);
CREATE TABLE IF NOT EXISTS chat_session (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
topic_id VARCHAR(100),
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE TABLE IF NOT EXISTS message (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
session_id UUID NOT NULL REFERENCES chat_session(id) ON DELETE CASCADE,
role VARCHAR(10) NOT NULL,
content TEXT NOT NULL,
sources JSONB,
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX IF NOT EXISTS idx_message_session ON message(session_id, created_at);

View File

@@ -1,17 +0,0 @@
-- ============================================================
-- V2: pgvector extension + Spring AI vector_store table
-- Replaces Spring AI's initialize-schema=true (which requires
-- CREATE SCHEMA privilege and fails on restricted users).
-- ============================================================
CREATE EXTENSION IF NOT EXISTS vector;
CREATE TABLE IF NOT EXISTS vector_store (
id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
content text,
metadata json,
embedding vector(1536)
);
CREATE INDEX IF NOT EXISTS spring_ai_vector_index
ON vector_store USING hnsw (embedding vector_cosine_ops);

View File

@@ -1,48 +0,0 @@
CREATE TABLE topic (
id VARCHAR(100) PRIMARY KEY,
name VARCHAR(255) NOT NULL,
description TEXT NOT NULL,
category VARCHAR(100) NOT NULL
);
INSERT INTO topic (id, name, description, category) VALUES
('intracranial-aneurysms',
'Intracranial Aneurysms',
'Diagnosis, classification, endovascular coiling, flow diversion, and surgical clipping of intracranial aneurysms.',
'Neurointervention'),
('arteriovenous-malformations',
'Arteriovenous Malformations',
'Pathophysiology, Spetzler-Martin grading, embolization strategies, and multimodality treatment of cerebral AVMs.',
'Neurointervention'),
('dural-arteriovenous-fistula',
'Dural Arteriovenous Fistula (DAVF)',
'Classification (Borden/Cognard), clinical presentation, transarterial and transvenous embolization of DAVFs.',
'Neurointervention'),
('acute-ischemic-stroke',
'Acute Ischemic Stroke (AIS)',
'IV thrombolysis, mechanical thrombectomy, patient selection, access strategies, and outcomes for acute ischemic stroke.',
'Neurointervention'),
('carotid-vertebral-artery-disease',
'Carotid & Vertebral Artery Disease',
'Carotid artery stenting, angioplasty, dissection management, and vertebral artery interventions.',
'Neurointervention'),
('spinal-vascular-malformations',
'Spinal Vascular Malformations',
'Classification, angiographic evaluation, and endovascular treatment of spinal dural and perimedullary fistulas and AVMs.',
'Neurointervention'),
('tumor-embolization',
'Tumor Embolization',
'Pre-operative embolization techniques, embolic agents, and complication management for hypervascular tumors.',
'Neurointervention'),
('cerebral-venous-disease',
'Cerebral Venous Disease',
'Cerebral venous sinus thrombosis, venous angioplasty, stenting for intracranial hypertension, and dural sinus interventions.',
'Neurointervention'),
('pediatric-neurointervention',
'Pediatric Neurointervention',
'Specific considerations, techniques, and outcomes for endovascular procedures in the pediatric population.',
'Neurointervention'),
('free-form',
'Free-form Chat',
'Open-ended questions across any neurointervention topic.',
'General');

View File

@@ -1,56 +0,0 @@
[
{
"id": "intracranial-aneurysms",
"name": "Intracranial Aneurysms",
"description": "Diagnosis, classification, endovascular coiling, flow diversion, and surgical clipping of intracranial aneurysms.",
"category": "Neurointervention"
},
{
"id": "arteriovenous-malformations",
"name": "Arteriovenous Malformations",
"description": "Pathophysiology, Spetzler-Martin grading, embolization strategies, and multimodality treatment of cerebral AVMs.",
"category": "Neurointervention"
},
{
"id": "dural-arteriovenous-fistula",
"name": "Dural Arteriovenous Fistula (DAVF)",
"description": "Classification (Borden/Cognard), clinical presentation, transarterial and transvenous embolization of DAVFs.",
"category": "Neurointervention"
},
{
"id": "acute-ischemic-stroke",
"name": "Acute Ischemic Stroke (AIS)",
"description": "IV thrombolysis, mechanical thrombectomy, patient selection, access strategies, and outcomes for acute ischemic stroke.",
"category": "Neurointervention"
},
{
"id": "carotid-vertebral-artery-disease",
"name": "Carotid & Vertebral Artery Disease",
"description": "Carotid artery stenting, angioplasty, dissection management, and vertebral artery interventions.",
"category": "Neurointervention"
},
{
"id": "spinal-vascular-malformations",
"name": "Spinal Vascular Malformations",
"description": "Classification, angiographic evaluation, and endovascular treatment of spinal dural and perimedullary fistulas and AVMs.",
"category": "Neurointervention"
},
{
"id": "tumor-embolization",
"name": "Tumor Embolization",
"description": "Pre-operative embolization techniques, embolic agents, and complication management for hypervascular tumors.",
"category": "Neurointervention"
},
{
"id": "cerebral-venous-disease",
"name": "Cerebral Venous Disease",
"description": "Cerebral venous sinus thrombosis, venous angioplasty, stenting for intracranial hypertension, and dural sinus interventions.",
"category": "Neurointervention"
},
{
"id": "pediatric-neurointervention",
"name": "Pediatric Neurointervention",
"description": "Specific considerations, techniques, and outcomes for endovascular procedures in the pediatric population.",
"category": "Neurointervention"
}
]

View File

@@ -1,3 +0,0 @@
artifactId=ai-teacher-backend
groupId=com.aiteacher
version=0.0.1-SNAPSHOT

View File

@@ -1,25 +0,0 @@
com/aiteacher/AiTeacherApplication.class
com/aiteacher/book/BookEmbeddingService.class
com/aiteacher/topic/TopicController.class
com/aiteacher/topic/TopicSummaryService.class
com/aiteacher/book/BookRepository.class
com/aiteacher/chat/ChatSession.class
com/aiteacher/config/GlobalExceptionHandler.class
com/aiteacher/topic/Topic.class
com/aiteacher/topic/TopicSummaryResponse$SourceReference.class
com/aiteacher/chat/ChatService.class
com/aiteacher/chat/MessageRole.class
com/aiteacher/chat/ChatController.class
com/aiteacher/chat/Message.class
com/aiteacher/book/NoKnowledgeSourceException.class
com/aiteacher/config/AiConfig.class
com/aiteacher/book/BookService.class
com/aiteacher/book/BookController.class
com/aiteacher/topic/TopicConfigLoader.class
com/aiteacher/config/SecurityConfig.class
com/aiteacher/topic/TopicSummaryResponse.class
com/aiteacher/chat/ChatSessionRepository.class
com/aiteacher/book/BookStatus.class
com/aiteacher/book/Book.class
com/aiteacher/topic/TopicConfigLoader$1.class
com/aiteacher/chat/MessageRepository.class

View File

@@ -1,24 +0,0 @@
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/AiTeacherApplication.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/book/Book.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/book/BookController.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/book/BookEmbeddingService.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/book/BookRepository.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/book/BookService.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/book/BookStatus.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/book/NoKnowledgeSourceException.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/chat/ChatController.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/chat/ChatService.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/chat/ChatSession.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/chat/ChatSessionRepository.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/chat/Message.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/chat/MessageRepository.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/chat/MessageRole.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/config/AiConfig.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/config/GlobalExceptionHandler.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/config/SecurityConfig.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/topic/Topic.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/topic/TopicConfigLoader.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/topic/TopicController.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/topic/TopicRepository.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/topic/TopicSummaryResponse.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/topic/TopicSummaryService.java