मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)8.1k · #12583

webiny-api-architect

यह क्या करती है

यह स्किल आपके AI को Webiny API पर बैकएंड कोड बनाने के मुख्य नियम देती है। यह उन डेवलपर्स के लिए है जो Webiny प्रोजेक्ट में बिज़नेस लॉजिक जोड़ने वाले एक्सटेंशन लिख रहे हैं।

कब इस्तेमाल करें

  • ✓जब आप Webiny API के लिए कोई बैकएंड फ़ीचर या एक्सटेंशन बना रहे हों।
  • ✓जब आपको किसी लॉजिक के लिए service और use case में से चुनना हो।
  • ✓जब आप नए बैकएंड फ़ीचर को सही फ़ोल्डरों और रजिस्ट्रेशन में व्यवस्थित करना चाहें।

Skill का लिंक

https://github.com/webiny/webiny-js/blob/next/skills/user-skills/api/api-architect/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/webiny/webiny-js/blob/next/skills/user-skills/api/api-architect/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“Webiny में एक बैकएंड फ़ीचर बनाइए जो शिपिंग लागत निकाले, प्रोजेक्ट के आर्किटेक्चर नियमों का पालन करते हुए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

स्किल services और use cases का अंतर, फ़ीचर का बिज़नेस उद्देश्य के हिसाब से नामकरण, और dependency container में उनका रजिस्ट्रेशन समझाती है। वह बचने योग्य आम गलतियों की सूची भी देती है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

API Architecture Patterns

TL;DR

API extensions use createFeature to register features into the DI container. Each feature is a vertical slice with abstractions, implementations, and a feature.ts registration file. The key abstractions are Services (multi-method, singleton) and UseCases (single-method orchestrators, transient). Repositories handle persistence via CMS. Features are named by business capability, files inside by technical responsibility.

Working Context

This skill applies to both extension developers (working in extensions/) and core developers (working in packages/). The architecture patterns are identical — only imports and registration differ.

Extensions (extensions/) Core (packages/)
Imports webiny/api, webiny/api/cms/model, etc. @webiny/feature/api, @webiny/api-headless-cms/..., etc.
Catalog paths Use the Import: path Use the Source: path
Entry point export default createFeature(...) in a file targeted by <Api.Extension src={...}> createFeature registered by the package initializer
GraphQL schemas export default GraphQLSchemaFactory.createImplementation(...) — registered via container.register() inside the entry point's createFeature Same pattern, but imported from @webiny/handler-graphql

Detect which context you're in by checking the file path: extensions/ → extension mode, packages/ → core mode.

Architecture Overview

Extension (root) ── registers ──> Features + GraphQL Schemas + Models
    Feature ── registers ──> UseCase | Service | EventHandler + Repository
        UseCase ── depends on ──> Service | Repository (+ EventPublisher)
            Repository ── depends on ──> CMS Use Cases (GetModel, CreateEntry, etc.)
        Service ── depends on ──> external APIs, other Services
  • Extension: Top-level entry point. Registers all features, GraphQL schemas, and CMS models.
  • Feature: A vertical slice. Registers its use cases, services, repositories, and event handlers.
  • UseCase: Single-method orchestrator (execute()). Coordinates services, repositories, and events. Transient scope.
  • Service: Multi-method abstraction for external API calls or cohesive domain logic. Singleton scope.
  • Repository: Persistence layer using CMS as storage. Singleton scope.
  • EventHandler: Thin orchestrator reacting to domain events. Delegates to services/use cases.
  • GraphQL Schema: Defines types, inputs, queries, and mutations. Resolvers delegate to use cases.
  • CMS Model: Defines the data schema stored in headless CMS.

Services vs UseCases

Services

Multi-method abstractions for external API calls or cohesive domain logic. A service groups related operations that belong together.

// abstractions.ts
export interface ILingotekService {
  translate(documentId: string, targetLocale: string): Promise<Result<void, Error>>;
  getTranslationStatus(documentId: string): Promise<Result<TranslationStatus, Error>>;
  deleteProject(projectId: string): Promise<Result<void, Error>>;
}

export const LingotekService = createAbstraction<ILingotekService>("MyExt/LingotekService");

export namespace LingotekService {
  export type Interface = ILingotekService;
}
  • Registered in singleton scope (.inSingletonScope())
  • Located in: features/{serviceName}/ or features/services/{serviceName}/
  • One service per external system or cohesive domain area
  • If async bootstrap is needed (loading settings from CMS, fetching remote config): use the ServiceProvider pattern — a provider abstraction with async getService() that lazily initializes and caches the service. Consumers inje
अक्सर पूछे जाने वाले सवाल

service और use case में क्या अंतर है?

service में कई methods होते हैं और वह साझा होती है, जबकि use case में एक ही काम के लिए एक method होता है।

फ़ीचर के नाम कैसे रखे जाते हैं?

फ़ीचर का नाम बिज़नेस क्षमता के हिसाब से होता है, और अंदर की फ़ाइलों का नाम उनकी तकनीकी भूमिका से।

क्या यह एडमिन हिस्से को कवर करता है?

नहीं। एडमिन पैटर्न अलग Webiny एडमिन स्किलों में कवर होते हैं।

जानकारी

लेखक का मूल विवरण

The hub skill for all API/backend architecture in Webiny. Covers architecture overview, Services vs UseCases, feature naming and organization, feature structure templates, DI decision tree, anti-patterns, createFeature, createAbstraction, container registration, domain errors, entity patterns, naming conventions, scoping rules, and code conventions. Use this skill for ANY backend API work — it references sub-skills for deep implementation details.

repo: webiny/webiny-js

लोकप्रियता

GitHub स्टार
8.1k
रैंकिंग में स्थान
#12583
लाइसेंस
—
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

prd-to-plan

8.1k

यह आपके एजेंट को प्रोडक्ट आवश्यकताओं के दस्तावेज़ को छोटे, एंड-टू-एंड स्लाइस की चरणबद्ध योजना में बदलने में मदद करती है, जो Markdown फ़ाइल में सहेजी जाती है।

प्रोडक्टिविटीटास्क और प्रोजेक्ट

webiny-admin-architect

8.1k

यह आपके एजेंट को Webiny प्लेटफ़ॉर्म के लिए एडमिन स्क्रीन बनाना सिखाती है, उसकी बिज़नेस लॉजिक परतों और presenter पैटर्न का उपयोग करके।

कोडिंगवेबसाइट और UI (frontend)

webiny-admin-permissions

8.1k

यह आपके एजेंट को Webiny एडमिन स्क्रीन में अनुमति नियंत्रण जोड़ना सिखाती है, जिसमें अपने-आप बनने वाले अनुमति फ़ॉर्म और दिखाने-छिपाने की जाँच शामिल हैं।

कोडिंगवेबसाइट और UI (frontend)

webiny-form-model

8.1k

यह आपके एजेंट को Webiny में declarative field builder, layouts, validation और शर्त वाले नियमों से फ़ॉर्म बनाना सिखाती है।

कोडिंगवेबसाइट और UI (frontend)

मिलती-जुलती skills