Content Management
Proyecta का CMS आपके app की primary data layer है — सिर्फ blog posts और marketing copy नहीं, बल्कि वो real records जिन पर आपका app टिका है। Collections provisioned होती हैं और realistic sample content से seeded होती हैं UI बनने से पहले, ताकि आपका app पहले build से ही editable data से जुड़ा हो।
ज़्यादातर Proyecta apps अपना data built-in CMS में store करती हैं। जब आप अपने app का description देते हैं, तो Proyecta एक data model design करता है, ज़रूरी collections बनाता है, और उन्हें realistic sample content से भरता है — यह सब एक भी page बनने से पहले। आपके pages फिर उस real, owner-editable content को उन typed hooks के ज़रिए पढ़ते हैं जो AI आपके लिए wire करता है। इसकी पूरी कहानी समझने के लिए देखें आपके app का data कैसे काम करता है।
शुरुआत करने के लिए आपको इस सब के बारे में सोचने की ज़रूरत नहीं — यह automatically होता है। यह page वो सब समझाती है जो नीचे चल रहा है, ताकि आप इसे अपने हिसाब से shape कर सकें।
Collections और singletons
Section titled “Collections और singletons”Content को collections और singletons में organize किया जाता है:
| Type | यह क्या है | उदाहरण |
|---|---|---|
| Collection | एक content type जिसमें कई entries हों — एक schema, कई rows। | posts, services, testimonials, catalogItems |
| Singleton | एक content type जिसमें exactly एक entry हो — global, one-off content। | businessInfo, seoSettings |
एक collection एक shape है; हर entry उस shape का एक item है (एक blog post, एक service, एक FAQ)। एक singleton एक single editable record रखता है — आपकी business identity, या किसी page के लिए hero/section copy।
किस तरह का content
Section titled “किस तरह का content”Proyecta ready-made collection designs के साथ आता है — sensible fields, admin hints, और starter content — उन records के लिए जो real businesses रखती हैं: blog posts और articles, services, एक product catalog, एक food menu, testimonials और reviews, team members, एक photo gallery, FAQs, events, locations, downloadable resources, job openings, courses, tours, और accommodation listings, और भी बहुत कुछ।
आपको कोई menu से चुनाव नहीं करना। जब आप अपने app का description देते हैं, तो Proyecta वही collections चुनता है जो आपके brief में चाहिए — आपका business type, आपने जो features मांगे, आपकी भाषा — और उन्हें realistic sample content से pre-filled करके बनाता है। अगर आपके app को ऐसी कोई चीज़ चाहिए जो इनमें से किसी में नहीं आती, तो Proyecta अपने fields के साथ एक custom collection design करता है।
इसीलिए, आपके admin panel में आपके app की collections दिखती हैं — कोई fixed list नहीं। यह आपके app के live content model से खुद को build करता है, इसलिए Proyecta ने आपके लिए जो भी बनाया — built-in हो या custom — वही आपको दिखता और edit करने को मिलता है। दो Proyecta apps में शायद ही एक जैसा set हो, और यह जानबूझकर है।
Fields
Section titled “Fields”हर collection typed fields से बनी होती है। Field types end to end enforce होते हैं — admin panel सही editor render करता है, और आपके pages को correctly-typed values मिलती हैं।
| Field type | इसका उपयोग |
|---|---|
string |
छोटी one-line values — titles, names, addresses। |
text |
plain text का एक paragraph। |
markdown |
Long-form rich text — article bodies, “about” copy। |
slug |
URL identifier, किसी दूसरे field (जैसे title) से auto-derived। |
number |
Counts, ratings, durations। |
money |
कोई price या currency amount — money के रूप में दिखाया और edit किया जाता है। |
boolean |
On/off flags। |
date |
Calendar dates। |
datetime |
Timestamps — publish dates, event start times। |
weeklyHours |
सप्ताह के हर दिन के opening hours। |
asset |
एक image, video, या PDF (public URL के रूप में stored)। |
reference |
किसी दूसरी collection की entry का link। |
enum |
choices की एक fixed list में से कोई value। |
array |
strings की एक list — tags, phone numbers, zones। |
blocks |
Stackable content blocks — typed sections से बना एक page। |
json |
Structured data जो ऊपर दिए किसी भी type में fit न हो। |
Entries, drafts, और publishing
Section titled “Entries, drafts, और publishing”एक entry collection का एक item होता है। हर entry का एक status होता है:
- Draft — काम चल रहा है; आपकी live site पर कभी नहीं दिखता।
- Published — live और visitors को दिखता है।
- Archived — retire हो चुका है, रास्ते से हटा दिया गया है।
आपके public pages केवल published entries देखते हैं — drafts और archived items automatically छिपे रहते हैं, ताकि आप content live होने से पहले उसे safely तैयार कर सकें।
Content manage करना (कोई code नहीं चाहिए)
Section titled “Content manage करना (कोई code नहीं चाहिए)”Content add और edit करने के दो तरीके हैं — दोनों के लिए code छूने की ज़रूरत नहीं:
- Chat में AI से पूछें। बस बदलाव describe करें और वो आपके लिए सही content edit करता है:
"Add a testimonial from María González: 'Best service in town', 5 stars.""Change the tagline in Business Info to 'Café de especialidad en la Roma'.""Mark the last five contact-form submissions as read."
- आपके app का admin panel। हर published app को एक built-in, sign-in-protected admin panel मिलता है जहाँ आप (और जिन staff को आप access देते हैं) content और form submissions सीधे manage करते हैं — हर collection के लिए एक spreadsheet-style editor, plus submissions inbox। यह आपके app के live content model से खुद को configure करता है, इसलिए नई collections वहाँ automatically दिखती हैं। देखें Admin Panel।
अपने app के admin panel या AI के ज़रिए अपना CMS content manage करें — एक in-builder content editor roadmap पर है (देखें Coming soon)। Live-updating apps के लिए एक realtime record browser coming soon है।
आपका app content कैसे पढ़ता है
Section titled “आपका app content कैसे पढ़ता है”आपके pages @/hooks/useContent में typed hooks के एक set के ज़रिए content पढ़ते हैं — और वो wiring AI आपके लिए लिखता है। आप page describe करते हैं; Proyecta वो components generate करता है जो आपकी real collections के खिलाफ इन hooks को call करते हैं। आप इन्हें खुद कम ही छूते हैं, लेकिन ये क्या करते हैं:
| Hook | यह क्या करता है |
|---|---|
useCollection('posts') |
किसी collection की published entries list करता है (optional filter/sort/limit के साथ)। |
useEntry('posts', slug) |
slug के ज़रिए एक published entry fetch करता है (detail pages)। |
useSingleton('businessInfo') |
एक singleton पढ़ता है (business info, page content)। |
useFormSubmit('contactForm') |
एक form submit करता है और validation errors report करता है। |
// A blog index — exactly the kind of code the AI generates for youimport { useCollection } from '@/hooks/useContent';
function BlogList() { const { data: posts, isLoading } = useCollection('posts', { sort: 'published_at:desc' }); if (isLoading) return <Spinner />; return posts?.map((post) => <PostCard key={post._id} post={post} />);}जब Proyecta आपकी collections के लिए typed interfaces generate करता है, तो hooks पूरी तरह typed हो जाते हैं (useCollection<Post>('posts')), इसलिए आपका editor हर field को autocomplete करता है। Reads एक baked snapshot से first paint पर hydrated होते हैं — pages instantly और SEO-friendly render होते हैं, फिर background में live refresh होते हैं।
Forms एक first-class capability हैं, कोई ऐसी चीज़ नहीं जो AI हाथ से बनाए। एक form block drop करें और यह fields render करता है, input validate करता है, submit करता है, और success state दिखाता है:
<FormBlock form="contactForm" />Forms भी ready-made आती हैं — एक contact form, एक quote request, एक booking form, एक order form, एक registration form — और Proyecta सही form आपके pages में wire करता है। Submissions आपके app के admin-panel inbox में पहुँचती हैं, और नई submission आने पर owner को email जाती है। पूरी जानकारी के लिए देखें Forms।
Localization
Section titled “Localization”Content को कई locales में translate किया जा सकता है। Localized marked fields प्रति language एक value store करते हैं, और read hooks उन्हें एक fallback chain के ज़रिए resolve करते हैं (requested language → configured fallbacks → default) जब आप visitor का active locale pass करते हैं:
const { data: posts } = useCollection('posts', { locale: 'es' });Single-language apps locales को पूरी तरह ignore करते हैं — configure करने के लिए कुछ नहीं है। Translation की पूरी कहानी के लिए देखें Internationalization।
Releases
Section titled “Releases”एक release कई entries को bundle करता है ताकि वे एक साथ live हों (या unpublished हों) — एक coordinated content drop stage करें (एक launch, एक नया product page, एक FAQ refresh) और सब एक साथ flip करें।
Note: Automatic timed publishing अभी implement नहीं हुई है।
scheduled_atdate वाला releasescheduledstatus में जाता है लेकिन manually publish करना होगा। scheduled time पर auto-publishing जल्द आ रही है।
आम patterns (AI को wire करने दें)
Section titled “आम patterns (AI को wire करने दें)”आप यह खुद कम ही लिखते हैं — बताएं क्या चाहिए और Proyecta real collections के खिलाफ बना देगा:
"Build a blog. Each post has a title, cover image, rich-text body, category, and tags. Public routes at /blog and /blog/[slug], newest first.""Add an FAQ section the owner can edit, grouped by category.""Add a bookable services list with a request-a-quote form.""Make the site bilingual — English and Spanish — with a language switcher.""Seed the testimonials with five realistic reviews for a coffee shop."
आपके app का data कहाँ रहता है
Section titled “आपके app का data कहाँ रहता है”CMS durable content और records का default घर है। कुछ तरह का data purpose-built systems में रहता है:
| Data का प्रकार | यह कहाँ रहता है |
|---|---|
| Content और records (posts, services, listings, FAQs, catalog, bookings) | Proyecta CMS (यह page) — default |
| Realtime / behavior state (live chat, feeds, presence, game state) | Realtime store — coming soon |
| User accounts और sign-in | Auth |
| Products, orders, subscriptions, payments | Commerce |
| Uploaded files और media | Files & Media |
| Static assets जो build में baked हों | आपके project में public/ directory |
CMS default है। genuinely realtime behavior के लिए एक realtime store coming soon है; तब भी, durable content और commerce catalog CMS में ही रहेगा।
Coming soon
Section titled “Coming soon”- In-builder content editor — builder dashboard से सीधे अपनी CMS collections browse और edit करें (आज: admin panel या AI के ज़रिए content manage करें)।
- Rich-text WYSIWYG editor —
markdownfields के लिए visual editing (आज वे markdown के रूप में edit होते हैं)। - Timed auto-publish — releases जो scheduled time पर automatically live हों।
- Live preview — आपके app के खिलाफ content changes का।
- Content roles — editor permissions को developer permissions से अलग करें।