webiny-project-structure
यह क्या करती है
Webiny प्रोजेक्ट के फ़ोल्डर ढाँचे और उसकी मुख्य config फ़ाइल की भूमिका समझाती है। यह उन डेवलपर्स के लिए है जो Webiny में नए हैं और जानना चाहते हैं कि अपना कोड कहाँ रखें।
कब इस्तेमाल करें
- ✓जब कोई डेवलपर पूछे कि Webiny प्रोजेक्ट में कस्टम कोड कहाँ जाना चाहिए।
- ✓जब कोई डेवलपर जानना चाहे कि webiny.config.tsx फ़ाइल क्या करती है।
- ✓जब किसी डेवलपर को Webiny प्रोजेक्ट में नया extension रजिस्टर करना हो।
Skill का लिंक
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/project-structure/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे Webiny प्रोजेक्ट में अपना कस्टम कोड कहाँ रखूँ?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल मुख्य फ़ोल्डरों और config फ़ाइल को समझाती है, जहाँ सारे extensions रजिस्टर होते हैं। AI इस जानकारी से नया कोड सही जगह पर रखता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Webiny Project Structure
TL;DR
A Webiny project has a flat structure centered around webiny.config.tsx -- the single configuration file where all extensions are registered. Custom code lives in the extensions/ folder. Extensions are registered as React components (<Api.Extension>, <Admin.Extension>, <Infra.*>, <Cli.Command>) and can be conditionally loaded per environment.
Project Layout
my-webiny-project/
├── extensions/ # All custom code -- API, Admin, Infra, CLI extensions
│ └── README.md
├── public/ # Static assets for the Admin app
│ ├── favicon.ico
│ ├── global.css
│ ├── index.html
│ └── robots.txt
├── package.json # Single package.json for the whole project
├── tsconfig.json # Single TypeScript config
├── webiny.config.tsx # Main configuration -- all extensions registered here
├── webiny-env.d.ts # TypeScript environment types
└── yarn.lock
Key points:
- Single
package.json-- no monorepo, no workspaces needed. - Single
tsconfig.json-- straightforward TypeScript setup. webiny.config.tsx-- the entry point for everything. All extensions, infrastructure options, and project settings are declared here.extensions/-- where all your custom code lives. Organize with subfolders as needed (e.g.,extensions/contactSubmission/,extensions/AdminBranding/).
The webiny.config.tsx File
This file exports a single React component called Extensions. It uses JSX to declaratively register all configuration:
// webiny.config.tsx
import React from "react";
import { Admin, Api, Cli, Infra, Project, Security } from "webiny/extensions";
import { Cognito } from "@webiny/cognito";
export const Extensions = () => {
return (
<>
{/* Infrastructure configuration */}
<Infra.Aws.DefaultRegion name={"us-east-1"} />
<Infra.Core.OpenSearch enabled={true} />
<Infra.Aws.Tags tags={{ OWNER: "me", PROJECT: "my-project" }} />
{/* Identity provider */}
<Cognito />
{/* API extensions (backend) */}
<Api.Extension src={"/extensions/ProductCategoryModel.ts"} />
<Api.Extension src={"/extensions/ProductModel.ts"} />
<Api.Extension src={"/extensions/contactSubmission/ContactSubmissionHook.ts"} />
{/* Security hooks */}
<Api.Extension src={"/extensions/MyApiKey.ts"} />
<Security.ApiKey.AfterUpdate src={"/extensions/MyApiKeyAfterUpdate.ts"} />
{/* Admin extensions (frontend) */}
<Admin.Extension src={"/extensions/AdminTheme/AdminTheme.tsx"} />
<Admin.Extension src={"/extensions/AdminTitleLogo/AdminTitleLogo.tsx"} />
<Admin.Extension src={"/extensions/contactSubmission/EmailEntryListColumn.tsx"} />
{/* Infrastructure / Pulumi extensions */}
<Infra.Core.Pulumi src={"/extensions/MyCorePulumiHandler.ts"} />
{/* CLI extensions */}
<Cli.Command src={"/extensions/MyCustomCommand.ts"} />
{/* Project settings */}
<Project.Telemetry enabled={false} />
</>
);
};
Extension Types
| JSX Element | What It Does | File Type |
|---|---|---|
<Api.Extension src="..." /> |
Registers a backend extension (GraphQL schemas, content models, lifecycle hooks) | .ts |
<Admin.Extension src="..." /> |
Registers a frontend Admin UI extension (themes, branding, custom columns, custom forms) | .tsx |
<Infra.Core.Pulumi src="..." /> |
Registers a Pulumi infrastructure handler | .ts |
<Cli.Command src="..." /> |
Registers a custom CLI command | .ts |
<Security.ApiKey.AfterUpdate src="..." /> |
Registers a security lifecycle hook | .ts |
YOU MUST include the full file path with the .ts or .tsx extension in every src prop. For example, use src={"/extensions/MyModel.ts"}, NOT src={"/extensions/MyModel"}. Omitting the file extension will cause a build failure.
YOU MUST use export default for the createImplementation() call when the file is targeted directly by an Extensio
अक्सर पूछे जाने वाले सवाल
extensions फ़ोल्डर किसलिए है?
इसमें प्रोजेक्ट के API, एडमिन, इंफ़्रास्ट्रक्चर और कमांड-लाइन हिस्सों का कस्टम कोड होता है।
क्या Webiny प्रोजेक्ट में कई package फ़ाइलें होती हैं?
नहीं। स्किल के अनुसार प्रोजेक्ट में एक package.json और एक tsconfig.json होता है, कोई monorepo सेटअप नहीं।
किस तरह के extensions रजिस्टर होते हैं?
स्किल API, एडमिन, इंफ़्रास्ट्रक्चर और कमांड-लाइन extensions सूचीबद्ध करती है, जो config फ़ाइल में कॉम्पोनेंट के रूप में जुड़ते हैं।
जानकारी
लेखक का मूल विवरण
Webiny project layout, webiny.config.tsx anatomy, and extension registration. Use this skill when the developer asks about folder structure, where custom code goes, how to register extensions, what webiny.config.tsx does, or how the project is organized. Also use when they need to understand the relationship between extensions/, webiny.config.tsx, and the different extension types (Api, Admin, Infra, CLI).
repo: webiny/webiny-js
लोकप्रियता
- GitHub स्टार
- 8.1k
- रैंकिंग में स्थान
- #12616
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
prd-to-plan
8.1kयह आपके एजेंट को प्रोडक्ट आवश्यकताओं के दस्तावेज़ को छोटे, एंड-टू-एंड स्लाइस की चरणबद्ध योजना में बदलने में मदद करती है, जो Markdown फ़ाइल में सहेजी जाती है।
webiny-admin-architect
8.1kयह आपके एजेंट को Webiny प्लेटफ़ॉर्म के लिए एडमिन स्क्रीन बनाना सिखाती है, उसकी बिज़नेस लॉजिक परतों और presenter पैटर्न का उपयोग करके।
webiny-admin-permissions
8.1kयह आपके एजेंट को Webiny एडमिन स्क्रीन में अनुमति नियंत्रण जोड़ना सिखाती है, जिसमें अपने-आप बनने वाले अनुमति फ़ॉर्म और दिखाने-छिपाने की जाँच शामिल हैं।
webiny-form-model
8.1kयह आपके एजेंट को Webiny में declarative field builder, layouts, validation और शर्त वाले नियमों से फ़ॉर्म बनाना सिखाती है।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।