feat: complete Git Repo Manager MVP implementation

Backend (Phase 1-6):
- Pydantic schemas for request/response validation
- Service layer (SSH Key, Server, Repo, Sync)
- API routes with authentication
- FastAPI main application with lifespan management
- ORM models (SshKey, Server, Repo, SyncLog)

Frontend (Phase 7):
- Vue 3 + Element Plus + Pinia + Vue Router
- API client with Axios and interceptors
- State management stores
- All page components (Dashboard, Servers, Repos, SyncLogs, SshKeys, Settings)

Deployment (Phase 8):
- README with quick start guide
- Startup script (start.sh)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
panw
2026-03-30 16:30:13 +08:00
parent 960056c88c
commit 44921c5646
46 changed files with 6533 additions and 2 deletions

View File

@@ -0,0 +1,55 @@
"""
Common Pydantic schemas for API responses.
"""
from typing import Generic, TypeVar, Optional
from pydantic import BaseModel, Field
T = TypeVar("T")
class SuccessResponse(BaseModel, Generic[T]):
"""
Standard success response wrapper.
"""
code: int = Field(default=0, description="Response code, 0 for success")
data: T = Field(description="Response data")
message: str = Field(default="success", description="Response message")
model_config = {
"json_schema_extra": {
"examples": [
{
"code": 0,
"data": {},
"message": "success"
}
]
}
}
class ErrorResponse(BaseModel):
"""
Standard error response wrapper.
"""
code: int = Field(description="Error code, non-zero for errors")
message: str = Field(description="Error message")
data: Optional[dict] = Field(default=None, description="Additional error data")
model_config = {
"json_schema_extra": {
"examples": [
{
"code": 400,
"message": "Bad request",
"data": None
},
{
"code": 404,
"message": "Resource not found",
"data": {"detail": "Item with id 123 not found"}
}
]
}
}