Files
AI_template/docs/backend/overview.md
olekhondera 5b28ea675d add SKILL
2026-02-14 07:38:50 +02:00

33 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Backend: Overview
---
**Phase:** Phase 0 (Planning)
**Status:** Draft
**Owner:** Backend Architect
**References:**
- `/docs/project-overview.md`
- `/docs/backend/architecture.md`
- `/docs/backend/payment-flow.md`
---
## 1. Role of Backend
- Own business logic for integrations, AI capability (chat/generation/pipelines/automation), optional human feedback loops, reporting, billing, and audit.
- Integrate safely with external providers (OAuth2/webhooks, payment provider, LLM provider) and expose consistent APIs + events.
- Enforce security appropriate to your archetype (single or multitenant), webhook verification, and event/audit logging.
## 2. Main Domain Areas
- **Auth & Tenancy (optional):** users, roles, tenant isolation if needed.
- **Integrations / Ingestion (optional):** OAuth2/webhooks/files; connection health.
- **Core AI Module:** chat, generation, classification, RAG, or agentic automation.
- **Processing Pipeline (optional):** staged evaluation (rules/embeddings/LLM); `reasoning_trace` JSONB if used.
- **Human Feedback Loop (optional):** approvals/edits/ratings/escalations; audit trail.
- **Reporting & Exports (optional):** dashboards/summaries with history.
- **Billing (optional):** provider-hosted subscriptions/usage, webhooks.
- **Events / Audit:** `/api/events` feed for observability and downstream agents.
## 3. Integrations
- **External data providers:** OAuth2 + webhooks; signatures/verification; idempotent writes via workers.
- **Payment provider:** subscriptions, checkout/portal; webhooks for lifecycle events.
- **LLM provider:** chosen LLM API via a single helper; configurable model/params.
- **Queues:** BullMQ (Redis) for ingestion/categorization/notifications.