Initial monorepo scaffold for Duoc Thu RAG medical chatbot
This commit is contained in:
@@ -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.
|
||||
@@ -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"
|
||||
@@ -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.
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "@duoc-thu/api-gateway",
|
||||
"private": true,
|
||||
"version": "0.0.0"
|
||||
}
|
||||
@@ -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.
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "@duoc-thu/auth-service",
|
||||
"private": true,
|
||||
"version": "0.0.0"
|
||||
}
|
||||
@@ -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.
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "@duoc-thu/chat-service",
|
||||
"private": true,
|
||||
"version": "0.0.0"
|
||||
}
|
||||
@@ -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.
|
||||
@@ -0,0 +1,4 @@
|
||||
# user-service
|
||||
|
||||
NestJS. Profile data, preferences (language, saved drugs), account settings.
|
||||
Owns profile tables in Postgres, called by the gateway.
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "@duoc-thu/user-service",
|
||||
"private": true,
|
||||
"version": "0.0.0"
|
||||
}
|
||||
@@ -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.
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "@duoc-thu/web",
|
||||
"private": true,
|
||||
"version": "0.0.0"
|
||||
}
|
||||
Reference in New Issue
Block a user