Content modeling guide

View as Markdown

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:

AI Studio (Publication)
├── Experiences
│ └── Resources

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:

ai-research-studio

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

TypeUse case
AI_EXPERTInteractive AI systems
AI_NOTEEducational or written content
QUESTChallenges or tasks
PODCASTAudio content

Two response formats

AISquare APIs return data in two ways.

Each resource is returned as a separate item.

Example:

1{
2 "experience_title": "Advanced Machine Learning Models",
3 "resource_type": "AI_EXPERT",
4 "resource_title": "Image Classification Expert"
5}

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.

[ AI Expert Card ]
[ AI Note Card ]
[ Quest Card ]

2. Grouped by experience

Group resources under their experience.

Experience: Advanced ML
- AI Expert
- AI Note

3. Collection-based UI

Use collections to build:

  • Playlists
  • Courses
  • Learning paths

Mapping API fields to UI

API fieldUI usage
experience_titleSection header
resource_titleCard title
resource_typeBadge / icon
cover_imageThumbnail
creatorAuthor info
metricsLikes, views, engagement

Handling multiple resource types

Different resource types should be rendered differently.

Example:

1if resource_type == "AI_EXPERT":
2 show interactive UI
3
4if resource_type == "AI_NOTE":
5 show reading layout
6
7if resource_type == "QUEST":
8 show challenge UI

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

  1. Fetch flattened resources
  2. Map each item to UI card
  3. Group or filter if needed
  4. Display in feed or sections