An opinionated companion service for hosting, curating, and distributing production-ready n8n automation templates. Built with Bun, Prisma, and PostgreSQL so your teams can publish reusable workflows with confidence.
- Overview
- Features
- Architecture
- Quick start
- Configuration
- API surface
- Development workflow
- Database migrations
- Troubleshooting
- License
The n8n Template Server exposes a catalog of curated workflow templates that can be consumed by the n8n editor or any internal catalog experience. It provides a secure API layer for searching, browsing, and retrieving workflow blueprints while persisting templates and metadata in PostgreSQL via Prisma.
Use it to:
- Operate a central source of truth for automation templates.
- Share best-practice workflows across teams and business units.
- Curate collections for onboarding, demos, and production use cases.
- Search-first workflow discovery: Filter templates by name, tags, and categories to accelerate adoption.
- Collection management: Group workflows into curated collections for campaigns, verticals, or onboarding journeys.
- Preview-ready JSON payloads: Serve the exact workflow definition required by the n8n editor without additional transforms.
- Secure health monitoring: Built-in health endpoint for observability and load balancer checks.
- Bun-powered performance: Lightweight runtime with instant dev reloads and native TypeScript support.
- Modern Admin Interface: Beautiful, responsive admin UI built with Tailwind CSS for managing templates efficiently.
The admin interface provides a modern, user-friendly dashboard for managing n8n templates. Access it at /admin after starting the server.
The main dashboard displays all templates in a responsive grid layout with search and category filtering capabilities.
Create new templates or edit existing ones through an intuitive modal interface with JSON workflow editor.
Secure authentication system with persistent login using localStorage.
Import multiple templates at once using JSON file upload.
- Search & Filter: Quickly find templates by name or filter by category
- Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
- Real-time Updates: Instant feedback with toast notifications
- Category Management: Automatic category creation and management
- Template Cards: Visual cards with hover effects and category badges
| Layer | Responsibilities |
|---|---|
| API | Express server exposing REST endpoints and OpenAPI spec. |
| Controllers | Business logic for workflows, collections, and categories. |
| Database | PostgreSQL accessed through Prisma client and migrations. |
| Middleware | Request validation, error handling, and auth guard. |
| Utilities | Shared helpers for pagination, filtering, and formatting. |
The service provides an API-first layer between content editors and the n8n runtime. Templates are ingested through the admin interface or bulk import scripts, validated via Prisma, and stored in PostgreSQL. Client applications (including the official n8n editor) fetch template metadata and workflow JSON through the REST endpoints.
Choose the workflow that suits your environment.
docker compose up --buildThe service boots on port 3000 and automatically runs Prisma migrations against the bundled PostgreSQL container.
bun install
bunx prisma generate
bun --hot run src/server.tsThe hot-reload development server listens on http://localhost:3000.
Set environment variables or mount a .local/secrets.json file. The values below mirror docker-compose.yml defaults.
| Variable | Description | Default |
|---|---|---|
NODE_ENV |
Runtime mode | production |
PORT |
HTTP port for the Bun server | 3000 |
DB_HOST |
PostgreSQL hostname | postgres |
DB_PORT |
PostgreSQL port | 5432 |
DB_NAME |
Database name | n8n_templates |
DB_USER |
Database user | n8n_user |
DB_PASSWORD |
Database password | secure_password |
docker compose up --build
├── prisma
├── src
│ ├── controllers
│ ├── database
│ ├── middleware
│ ├── routes
│ └── utils
└── docs
prisma: schema and migrations for PostgreSQL.src/controllers: request handlers for templates, collections, and categories.src/database: Prisma client configuration and connection helpers.src/middleware: shared Express middleware for auth and errors.src/routes: REST route definitions.src/utils: helper modules for pagination and formatting.docs: visual assets and supplementary documentation.
| Method | Endpoint | Description |
|---|---|---|
GET |
/templates/workflows/:id |
Retrieve a single workflow template by ID. |
GET |
/templates/search |
Search workflows by name, tags, or categories. |
GET |
/templates/collections/:id |
Fetch a curated collection with its workflows. |
GET |
/templates/collections |
List all available collections. |
GET |
/templates/categories |
Return the list of categories. |
GET |
/health |
Health check endpoint for uptime monitoring. |
- Install dependencies with
bun install. - Generate the Prisma client with
bunx prisma generate. - Run
bun --hot run src/server.tsfor live reload during development. - Execute
bunx prisma migrate devwhenever you change the Prisma schema.
Prisma migrations live in the prisma/migrations directory. Use the following commands to manage schema changes:
bunx prisma migrate dev --name <migration-name>
bunx prisma migrate deploy
bunx prisma db seed- Confirm PostgreSQL is reachable and credentials match your environment variables.
- Ensure Prisma migrations have been applied before starting the API.
- Use
GET /healthto verify that the service and database connection are healthy.
MIT License
Copyright (c) 2025 Mehmet Burak Akgün
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.





