Learn
Introduction
What Nimbly is, what a project looks like and where to read next.
Nimbly is a full-stack atomic design system. Routing, templates, data, an admin and a REST API are parts of one system, so a custom product is assembled from small pieces that fit together instead of being wired up from separate tools.
What you build with
- Routes are folders. A folder under
ext/uri/is an address. Itsindex.tplis the page. - Templates are small. A template is HTML with shortcodes such as
[#get record.title#]. A reusable template inext/tpl/becomes a shortcode of its own. - Data is a resource. A resource is a folder with a
.metafile that describes its fields, and one JSON file per record. There is no database to set up. - The admin follows the data. Every resource gets list, edit and create screens, permissions and an API endpoint from its
.metafile. - Logic lives in libraries. PHP in
ext/lib/prepares data and talks to other systems. Markup stays in templates.
A page in three blocks
A page that lists articles is a resource, a route and a component:
ext/data/articles/.meta the resource: the fields of an article
ext/uri/articles/index.tpl the route: the page settings
ext/uri/articles/main.tpl the route: the content of the page
ext/tpl/card-article/index.tpl the component: one article in the list
<!-- ext/uri/articles/index.tpl -->
[#set page-title="Articles"#]
[#html#]
<!-- ext/uri/articles/main.tpl -->
[#data articles filter=published:1#]
<ul>
[#repeat data.articles tpl=card-article#]
</ul>
<!-- ext/tpl/card-article/index.tpl -->
<li>[#get item.title#]</li>
The page is on /articles/. The same resource is editable in the admin and readable over the API without further code.
Two repositories
A project is two Git repositories in one folder. core/ is the framework and is the same for every project. ext/ is your application: its routes, templates, data, libraries and theme. You update core without touching your application, and your application never patches core.
Where to go next
- Installation gets a site running on your machine.
- Core and ext explains the two repositories and the folder layout.
- Templates and shortcodes explains how pages are written.
- Resources explains the data layer.
- Routing explains how addresses map to folders.
For AI agents
These docs are written for agents as much as for people. For AI agents explains how to work in a Nimbly project and where the plain-text versions of these pages are.