feat: add fs-backend service

This commit is contained in:
tao.chen
2026-07-29 10:07:13 +08:00
parent 59a1b5e4d4
commit a4e4e5b0db
12 changed files with 915 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
"""
核心模块初始化
"""
+28
View File
@@ -0,0 +1,28 @@
"""
应用配置模块
"""
from pydantic_settings import BaseSettings
from typing import List
class Settings(BaseSettings):
"""应用配置"""
# 工作空间基础路径
BASE_WORKSPACE: str = "/Users/mac/test/workspace"
# 可通过环境变量覆盖:export BASE_WORKSPACE=/custom/path
# CORS 配置
CORS_ORIGINS: List[str] = ["*"]
# CORS_ORIGINS: List[str] = ["http://localhost:5173", "http://127.0.0.1:5173"]
# 项目名验证正则:仅允许中英文、数字、下划线、横杠
PROJECT_NAME_PATTERN: str = r"^[\w一-龥\-]+$"
class Config:
env_file = ".env"
env_file_encoding = "utf-8"
settings = Settings()