This repository offers a pre-configured Docker Compose setup integrating:
- n8n – A powerful, open-source workflow automation tool that lets you connect APIs, databases, and services using a visual interface.
- Express.js – A lightweight Node.js server framework ideal for building RESTful APIs.
- PostgreSQL – A robust relational database used by both n8n and Express for storing structured data.
This boilerplate is ideal for building API-first applications, rapidly prototyping integrations, or automating business processes — all in a fully containerized development environment.
The stack includes:
-
n8n (Port 5678)
- Visual workflow builder.
- Connected to its own Postgres DB (
n8ndb) to store workflows, credentials, and execution history. - Supports over 300+ native integrations (e.g., Slack, Gmail, Airtable, Notion, GitHub).
-
Express API (Port 3000)
- A REST API scaffold that connects to a dedicated Postgres DB (
expressdb). - Acts as an integration point for n8n or external clients.
- Easily extensible with new endpoints or business logic.
- A REST API scaffold that connects to a dedicated Postgres DB (
-
PostgreSQL
-
Two separate logical databases for isolation:
n8ndb: Used exclusively by n8n.expressdb: Used by the Express server.
-
n8n-express/
├── docker/
│ └── postgres/
│ └── init.sql
├── docker-compose.yml
├── express/
│ ├── db.js
│ ├── Dockerfile
│ ├── index.js
│ ├── models/
│ │ └── itemModel.js
│ ├── package.json
│ ├── README.md
│ └── routes/
│ └── items.js
├── LICENSE
├── notes.md
├── README.md
-
Clone the repository and configure
.envPOSTGRES_USER=youruser POSTGRES_PASSWORD=yourpassword POSTGRES_DATABASE_N8N=n8ndb POSTGRES_DATABASE_EXPRESS=expressdb
-
Start the services
docker-compose up --build
-
Open in browser
- n8n UI: http://localhost:5678
- Express API: http://localhost:3000
n8n allows you to drag and drop pre-built nodes to:
- Fetch data from external APIs (e.g., GitHub, Twitter, REST APIs).
- Trigger workflows from schedules, webhooks, or database events.
- Create multi-step workflows using conditional logic, loops, or data transformations.
- Notify users via Slack, Telegram, Discord, or email.
- Write results back to Postgres or trigger your custom Express API endpoints.
- Define routes for internal tools, dashboards, or third-party apps.
- Use Express endpoints as part of your n8n workflows for custom logic or secured operations.
- Use Express or n8n to read/write to PostgreSQL.
- Schedule nightly jobs to sync or clean up data.
- Use n8n’s Postgres node to query and process records dynamically.
- Marketing Automation: Fetch leads from Typeform, enrich via Clearbit, store in Postgres, and notify via Slack.
- ETL Pipelines: Pull data from external APIs and push to Express for processing and persistence.
- Internal Tooling: Build Express endpoints to trigger n8n workflows manually or based on events.
- Ops Monitoring: Use n8n to watch database changes and send alerts or create tickets automatically.
- 🔄 Zero-config orchestration: Everything runs locally with Docker Compose.
- 🧠 Low-code automation: Non-developers can build and manage workflows using n8n’s UI.
- 🚀 Extendable stack: Easily build and scale the Express API or add new integrations to n8n.
- 📦 Modular design: Separate databases for n8n and your app prevent data conflicts.
- 🌐 Official Website
- 📖 Documentation
- 🧩 Integrations List
- 🧠 Workflow Gallery (Official)
- 💬 Community Forum
- 🐙 GitHub Repository
- 🔧 Self-Hosting Guide
- 🔐 Security Best Practices
- ⭐ Zie619/n8n-workflows – Collection of real-world n8n workflows
- 🌟 enescingoz/awesome-n8n-templates – Curated list of n8n templates and resources
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Author: Siva Sai Krishna