# geolab-api **Repository Path**: geo-lab/geolab-api ## Basic Information - **Project Name**: geolab-api - **Description**: GoFrame API 服务,负责 GEO Lab 管理后台接口、数据库读写和 Redis 任务投递。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2026-06-29 - **Last Updated**: 2026-08-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # geolab-api GoFrame API 服务,负责 GEO Lab 管理后台接口、数据库读写和 Redis 任务投递。 ## 启动 ```bash go mod tidy go run . ``` 默认配置来自环境变量: - `API_ADDR=:8000` - `POSTGRES_DSN=postgres://geolab:geolab@localhost:5432/geolab?sslmode=disable` - `REDIS_ADDR=localhost:6379` 启动时会自动执行 `manifest/migrations/*.up.sql`。 ## 关键接口 - `GET /health` - `GET /api/v1/projects` - `POST /api/v1/projects` - `GET /api/v1/projects/:projectId/brands` - `POST /api/v1/projects/:projectId/queries` - `POST /api/v1/queries/:id/run` - `GET /api/v1/projects/:projectId/runs` - `GET /api/v1/answers/:id` - `GET /api/v1/projects/:projectId/dashboard` `POST /api/v1/queries/:id/run` 只创建 run 并投递 Redis 队列,不在 API 服务中调用 AI 平台。