docs: fix Next.js 14→15 references, add libs READMEs
- Fix remaining "Next.js 14" references in: - docs/architecture/IMPLEMENTATION_QUICK_REFERENCE.md - docs/load-testing/K6_LOAD_TESTING_GUIDE.md - Create README.md for libs/ai-services/ (FastAPI AVM, moderation, NLP) - Create README.md for libs/mcp-servers/ (MCP tool server library) - Note: CLAUDE.md, README.md, and docs/architecture.md were already updated in a prior pass Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
## 🎯 Key Findings at a Glance
|
## 🎯 Key Findings at a Glance
|
||||||
|
|
||||||
### Current State
|
### Current State
|
||||||
- ✅ **Next.js 14** with App Router (well-structured)
|
- ✅ **Next.js 15** with App Router (well-structured)
|
||||||
- ✅ **React 18** + TypeScript (type-safe)
|
- ✅ **React 18** + TypeScript (type-safe)
|
||||||
- ✅ **Tailwind CSS** with dark mode support (HSL-based theme)
|
- ✅ **Tailwind CSS** with dark mode support (HSL-based theme)
|
||||||
- ✅ **Good component library** (~35 components)
|
- ✅ **Good component library** (~35 components)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
```
|
```
|
||||||
goodgo-platform/
|
goodgo-platform/
|
||||||
├── apps/api # NestJS backend (port 3001)
|
├── apps/api # NestJS backend (port 3001)
|
||||||
├── apps/web # Next.js 14 frontend (port 3000)
|
├── apps/web # Next.js 15 frontend (port 3000)
|
||||||
├── libs/mcp-servers # MCP tool server library
|
├── libs/mcp-servers # MCP tool server library
|
||||||
├── prisma/ # Database schema & migrations
|
├── prisma/ # Database schema & migrations
|
||||||
├── e2e/ # Playwright E2E tests (api + web)
|
├── e2e/ # Playwright E2E tests (api + web)
|
||||||
|
|||||||
69
libs/ai-services/README.md
Normal file
69
libs/ai-services/README.md
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
# @goodgo/ai-services
|
||||||
|
|
||||||
|
Python FastAPI AI/ML microservice for the GoodGo Platform.
|
||||||
|
|
||||||
|
## Services
|
||||||
|
|
||||||
|
| Service | Router | Description |
|
||||||
|
|---------|--------|-------------|
|
||||||
|
| **AVM** | `/avm` | Automated Valuation Model — XGBoost-based property price predictions |
|
||||||
|
| **Moderation** | `/moderation` | Content moderation for listings (text + image analysis) |
|
||||||
|
| **NLP** | `/nlp` | Vietnamese NLP — feature extraction, search query understanding |
|
||||||
|
|
||||||
|
## Tech Stack
|
||||||
|
|
||||||
|
- **Python** 3.12+
|
||||||
|
- **FastAPI** 0.115 + Uvicorn
|
||||||
|
- **XGBoost** 2.1 (property valuation model)
|
||||||
|
- **Underthesea** 6.8 (Vietnamese NLP tokenizer)
|
||||||
|
- **Pydantic** 2.9 (request/response schemas)
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Via Docker (recommended — runs as part of the platform stack)
|
||||||
|
docker compose up -d ai-services
|
||||||
|
|
||||||
|
# Standalone
|
||||||
|
cd libs/ai-services
|
||||||
|
pip install -e ".[dev]"
|
||||||
|
uvicorn app.main:app --reload --port 8000
|
||||||
|
```
|
||||||
|
|
||||||
|
## Project Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
libs/ai-services/
|
||||||
|
├── app/
|
||||||
|
│ ├── main.py # FastAPI app entry point
|
||||||
|
│ ├── config.py # Settings (Pydantic BaseSettings)
|
||||||
|
│ ├── middleware.py # CORS, rate limiting, error handling
|
||||||
|
│ ├── models/ # Pydantic request/response schemas
|
||||||
|
│ │ ├── avm.py
|
||||||
|
│ │ ├── moderation.py
|
||||||
|
│ │ └── nlp.py
|
||||||
|
│ ├── routers/ # API route handlers
|
||||||
|
│ │ ├── avm.py
|
||||||
|
│ │ ├── moderation.py
|
||||||
|
│ │ └── nlp.py
|
||||||
|
│ └── services/ # Business logic
|
||||||
|
│ ├── avm_service.py
|
||||||
|
│ ├── moderation_service.py
|
||||||
|
│ └── nlp_service.py
|
||||||
|
├── tests/ # pytest test suite
|
||||||
|
├── Dockerfile # Production container image
|
||||||
|
└── pyproject.toml # Dependencies and config
|
||||||
|
```
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd libs/ai-services
|
||||||
|
pytest
|
||||||
|
```
|
||||||
|
|
||||||
|
## Health Check
|
||||||
|
|
||||||
|
```
|
||||||
|
GET /health → {"status": "ok"}
|
||||||
|
```
|
||||||
54
libs/mcp-servers/README.md
Normal file
54
libs/mcp-servers/README.md
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# @goodgo/mcp-servers
|
||||||
|
|
||||||
|
MCP (Model Context Protocol) tool server library for the GoodGo Platform. Provides structured tools that AI assistants can use to query property data, run analytics, and perform valuations.
|
||||||
|
|
||||||
|
## Tool Servers
|
||||||
|
|
||||||
|
| Server | Path | Description |
|
||||||
|
|--------|------|-------------|
|
||||||
|
| **Property Search** | `property-search/` | Geo search, full-text search, filter by type/price/area |
|
||||||
|
| **Market Analytics** | `market-analytics/` | Price trends, heatmaps, district comparisons |
|
||||||
|
| **Valuation** | `valuation/` | AVM property valuation requests |
|
||||||
|
|
||||||
|
## Tech Stack
|
||||||
|
|
||||||
|
- **TypeScript** 6+
|
||||||
|
- **@modelcontextprotocol/sdk** 1.12 (MCP protocol implementation)
|
||||||
|
- **Zod** 3.24 (schema validation)
|
||||||
|
- **NestJS** integration module (optional peer dependency)
|
||||||
|
|
||||||
|
## Project Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
libs/mcp-servers/
|
||||||
|
├── src/
|
||||||
|
│ ├── index.ts # Public API exports
|
||||||
|
│ ├── property-search/ # Property search tool server
|
||||||
|
│ ├── market-analytics/ # Market analytics tool server
|
||||||
|
│ ├── valuation/ # AVM valuation tool server
|
||||||
|
│ ├── nestjs/ # NestJS module integration
|
||||||
|
│ ├── shared/ # Shared types and utilities
|
||||||
|
│ └── __tests__/ # Test suite
|
||||||
|
├── package.json
|
||||||
|
└── tsconfig.json
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { PropertySearchServer, MarketAnalyticsServer } from '@goodgo/mcp-servers';
|
||||||
|
```
|
||||||
|
|
||||||
|
The MCP endpoints are exposed via the API's `apps/api/src/modules/mcp/` module.
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm --filter @goodgo/mcp-servers build
|
||||||
|
```
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm --filter @goodgo/mcp-servers test
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user