feat: AI-powered features — document drafting, case strategy, similar case finder (P2)
Backend: - DraftDocument: Claude generates legal documents from case data + template type (14 template types: Klageschrift, UPC claims, Abmahnung, etc.) - CaseStrategy: Opus-powered strategic analysis with next steps, risk assessment, and timeline optimization (structured tool output) - FindSimilarCases: queries youpc.org Supabase for UPC cases, Claude ranks by relevance with explanations and key holdings Endpoints: POST /api/ai/draft-document, /case-strategy, /similar-cases All rate-limited (5 req/min) and permission-gated (PermAIExtraction). YouPC database connection is optional (YOUPC_DATABASE_URL env var).
This commit is contained in:
@@ -14,6 +14,7 @@ type Config struct {
|
||||
SupabaseJWTSecret string
|
||||
AnthropicAPIKey string
|
||||
FrontendOrigin string
|
||||
YouPCDatabaseURL string // read-only connection to youpc.org Supabase for similar case finder
|
||||
}
|
||||
|
||||
func Load() (*Config, error) {
|
||||
@@ -26,6 +27,7 @@ func Load() (*Config, error) {
|
||||
SupabaseJWTSecret: os.Getenv("SUPABASE_JWT_SECRET"),
|
||||
AnthropicAPIKey: os.Getenv("ANTHROPIC_API_KEY"),
|
||||
FrontendOrigin: getEnv("FRONTEND_ORIGIN", "https://kanzlai.msbls.de"),
|
||||
YouPCDatabaseURL: os.Getenv("YOUPC_DATABASE_URL"),
|
||||
}
|
||||
|
||||
if cfg.DatabaseURL == "" {
|
||||
|
||||
Reference in New Issue
Block a user