Urban-DDS
Aging Building Identification and Urban Regeneration Decision Support System
Core trick
Region metrics for an address are passed to Gemini, which returns a policy analysis; reports are stored per user behind Google OAuth.
Tags
Description
Aging Building Identification and Urban Regeneration Decision Support System
README excerpt
# Urban-DDS
Urban-DDS는 Next.js App Router 기반의 도시정비 의사결정 지원 시스템입니다.
현재 프론트엔드 대시보드 + 백엔드 API가 같은 프로젝트에 포함되어 있습니다.
## 주요 기능
- Frontend dashboard
- 주소 기반 지역 조회
- 점수 카드(노후도/인프라/시장성/정책적합)
- Gemini 기반 정책 분석 결과 출력
- API routes
- `GET /api/health`
- `GET /api/region/summary?address=...`
- `GET /api/region/metrics?regionCode=...`
- `POST /api/analysis/report` (Google OAuth login required)
- Payload: `{ "regionCode": "...", "regionId": "...", "metrics": { ... } }`
- `regionCode` is the preferred identifier; `regionId` can be sent as a compatibility fallback.
- `POST /api/analysis/document` (`?format=json` for raw JSON)
- `GET /api/analysis/reports` (Google OAuth login required, user-scoped list, `?limit=10`)
## Local 실행
```bash
npm install
cp .env.example .env.local
npm run typecheck
npm run lint
npm run build
# Run production-style mode
npm run start:standalone
# or for development
npm run dev
```
브라우저에서 `http://localhost:3000` 접속
## 환경변수
샘플은 `.env.example` 참고
- Frontend
- `NEXT_PUBLIC_API_BASE_URL` (비우면 same-origin `/api/*` 사용)
- `NEXT_PUBLIC_DEFAULT_ADDRESS`
- Auth (Google OAuth)
- `AUTH_SECRET` (or `NEXTAUTH_SECRET`)
- `NEXTAUTH_URL`
- `GOOGLE_CLIENT_ID`
- `GOOGLE_CLIENT_SECRET`
- LLM
- `GEMINI_API_KEY`
- `GEMINI_MODEL`
- Public Data (data.go.kr)
- `REALDATA_ENABLED`
- `DATA_GO_KR_SERVICE_KEY`
- `DATA_GO_KR_TIMEOUT_MS`
- `DATA_GO_KR_BUILDING_ENDPOINT`
- `DATA_GO_KR_APT_TRADE_ENDPOINT`
- Firestore
- `FIREBASE_USE_FIRESTO