backend-setup
Scaffold and manage backend Express server structures and modular plugins.
Install
mkdir -p .claude/skills/backend-setup && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15872" && unzip -o skill.zip -d .claude/skills/backend-setup && rm skill.zipInstalls to .claude/skills/backend-setup
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Express server scaffolding, plugin architecture, middleware patterns. Use when: starting backend development, adding middleware, troubleshooting server startup, designing plugin systems.Key capabilities
- →Scaffold Express server structure
- →Implement authentication middleware
- →Configure error handling middleware
- →Load plugins dynamically
- →Initialize activity modules
How it works
The skill scaffolds an Express server with a CampusOS plugin system, middleware templates, and modular structure by creating specific files and directories.
Inputs & outputs
When to use backend-setup
- →Start new backend project
- →Add custom middleware
- →Troubleshoot server startup
- →Initialize plugin modules
About this skill
Backend Setup
When to Use
- Starting backend development
- Adding Express middleware
- Troubleshooting server startup
- Designing plugin architecture
- Initializing new activity modules
What This Skill Does
Scaffolds Express server with CampusOS plugin system, middleware templates, modular structure, and service initialization patterns.
Procedure
Phase 1: Project Structure
- Start in
/backend/src/ - Create directory structure:
src/ ├── index.js ├── app.js ├── server.js ├── plugin-loader.js ├── middleware/ │ ├── auth.js │ ├── error.js │ └── logger.js └── utils/ └── registry.js
Phase 2: Core Components
- Create
index.js- Express app initialization withexpress() - Create
app.js- Load middleware in correct order (auth → routes → error handling) - Create
server.js- HTTP server startup on configured PORT - Create
plugin-loader.js- Dynamic module discovery from/apps/
Phase 3: Middleware Implementation
- Authentication middleware - Verify JWT/tokens before route handlers
- Error handling middleware - Catch and format errors at end of chain
- Logging middleware - Track all requests/responses
- CORS configuration - Handle cross-origin requests
Phase 4: Plugin System
- Initialize module registry in
utils/registry.js - Scan
/apps/directory for modules withindex.js - Call
module.init(app, registry)for each module - Register routes via
app.post(),app.get()from each module - Mount services/authenticators/resolvers
Quick Reference
cd backend && pnpm install
npm run dev # Start dev server with hot reload
npm run build # Compile TypeScript (if used)
npm test # Run integration tests
# Set custom port: PORT=3001 npm run dev
Common Issues
| Issue | Solution |
|---|---|
| Plugin not loading | Check /apps/module/src/index.js exports init() function |
| Middleware order wrong | Place auth before routes, error handler at end of chain |
| Port in use | Change PORT env var or kill process: lsof -i :3000 |
| Routes undefined | Verify module calls app.post() during init phase |
| CORS errors | Configure CORS middleware with allowed origins |
| Services not registered | Ensure registry.set() called during module initialization |
When not to use it
- →When a plugin's `init()` function is not exported
- →When middleware order is incorrect
- →When routes are undefined
Limitations
- →Requires `init()` function export for plugins
- →Requires correct middleware order
- →Requires `app.post()` calls during module init phase for routes
How it compares
This skill provides a structured scaffolding for Express with a built-in plugin system, unlike starting an Express project from scratch.
Compared to similar skills
backend-setup side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| backend-setup (this skill) | 0 | 3mo | Review | Intermediate |
| telegram-bot-builder | 106 | 6mo | Review | Intermediate |
| telegram-mini-app | 62 | 6mo | Review | Advanced |
| stripe-integration | 48 | 2mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
telegram-bot-builder
davila7
Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.
telegram-mini-app
davila7
Expert in building Telegram Mini Apps (TWA) - web apps that run inside Telegram with native-like experience. Covers the TON ecosystem, Telegram Web App API, payments, user authentication, and building viral mini apps that monetize. Use when: telegram mini app, TWA, telegram web app, TON app, mini app.
stripe-integration
wshobson
Implement Stripe payment processing for robust, PCI-compliant payment flows including checkout, subscriptions, and webhooks. Use when integrating Stripe payments, building subscription systems, or implementing secure checkout flows.
nodejs-backend-patterns
wshobson
Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.
hubspot-integration
davila7
Expert patterns for HubSpot CRM integration including OAuth authentication, CRM objects, associations, batch operations, webhooks, and custom objects. Covers Node.js and Python SDKs. Use when: hubspot, hubspot api, hubspot crm, hubspot integration, contacts api.
backend-architect
sickn33
Expert backend architect specializing in scalable API design, microservices architecture, and distributed systems. Masters REST/GraphQL/gRPC APIs, event-driven architectures, service mesh patterns, and modern backend frameworks. Handles service boundary definition, inter-service communication, resilience patterns, and observability. Use PROACTIVELY when creating new backend services or APIs.