How It Works
Dukanext lets developers build custom storefronts hosted anywhere, using the Dukanext API as the commerce backend. The admin controls all shop data — products, categories, content, settings — and the developer's theme fetches and renders it.
The two roles
| Role | Responsibility |
|---|---|
| Admin (merchant) | Owns the shop. Configures settings, manages products, populates content, generates API keys. |
| Developer | Builds the theme. Gets invited into the admin temporarily to complete setup, or the admin does the setup themselves. |
For now, the developer needs admin access to complete the initial setup. A dedicated developer portal (with limited-scope access) is planned for the future.
Setup flow
1. Enable Dev Mode
In the shop admin, go to Settings and scroll down to Developer Tools. Toggle Developer Mode on.
This one switch unlocks everything:
- Two new tabs appear below the toggle: Content Definitions and API Keys
- A Content item is added to the admin sidebar for populating entries
If Dev Mode is ever toggled off, all API routes stop responding and those tabs and sidebar items are hidden. Everything is preserved — keys, content definitions, and entries all come back when Dev Mode is turned back on.
2. Define content models (optional)
In the Content Definitions tab, define the models your theme needs. A model is a named schema: you give it a slug and add fields (text, image, rich text, boolean, etc.). Examples: hero-banner, faqs, team-members.
This works like Directus — the admin defines the structure, then fills in the data through the Content sidebar. The developer fetches it by slug through the API.
Some developers skip this entirely and hardcode content in the theme. That's valid, but using content models means the merchant can update copy, banners, and announcements without contacting the developer.
3. Generate an API key
In the API Keys tab, click Generate. A modal opens where you provide a label (e.g. "Production Theme") and add your allowed origin — the domain your theme is deployed to. One key, one domain. Click Generate to create the key. It is shown once, so copy it immediately and store it securely (environment variable, not version control).
vst_48487803e7db26c6f9817bb57443e50aa26db920f289871c
How the developer uses the key
Every request from the theme includes the API key:
x-api-key: vst_your_key_here
The API validates the key, checks the origin, verifies dev mode is still on, and returns data. If anything in that chain fails, the appropriate error code is returned.
What the API provides
Once set up, the theme can fetch:
| Data | Endpoint group |
|---|---|
| Products and variants | /products |
| Categories | /categories |
| Search | /search |
| Cart validation and checkout | /orders, /coupons |
| Customer auth | /auth |
| Reviews | /reviews |
| Newsletter | /newsletter |
| Contact form | /contact-form |
| Store settings and policies | /settings |
| SEO meta tags and sitemap | /config |
| Admin-defined content | /content |
| Analytics | /analytics |
What the developer builds
The API doesn't care about the theme's structure. There is no required framework. What matters is:
- The theme calls
/settings/healthon load and handles any error as a coming-soon state - The theme implements the required pages
- All API calls are gated behind a confirmed healthy shop state
Everything else — routing, UI, cart state — is the developer's choice.