Developer Kickstart

Beginner
Released: May 30, 2025
Overview
Get up and running with Contentstack fast using the Developer Kickstart learning path. Featuring six hands-on, code-first modules, you’ll seed a new Contentstack stack from the CLI, explore the Next.js Kickstart project, and master core headless CMS features like Live Preview architecture, data modeling for Visual Builder, and the JSON Rich Text Editor. Each module combines a concise walkthrough of key concepts with deeper dives into best practices, so you can build, customize, and scale your Contentstack Kickstart faster than ever.

This learning path includes

6 Courses

Skills Covered

developer

Curriculum

Course

Seeding a New Stack with CLI

This guide demonstrates how to create a new stack in Contentstack and seed it with content from a GitHub repository using the Contentstack Command-Line Interface (CLI). Prerequisites Ensure you have the following before starting: A Contentstack account with English set as the master language. Terminal access with a package manager installed (e.g., npm). Knowledge of the region hosting your Contentstack instance (AWS, Azure, or Google Cloud; US or Europe). Your Contentstack organization UID. Installing the Contentstack CLI You can install the CLI globally or run it directly using npx: npm install -g @contentstack/cli Or run directly without global install npx @contentstack/cli Configuring the CLI Step 1: Set Your Region Configure the CLI with the hosting region: csdx config:set:region Select your region (e.g., AWS Europe). Step 2: Authentication Log into Contentstack with your email and password: csdx auth:login Alternatively, you can store management tokens for persistent authentication. Check the official documentation for more details. Creating and Seeding a Stack Use the stack seed command to import content from a GitHub repository: csdx stack:seed --repo github-repository-url --org organization-uid --stack new-stack-name Replace placeholders: <GitHub-Repository-URL>: URL of the GitHub repository containing your seed content. <Organization-UID>: Your Contentstack organization UID. <New-Stack-Name>: Name for your new stack. Execute the command to create and seed your stack. Verify Stack Creation After the import completes, log in to your Contentstack account to inspect and verify the newly created stack. Additional Resources Contentstack Documentation Contentstack Discord Community

1m 59s
Intermediate

Course

Visual Builder Data Modeling Best Practices

Data modeling is crucial when working with visual builder tools in modern headless CMS platforms like Contentstack. Correctly modeling your data ensures your content is scalable, maintainable, and reusable across different platforms and channels. Understanding Data Types When modeling content, it’s vital to differentiate clearly between two primary data types: Domain Data Definition : Domain data is the core content, independent of presentation or design. Characteristics : Reusable across multiple channels (websites, mobile apps, external platforms). Persistent and stable over long periods. Examples: Articles, videos, blog posts, conference talks. Volatile (Design-Related) Data Definition : Volatile data is content related to layout, styling, and presentation. Characteristics : Frequently changing and design-specific. Tied closely to individual components or pages. Examples: Hero banners, featured components, promotional sections. Best Practices for Structuring Your Data Separate Design from Content Always keep your domain content separate from your design components. Domain data should be purely informational and devoid of styling instructions or layout details. For example, an "Article" model should not include design-related options like "featured image size." Reuse Domain Data Structure domain data models to be channel-agnostic. For instance, videos or blog posts should exist independently of the pages or layouts they might appear in. This way, they can easily be reused across multiple places, like websites, apps, or external publications. Utilize Components for Design Flexibility Components like "latest videos," "featured articles," or "hero banners" should be created to handle design and layout separately from domain content. These components can reference domain data without altering the underlying content. Practical Example Consider a website homepage: A Hero Banner at the top of the homepage is volatile content. It frequently changes depending on campaigns or events. Therefore, its data should include titles, images, and links but be flexible enough for frequent updates. A List of Videos below the hero banner is domain content. Videos themselves don't change based on presentation—only the presentation component itself changes, such as featuring the first video prominently. Common Mistakes to Avoid Embedding design attributes within domain data : Avoid adding design-specific fields (like "display large image") directly into your core domain models. It creates dependency and makes content reuse challenging. Over-complicating content models : Do not create unique content types for every visual component. Instead, reuse flexible components linked to stable domain data. Benefits of Good Data Modeling Simplifies long-term content maintenance. Enhances content reuse across multiple channels. Clearly defines editing boundaries for content editors, reducing errors. Conclusion Clear differentiation between domain data and volatile design data is foundational for effective content management. Structuring your data in this way ensures scalability, ease of maintenance, and consistent user experiences across all platforms. Join our community on Discord: https://community.contentstack.com Visual Builder Documentation for Developers

7m 3s
Intermediate

Course

Exploring the JSON Rich Text Editor

Contentstack s Rich Text Editor offers a powerful, customizable interface for content editors, backed by robust developer features that allow complete control over the HTML output. Key Features for Content Editors Rich media embedding (images, videos, tables) Integration with external systems (e.g., Cloudinary) AI-assisted content enhancements Embedding and linking other content entries Configuring the Rich Text Field Basic Configuration Inline formatting: Bold, Italic, Underline Block formatting: Headers, Paragraphs Advanced Configuration Includes rich media, tables, and embeds Custom Configuration Selectively enable or disable features Useful for restricting options for SEO or accessibility purposes (e.g., avoiding multiple H1 tags) Embedding and External References Entries: Embed full entries directly within Rich Text. Assets: Embed images or videos directly, either from internal assets or external systems like Cloudinary. Customizing HTML Output The Rich Text Editor outputs structured JSON, which developers can convert into customized HTML using the Contentstack Delivery SDK utility functions. JSON Structure Rich Text content is stored as JSON with clear semantic descriptions. Example JSON snippet: { "type": "paragraph", "children": [ { "text": "Rich", "italic": true }, { "text": " text editor", "bold": true } ] } Converting JSON to HTML Use the built-in utility function: import { jsonToHtml } from '@contentstack/utils'; const htmlOutput = jsonToHtml(entry.content); Customizing Rendered HTML Customize the output further with render options: const renderOptions = { p: (node, next) => (node.children[0].text.trim() === '' ? '' : `<p>${next(node.children)}</p>`), a: (node, next) => `<a href="${node.attrs.href}" rel="noopener nofollow">${next(node.children)}</a>` }; const htmlOutput = jsonToHtml(entry.content, renderOptions); Example Use Cases Remove empty paragraphs to keep markup clean. Add SEO-friendly attributes to links automatically. Customize image rendering for optimal performance (lazy loading, image optimization). Handling Embedded Entries and Assets Embedded Entries When referencing another entry: const renderOptions = { embedded_entry: (node) => `<div class="embedded-entry">${node.entry.title}</div>` }; Cloudinary Assets Customize Cloudinary images dynamically: const renderOptions = { cloudinary: (node) => `<img src="${node.attrs.secure_url}" alt="${node.attrs.alt}" loading="lazy">` }; Advanced Image Customization Add dynamic parameters to Cloudinary images: function customCloudinaryImage(asset, metadata) { const params = 'w_800,h_450,f_auto,q_90,c_fill'; return `<img src="${asset.url}?${params}" alt="${asset.alt}" loading="lazy">`; } Best Practices Clearly separate editorial content input from HTML rendering. Allow content editors freedom within the Rich Text editor, and handle all necessary cleanup in the rendering logic. Use JSON rendering hooks to avoid manual HTML adjustments by editors. Resources Contentstack Documentation Discord Community

16m 40s
Beginner
Open Feedback Modal