#Lesson 1 - Content models
This section covers planning the content structure of the e-commerce project and building it in the Hygraph schema editor.
The field names, model relationships, and component structures defined here are what the API exposes and the frontend consumes. Everything configured in later lessons, such as queries, mutations, frontend connection, and webhooks, depends on the schema built here.
By the end of lesson 1.2, the project contains the following models with their initial fields:
- Product
- Product category
- Blog post
- Seller information
- Landing page
- Navigation
These models are intentionally incomplete at this stage. References are added in lesson 2, components in lesson 4, and remote fields in lesson 5. The schema is built in layers, not all at once.
#Key terms
Before building, the following terms appear in the schema editor:
Project models
Schema: The complete content structure of your project. It contains your models, components, enumerations, and remote sources.
Models: Containers that define the shape of a content type. A Product model defines what a product entry looks like. When an editor creates a product, they fill in the fields that model defines.
Fields: The individual data points stored on a model. A Product model might contain a name field (Single line text), a price field (Float), and an image field (Asset picker). Fields have types, and those types determine what data can be stored and how it can be queried.
In GraphQL, field types are called scalars. Hygraph provides scalar types for strings, integers, floats, booleans, dates, colors, geo-coordinates, and more. These appear in the schema editor's right sidebar when adding a field.
#Lessons in this section
The following lessons apply content modeling concepts directly to this project. For a deeper understanding of those concepts, read Content modeling in Hygraph.
| Lesson | What you will do |
|---|---|
| 1.1 Design your content models | Map the models, components, enumerations, and remote data the project needs before touching the schema editor |
| 1.2 Build your content models | Create the base models and add their initial fields in the Hygraph schema editor |
#What's next
Lesson 1.1 - Design your content modelsOr, go to the Tutorial overview for the full lesson list.