Package Overview
Trokky is built as a collection of focused packages that can be combined based on your needs. This page provides an overview of all available packages.
Package Architecture
Section titled “Package Architecture” Your Application │ ┌──────────────────┼──────────────────┐ │ │ │ @trokky/client @trokky/studio Your Frontend │ │ └────────┬─────────┘ │ ┌─────────────┼─────────────┐ │ │ │ @trokky/express @trokky/nextjs @trokky/cloudflare │ │ │ └─────────────┼─────────────┘ │ @trokky/routes │ @trokky/core │ ┌─────────────┼─────────────┐ │ │ │ adapter-filesystem adapter-s3 adapter-cloudflareCore Packages
Section titled “Core Packages”These packages form the foundation of Trokky:
| Package | Description | Required |
|---|---|---|
@trokky/core | CMS engine with schemas, validation, storage coordination | Yes |
@trokky/routes | Framework-agnostic HTTP handlers | Yes* |
*Required for API functionality
Integration Packages
Section titled “Integration Packages”Connect Trokky to your web framework:
| Package | Framework | Description |
|---|---|---|
@trokky/express | Express.js | Full-featured Express integration |
@trokky/nextjs | Next.js | App Router API routes |
@trokky/cloudflare | Cloudflare Workers | Edge runtime deployment |
@trokky/hono | Hono | Lightweight edge framework |
Storage Adapters
Section titled “Storage Adapters”Choose where your content is stored:
| Package | Storage | Best For |
|---|---|---|
@trokky/adapter-filesystem | Local files | Development, Git workflows |
@trokky/adapter-s3 | AWS S3 + DynamoDB | AWS deployments |
@trokky/adapter-cloudflare | Cloudflare D1 + R2 | Edge deployments |
Frontend Packages
Section titled “Frontend Packages”Build your frontend with Trokky:
| Package | Description |
|---|---|
@trokky/client | Frontend SDK with type generation |
@trokky/studio | React-based admin interface |
Package Selection Guide
Section titled “Package Selection Guide”Minimal Setup (API Only)
Section titled “Minimal Setup (API Only)”npm install @trokky/core @trokky/routes @trokky/adapter-filesystemUse this when you want to build a custom API layer.
Standard Setup (Express + Studio)
Section titled “Standard Setup (Express + Studio)”npm install @trokky/core @trokky/express @trokky/adapter-filesystem @trokky/studioThe most common setup for Node.js applications.
Next.js Setup
Section titled “Next.js Setup”npm install @trokky/core @trokky/nextjs @trokky/adapter-filesystemFor Next.js App Router projects.
Edge Setup (Cloudflare)
Section titled “Edge Setup (Cloudflare)”npm install @trokky/core @trokky/cloudflare @trokky/adapter-cloudflareFor Cloudflare Workers deployments.
Full Setup (Everything)
Section titled “Full Setup (Everything)”npm install @trokky/core @trokky/express @trokky/adapter-filesystem @trokky/studio @trokky/clientComplete setup with admin interface and frontend SDK.
Version Compatibility
Section titled “Version Compatibility”All Trokky packages are versioned together. Always use matching versions:
{ "dependencies": { "@trokky/core": "^0.1.0", "@trokky/express": "^0.1.0", "@trokky/adapter-filesystem": "^0.1.0" }}Package Dependencies
Section titled “Package Dependencies”Understanding internal dependencies:
@trokky/express └── @trokky/routes └── @trokky/core
@trokky/studio └── @trokky/fields (internal)
@trokky/client └── (standalone, no Trokky dependencies)
@trokky/adapter-filesystem └── @trokky/core (interfaces only)TypeScript Support
Section titled “TypeScript Support”All packages include TypeScript definitions:
- Full type inference from schemas
- Typed API responses
- Auto-completion in editors
- No
@types/*packages needed
Next Steps
Section titled “Next Steps”Explore individual package documentation:
- @trokky/core - Core CMS engine
- @trokky/express - Express integration
- @trokky/studio - Admin interface
- @trokky/client - Frontend SDK