ACAI — Chapter 34: Database Architecture & Complete Data Model
34.1 Chapter Objective In Chapter 33, we designed the complete backend architecture and folder structure. Now we will design the database architecture for ACAI. The database must support: Users Projects Conversations Messages Files Documents Document Chunks Embeddings Memory AI Requests Agent Tasks Agent Steps Tool Calls Usage Subscriptions Notifications Audit Logs The goal is to create a data model that is: Consistent Secure Scalable Queryable Maintainable 34.2 Database Architecture The application can be viewed as: ACAI BACKEND │ ▼ SERVICE LAYER │ ▼ REPOSITORY LAYER │ ▼ DATABASE │ ┌─────────────────┼─────────────────┐ ▼ ▼ ▼ PRIMARY DB VECTOR DB OBJECT STORAGE ...