systemprompt-content 0.21.1

Markdown content management, sources, and event tracking for systemprompt.io AI governance dashboards. Governed publishing pipeline for the MCP governance platform.
Documentation

Production infrastructure for AI agents

Website · Documentation · Guides · Core · Template · Discord


systemprompt-content

Crates.io Docs.rs License: BSL-1.1 codecov

Your content, ingested and served from your own binary. Markdown management with frontmatter, full-text search, campaign links, and UTM click analytics, all held in your PostgreSQL rather than a hosted CMS.

Layer: Domain — business-logic modules that implement systemprompt.io features. Part of the systemprompt-core workspace.

Overview

Integrations · Skill Marketplace

This crate handles all content-related functionality:

  • Content Management: CRUD operations for markdown content with frontmatter metadata
  • Content Ingestion: Parse and ingest markdown files from configured directories
  • Search: Full-text search across content with category filtering
  • Link Tracking: Campaign links with UTM parameters and click analytics
  • Configuration: Validated content source configuration with routing

Usage

[dependencies]
systemprompt-content = "0.21"
use systemprompt_content::{
    // Models
    Content, ContentMetadata, IngestionOptions, IngestionReport,
    IngestionSource, SearchFilters, SearchRequest, SearchResponse,
    SearchResult, UpdateContentParams, LinkType, TrackClickParams, UtmParams,

    // Repositories
    ContentRepository, LinkAnalyticsRepository, SearchRepository,

    // Services
    DefaultContentProvider, IngestionService, LinkAnalyticsService,
    LinkGenerationService, SearchService, GenerateLinkParams,

    // Jobs
    execute_content_ingestion,

    // Extension
    ContentExtension,

    // Default providers
    DefaultBrandingProvider, DefaultHomepagePrerenderer,
    DefaultListBrandingProvider, ListItemsCardRenderer,

    // Config
    ContentConfigValidated, ContentReady, ContentSourceConfigValidated,
    LoadStats, ParsedContent, ValidationResult,

    // Error
    ContentError, ContentResult,

    // Validation
    validate_content_metadata,
};

Module Layout

Module Purpose
models/ Content, ContentMetadata, search request/response types, and campaign-link/UTM types, with builders.
repository/ Compile-time-verified persistence for content/, link/ (plus analytics), and full-text search/.
services/ IngestionService (directory scan and ingest), SearchService, LinkAnalyticsService, LinkGenerationService, and DefaultContentProvider.
config/ Validated content-source configuration (ContentConfigValidated, ContentReady).
jobs/ execute_content_ingestion scheduled ingestion entrypoint.
(crate root) Branding, homepage prerender, and list-rendering default providers.

Modules

config/

Content source configuration validation and caching. ContentConfigValidated validates YAML configuration, ContentReady loads and caches parsed content for fast access.

jobs/

Background jobs for content processing. execute_content_ingestion scans configured directories and syncs markdown content to the database, registered via ContentExtension.

models/

Domain types for content, links, and search. Builder pattern used for complex parameter types (CreateContentParams, TrackClickParams).

repository/

Database access layer using SQLX macros for compile-time SQL verification. Repositories handle data persistence with no business logic. Split into queries.rs (reads) and mutations.rs (writes) for clarity.

services/

Business logic layer. Services coordinate repositories and implement domain operations:

  • DefaultContentProvider: Implements the ContentProvider trait for downstream consumers
  • IngestionService: Directory scanning and content parsing
  • SearchService: Category and keyword search
  • LinkGenerationService: Campaign link creation with UTM parameters
  • LinkAnalyticsService: Click tracking and performance metrics

Dependencies

Internal (shared/):

  • systemprompt-models - Cross-crate model types
  • systemprompt-identifiers - Typed IDs (ContentId, LinkId, etc.)
  • systemprompt-traits - ContentProvider, Job traits
  • systemprompt-provider-contracts - Job registration macros

Internal (infra/):

  • systemprompt-database - Database pool abstraction
  • systemprompt-logging - Logging infrastructure
  • systemprompt-cloud - Cloud integration types
  • systemprompt-extension - Extension framework

Traits Implemented

  • ContentProvider (systemprompt-traits) - DefaultContentProvider
  • Extension (systemprompt-extension) - ContentExtension (registers schema + ingestion job)
  • ContentRouting (systemprompt-models) - ContentConfigValidated, ContentReady

License

BSL-1.1 (Business Source License). Source-available for evaluation, testing, and non-production use. Production use requires a commercial license. Each version converts to Apache 2.0 four years after publication. See LICENSE.


systemprompt.io · Documentation · Guides · Live Demo · Template · crates.io · docs.rs · Discord

Domain layer · Own how your organization uses AI.