Content modeling guide
This guide explains how AISquare structures content and how you should use it to build your UI.
Overview
AISquare organizes content into a structured hierarchy:
Understanding this structure is key to building:
- Content feeds
- Learning flows
- Discovery pages
Core building blocks
AI Studio
The top-level container.
Represents:
- A workspace
- A content hub
- A themed collection of experiences
Example:
Experience
An experience is a logical grouping of content.
Think of it as:
- A topic
- A module
- A journey
Example: “Advanced Machine Learning Models”
Resource
A resource is the actual content unit.
Each experience can contain multiple resources.
Resource types
Two response formats
AISquare APIs return data in two ways.
1. Flattened format (recommended)
Each resource is returned as a separate item.
Example:
Why use this:
- Easy to render in lists
- Simple for frontend mapping
- No nested parsing needed
Best for: feeds, search results, discovery pages.
2. Nested format (less common)
Experiences contain resources inside them.
When to use: detailed experience view, structured content pages.
UI modeling patterns
1. Feed-based UI (most common)
Use flattened data to create a scrollable feed.
2. Grouped by experience
Group resources under their experience.
3. Collection-based UI
Use collections to build:
- Playlists
- Courses
- Learning paths
Mapping API fields to UI
Handling multiple resource types
Different resource types should be rendered differently.
Example:
Using metrics in UI
Metrics help prioritize and enhance UX.
Use them for:
- Sorting (trending, popular)
- Highlighting popular content
- Showing engagement
Search and filtering
Combine filters to refine content:
- Search by keyword
- Filter by type
- Filter by category or tags
Designing for scale
As content grows:
Use pagination
Avoid loading everything at once.
Use lazy loading
Load more content as users scroll.
Cache responses
Improve performance for frequently accessed data.
Common mistakes to avoid
Treating experiences as content items
Remember:
- Experience = container
- Resource = actual content
Ignoring resource types
Different types require different UI handling.
Overfetching data
Always use pagination and filters.
Putting it all together
- Fetch flattened resources
- Map each item to UI card
- Group or filter if needed
- Display in feed or sections
Related pages
- Core Concepts — understand the entity hierarchy
- AI Studios — fetch experiences and resources
- Collections — group experiences into playlists and paths
- Search, filtering, and pagination — refine and paginate results
- Working with creators — display author information
- Metrics and analytics — use engagement data in UI
- Build your first integration — end-to-end integration guide

