Smithery Logo
MCPsSkillsDocsPricing
Login
Smithery Logo

Accelerating the Agent Economy

Resources

DocumentationPrivacy PolicySystem Status

Company

PricingAboutBlog

Connect

© 2026 Smithery. All rights reserved.

    salvadorsc

    backend-api-dev

    salvadorsc/backend-api-dev
    Coding
    1 installs

    About

    SKILL.md

    Install

    Install via Skills CLI

    or add to your agent
    • Claude Code
      Claude Code
    • Codex
      Codex
    • OpenClaw
      OpenClaw
    • Cursor
      Cursor
    • Amp
      Amp
    • GitHub Copilot
      GitHub Copilot
    • Gemini CLI
      Gemini CLI
    • Kilo Code
      Kilo Code
    • Junie
      Junie
    • Replit
      Replit
    • Windsurf
      Windsurf
    • Cline
      Cline
    • Continue
      Continue
    • OpenCode
      OpenCode
    • OpenHands
      OpenHands
    • Roo Code
      Roo Code
    • Augment
      Augment
    • Goose
      Goose
    • Trae
      Trae
    • Zencoder
      Zencoder
    • Antigravity
      Antigravity
    ├─
    ├─
    └─

    About

    Develop Express.js backend APIs with controllers, services, and routes. Use when creating or modifying Node.js backend endpoints, business logic, or Express middleware.

    SKILL.md

    Backend API Development

    Instructions

    When developing backend APIs for the quinipolo project:

    1. Structure

      • Controllers handle HTTP requests/responses only
      • Services contain business logic and database operations
      • Routes define endpoint paths and middleware
      • Keep controllers thin, services thick
    2. File Organization

      • Controllers: quinipolo-be/controllers/ (PascalCase, e.g., NotificationController.js)
      • Services: quinipolo-be/services/ (PascalCase, e.g., NotificationService.js)
      • Routes: quinipolo-be/routes/ (lowercase, e.g., notifications.js)
    3. Code Patterns

      // Controller Pattern
      async functionName(req, res) {
        try {
          const result = await ServiceName.method(params);
          res.status(200).json({ success: true, data: result });
        } catch (error) {
          console.error('Error:', error);
          res.status(500).json({ success: false, error: error.message });
        }
      }
      
    4. Error Handling

      • Always wrap async operations in try-catch
      • Return consistent response format: { success: boolean, data/error: any }
      • Log errors to console for debugging
      • Non-blocking: notification failures should not block main operations
    5. Integration

      • Register routes in app.js around line 58
      • Use existing authentication middleware where needed
      • Follow RESTful conventions for endpoints

    Best Practices

    • Use async/await for asynchronous operations
    • Validate input parameters
    • Return appropriate HTTP status codes (200, 201, 400, 404, 500)
    • Keep endpoints focused and single-purpose
    • Document complex business logic with comments
    • Test endpoints with actual API calls

    Examples

    Service Method:

    async sendPushNotification(tokens, title, body, data) {
      // Business logic here
      return result;
    }
    

    Controller Method:

    async registerToken(req, res) {
      try {
        const { token, deviceInfo } = req.body;
        await NotificationService.registerDeviceToken(req.user.id, token, deviceInfo);
        res.status(200).json({ success: true });
      } catch (error) {
        res.status(500).json({ success: false, error: error.message });
      }
    }
    

    Route Definition:

    router.post('/tokens', authenticate, NotificationController.registerToken);
    router.get('/', authenticate, NotificationController.getNotifications);
    
    Recommended Servers
    Supabase
    Supabase
    InstantDB
    InstantDB
    Repository
    salvadorsc/quinipolo-all
    Files