Skip to content

Overview

Codedraw comes with a prebuilt generic template. The template includes:

  1. A worker as your main backend
  2. A MongoDB as the main data storage
  3. Access to an assets R2 bucket
  4. Access to a store KV namespace
  5. The following endpoints:
  • GET /api/core/document/:sri
  • PUT /api/core/document/:sri
  • DELETE /api/core/document/:sri
  • POST /api/core/document/:sri
  • POST /api/core/assets/upload
  • POST /api/core/assets/get

The template allows you to use validators and overrides to customise your backend with a simple function and no more router and middleware wiring necessary.

The template is suited for simple use cases but it allows to be extended to cater for your application needs. To give you an example of what's achievable Codedraw has been built using the generic template implementation.