Build on Bosca
Everything you need to know to build features on the Bosca platform — from data models to GraphQL controllers, permissions, caching, and beyond.
Explore the Platform
Architecture
Core/impl split, KSP code generation, and how the pieces fit together.
Models & Repositories
Data classes, @Repository, SQL mapping, and query patterns.
Services
Business logic, @ServiceImplementation, injection, and lifecycle.
GraphQL
@TypeController, @Field, namespace pattern, queries, mutations, and batching.
Routes
HTTP endpoints, @RouteController, Route, APIRoute, SSERoute, and Pages.
Security
Authentication, credentials, JWT token versioning, OAuth2, passkeys, and API tokens.
Profile
User identity, flexible attributes, visibility controls, and the Principal relationship.
Organizations
Multi-tenant workspaces, membership, signup tokens, domain auto-join, and org permissions.
Permissions
PermissibleEntity, evaluators, groups, visibility flags, and the full decision matrix.
Transactions
Connection lifecycle, savepoints, deferred side effects, and GraphQL connections.
Caching
CacheManager, ServiceCache, RequestCache, two-tier architecture, and invalidation.
Messaging & Events
PubSubService, domain events, @JobEvent, dispatch, and job executors.
Bulk Processing
Batch mutations, permission filtering, transactional vs error-tolerant patterns.
Scripting
Kotlin scripts: event triggers, API endpoints, AI agent tools, sandboxed execution.
Bosca Git
Self-hosted Git server, pull requests, CI/CD, script & query source refs.
Bosca CLI
Content management, WorkOps, BX projects, Kubernetes, and MCP server.
Infrastructure
Docker Compose, Kubernetes, downstream systems, and environment configuration.
Key Annotations
Every annotation is processed by KSP at compile time — no runtime reflection.
@RepositoryJDBC implementation from interface SQL@ServiceImplementationDI provider registration@TypeControllerGraphQL resolver wiring@RouteControllerHTTP route handler + DI provider@JobDefinitionJob executor + enqueue helpers@JobEventdispatch() for jobs + pub-subQuick Start Checklist
Adding a new feature (e.g., "Tags"):
- Model — Create
TagandTagInputdata classes in thecore-*module. - Database migration — Create a Flyway migration SQL file.
- Repository — Create
TagRepositoryinterface with@Repositoryand@Query. - Service interface — Create
TagServicein thecore-*module. - Service impl — Create
TagServiceImplwith@ServiceImplementation. - GraphQL schema — Create
tags.graphqlsundersrc/main/resources/graphql/. - Schema registration — Add
@Schema("tags.graphqls")to the module'sSchemaRegistrar. - Type controller — Create
TagControllerimplementingGraphQLController<Tag>. - Query controller — Create
Tagsobject andTagsController. - Mutation controller — Create
TagMutationobject andTagMutationController. - Wire into the tree — Return namespace objects from parent controllers.
- Events — Define
@JobEvent-annotated event classes. - Jobs — Create
@JobDefinition-annotated executors.