Data Model
Data Model
Artissist uses a single-table DynamoDB design optimized for access patterns and cost efficiency.
Table Structure
Table Name: Artissist
Partition Key: TENANT#<ownerId|orgId>
Sort Key: Hierarchical patterns for different entity types
Entity Patterns
Projects
PK: TENANT#usr_123
SK: PROJECT#proj_abc
Attributes:
projectId: Unique identifiertitle: Project namemedium: Art medium (oil, digital, etc.)-
status: planningproduction complete client: Optional client informationdeadline: Target completion datebudget: Financial constraintscustomFields: Flexible metadata object
Project Planning Briefs
PK: TENANT#usr_123
SK: PROJECT#proj_abc#BRIEF#v2
Attributes:
requirements[]: List of project requirementsdeliverables[]: Expected outputsapprovals[]: Approval workflow statesversion: Version numberchangelog[]: Version history
Milestones
PK: TENANT#usr_123
SK: PROJECT#proj_abc#MILESTONE#ms_1
Attributes:
name: Milestone descriptiondue: Due datecriteria: Success criteria-
status: pendingin_progress complete
Logs
PK: TENANT#usr_123
SK: PROJECT#proj_abc#LOG#log_xyz
Attributes:
rawText: Original transcriptiontranscriptMeta: Audio metadataextracted: Structured AI extraction resultsconfidence: AI confidence scores-
attributionStatus: confirmedpending rejected mediaRefs[]: Linked media filesmaterials[]: Extracted material usagetimeSpentMinutes: Extracted time informationtags[]: Classification tags
Assets
PK: TENANT#usr_123
SK: PROJECT#proj_abc#ASSET#asset_123
Attributes:
-
type: imageaudio document s3Key: S3 object locationexif: Image metadataocr: Extracted text contentalt: Accessibility descriptionlinkedProjectId: Associated projectlinkedLogId: Associated log entry
Inspiration
PK: TENANT#usr_123
SK: INSPIRATION#insp_456
Attributes:
-
type: textimage audio file s3Key: S3 object location (if applicable)tags[]: Classification tagslinkedProjectId: Optional project association
Access Patterns
Primary Access Patterns
- Get all projects for user: Query PK=TENANT#usr_123, SK begins_with PROJECT#
- Get project details: Get item PK=TENANT#usr_123, SK=PROJECT#proj_abc
- Get project logs: Query PK=TENANT#usr_123, SK begins_with PROJECT#proj_abc#LOG#
- Get project assets: Query PK=TENANT#usr_123, SK begins_with PROJECT#proj_abc#ASSET#
Secondary Patterns with GSI
- Search by status: GSI on status attribute
- Time-based queries: GSI on creation timestamp
- Material usage: GSI on extracted materials
Indexes
GSI1: Status Index
- PK:
status - SK:
createdAt - Use case: Find all projects by status across users
GSI2: Search Index
- PK:
entityType - SK:
searchableText - Use case: Full-text search capabilities
Data Consistency
- Strong consistency for user-scoped queries
- Eventually consistent for cross-user analytics
- Atomic transactions for related entity updates
- Optimistic locking via version attributes
Transactions and Concurrency
- DynamoDB transactions ensure related entities update atomically
- Version attributes provide optimistic locking for conflicting writes
TTL and Archival
- Items support
expiresAttimestamps for automatic expiration - Archived records are moved to cold storage for long-term reference
Example Query
query GetProjectLogs($projectId: ID!) {
logs(projectId: $projectId) {
logId
materials
timeSpentMinutes
}
}