Initial monorepo scaffold for Duoc Thu RAG medical chatbot

This commit is contained in:
2026-07-30 20:38:34 +07:00
commit 9bad1f61ea
91 changed files with 740 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
# ai-service
Python/FastAPI. RAG orchestration: embed query -> vector search in Qdrant ->
build grounded prompt -> call OpenAI chat completion -> return answer +
citations. Stateless — does not own chat history itself.
View File
+10
View File
@@ -0,0 +1,10 @@
[project]
name = "ai-service"
version = "0.0.0"
description = "RAG orchestration + OpenAI calls for the Duoc Thu medical chatbot"
requires-python = ">=3.11"
dependencies = []
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
View File
View File
View File
+5
View File
@@ -0,0 +1,5 @@
# api-gateway
NestJS. Single public entry point: request routing, JWT validation, rate
limiting. Routes to `auth-service`, `user-service`, `chat-service` over
internal REST. Frontend and clients only ever talk to this service.
+5
View File
@@ -0,0 +1,5 @@
{
"name": "@duoc-thu/api-gateway",
"private": true,
"version": "0.0.0"
}
+4
View File
@@ -0,0 +1,4 @@
# auth-service
NestJS. User signup/login, password hashing, JWT issuance/refresh. Owns the
users/credentials table in Postgres. No dependency on other services.
+5
View File
@@ -0,0 +1,5 @@
{
"name": "@duoc-thu/auth-service",
"private": true,
"version": "0.0.0"
}
+5
View File
@@ -0,0 +1,5 @@
# chat-service
NestJS. Chat session lifecycle and message history persistence (Postgres).
Calls `ai-service` synchronously per user message to get the assistant reply,
then persists both turns.
+5
View File
@@ -0,0 +1,5 @@
{
"name": "@duoc-thu/chat-service",
"private": true,
"version": "0.0.0"
}
View File
+4
View File
@@ -0,0 +1,4 @@
# mobile
Reserved for a future mobile app (React Native/Flutter, TBD). Not built yet —
placeholder only so the monorepo layout doesn't need restructuring later.
+4
View File
@@ -0,0 +1,4 @@
# user-service
NestJS. Profile data, preferences (language, saved drugs), account settings.
Owns profile tables in Postgres, called by the gateway.
+5
View File
@@ -0,0 +1,5 @@
{
"name": "@duoc-thu/user-service",
"private": true,
"version": "0.0.0"
}
+4
View File
@@ -0,0 +1,4 @@
# web
Next.js frontend. Chat UI, auth pages, citation/disclaimer rendering, session
history. Talks only to `api-gateway` — never calls internal services directly.
+5
View File
@@ -0,0 +1,5 @@
{
"name": "@duoc-thu/web",
"private": true,
"version": "0.0.0"
}