Getting Started Last updated: 08. May 2026
Build your first Docly application step by step — from an empty workspace to a working document database, with optional API and web output.
What you will build
In this guide you will set up a workspace with a simple Article schema, add some documents, and see how Docly generates forms automatically from your schema. Then you can optionally expose your data as a JSON API or render it as web pages.
Time: About 10 minutes for the basics. Add another 10 minutes for the optional API and display template steps.
Step 1: Create a workspace
A workspace is the top-level container in Docly. It holds all your folders, documents, code and configuration.
Log in to Docly
Click New workspace
Give it a name, e.g.
My first app
Your workspace is ready. It is empty — no schemas, no documents, no code.
Step 2: Install a package
Packages add ready-made schemas, templates and tools to your workspace. The Developer Tools package is a good starting point — it gives you the schema designers and code editing capabilities.
Open your workspace properties
Go to the Packages tab
Click Add Package and select Developer Tools
Click Install
You can always add more packages later. See Packages for a full overview.
Step 3: Create a schema
A schema defines the structure of your documents — which fields they have, what types those fields are, and how the editing form looks. Think of it as defining a table in a traditional database, but more flexible — schemas support nested structures and arrays of data within a single document.
Let us create a simple Article schema with three fields:
Title — a text input
Author — a text input
Body — a rich text editor
In your workspace, create a new document and select the Docly Schema (designer) template
Name it
ArticleDrag in a Text field and name it
TitleDrag in another Text field and name it
AuthorDrag in a Rich text field and name it
BodySave the schema
Docly now knows what an Article is. Every document you create with this schema will have these three fields, and Docly automatically generates a form for editing them.
Learn more: Documents & Schemas
Step 4: Add documents
Now create some documents using your new schema.
Navigate to a folder in your workspace (or create one, e.g.
Articles)Click New document and select your Article schema
Fill in the Title, Author and Body fields in the generated form
Save
Your document is stored as JSON in Docly's document database. You can edit it at any time using the same form, and you can access the raw JSON data through the API or with getFile() in server-side JavaScript.
You now have a working document database. The steps below are optional — continue if you want to expose your data as an API or render it as web pages.
Optional: Create an API function
You can expose your data as a JSON API by placing a .js file in the #/API folder. Any file there runs server-side and returns JSON.
Create #/API/articles.js:
export default () => {
let articles = docly.getFiles("/Articles");
return articles;
} Call /API/articles and you get your articles as JSON. That is all it takes — no routing, no framework, no configuration.
Learn more: API & Services
Optional: Create a display template
A display template is a .hash file that renders your documents as HTML pages. Create one that matches your schema name — #/Article.hash:
<!DOCTYPE html>
<html>
<head>
<title>#Title#</title>
</head>
<body>
<h1>#Title#</h1>
<p>By #Author#</p>
<div>#Body#</div>
</body>
</html> The #FieldName# syntax is #JS data binding — it inserts the value of each field from your document. When you publish the folder, every Article document is automatically rendered using this template.
Learn more: Templates & Rendering
Publish
To make your content available on the web, publish a folder to a URL or domain. Everything under that folder — documents, files, APIs — becomes accessible via its path.
Right-click the folder you want to publish
Select Publish
Choose a URL or connect your own domain
Your documents are now live — either as JSON via API functions, as rendered pages via display templates, or both.
Where to go next
Documents & Schemas — define and validate your data structures
Templates & Rendering — display templates, master pages and template collections
API & Services — build APIs and scheduled tasks
JavaScript Reference — all built-in functions
Configuration — site.json, security headers, root and folder defaults
Packages — extend your workspace with ready-made modules
Editing Docly documents programmatically — required reading if you plan to use a mapped drive with AI agents or external editors