firebase-os 1.1.4 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/dist/FirebaseOS.d.ts +15 -0
  2. package/dist/firebase-os.cjs.js +5 -20
  3. package/dist/firebase-os.es.js +95 -90
  4. package/dist/index.d.ts +3 -0
  5. package/dist/lib/ConfigContext.d.ts +12 -0
  6. package/package.json +3 -2
  7. package/scripts/postinstall.js +86 -15
  8. package/src/App.css +184 -0
  9. package/src/App.tsx +214 -0
  10. package/src/FirebaseOS.tsx +81 -0
  11. package/src/assets/hero.png +0 -0
  12. package/src/assets/react.svg +1 -0
  13. package/src/assets/vite.svg +1 -0
  14. package/src/components/AdminNotifications.test.tsx +98 -0
  15. package/src/components/AdminNotifications.tsx +194 -0
  16. package/src/components/Button.test.tsx +22 -0
  17. package/src/components/Button.tsx +53 -0
  18. package/src/components/ConfirmModal.test.tsx +98 -0
  19. package/src/components/ConfirmModal.tsx +73 -0
  20. package/src/components/ContactPopup.test.tsx +98 -0
  21. package/src/components/ContactPopup.tsx +437 -0
  22. package/src/components/CustomSelect.test.tsx +47 -0
  23. package/src/components/CustomSelect.tsx +89 -0
  24. package/src/components/DashboardNav.test.tsx +98 -0
  25. package/src/components/DashboardNav.tsx +281 -0
  26. package/src/components/Input.test.tsx +33 -0
  27. package/src/components/Input.tsx +61 -0
  28. package/src/components/JsonEditor.tsx +579 -0
  29. package/src/components/Navbar.test.tsx +98 -0
  30. package/src/components/Navbar.tsx +563 -0
  31. package/src/configs/forms/contactForm.config.ts +15 -0
  32. package/src/configs/forms/index.ts +29 -0
  33. package/src/configs/forms/pubForm.config.ts +11 -0
  34. package/src/configs/forms/supportForm.config.ts +14 -0
  35. package/src/configs/forms/userForm.config.ts +11 -0
  36. package/src/configs/pages/admin.config.ts +29 -0
  37. package/src/configs/pages/contact.config.ts +6 -0
  38. package/src/configs/pages/home.config.ts +18 -0
  39. package/src/configs/pages/mem.config.ts +2 -0
  40. package/src/configs/pages/menuOrders.config.ts +11 -0
  41. package/src/configs/pages/pub.config.ts +11 -0
  42. package/src/configs/pages/shared.config.ts +29 -0
  43. package/src/configs/pages/support.config.ts +7 -0
  44. package/src/configs/pages/tabOrders.config.ts +33 -0
  45. package/src/configs/pages/user.config.ts +29 -0
  46. package/src/configs/theme.config.ts +93 -0
  47. package/src/index.css +403 -0
  48. package/src/index.ts +22 -0
  49. package/src/lib/AuthContext.test.tsx +88 -0
  50. package/src/lib/AuthContext.tsx +191 -0
  51. package/src/lib/ConfigContext.tsx +45 -0
  52. package/src/lib/ThemeContext.tsx +233 -0
  53. package/src/lib/firebase.ts +91 -0
  54. package/src/main.tsx +22 -0
  55. package/src/microcomponents/AdminExampleContent.tsx +44 -0
  56. package/src/microcomponents/PrivateExampleContent.tsx +39 -0
  57. package/src/microcomponents/Public.tsx +126 -0
  58. package/src/microcomponents/SharedExampleContent.tsx +53 -0
  59. package/src/pages/Dashboard.test.tsx +98 -0
  60. package/src/pages/Dashboard.tsx +60 -0
  61. package/src/pages/DynamicPage.tsx +237 -0
  62. package/src/pages/FormsAdmin.test.tsx +98 -0
  63. package/src/pages/FormsAdmin.tsx +459 -0
  64. package/src/pages/Home.test.tsx +98 -0
  65. package/src/pages/Home.tsx +144 -0
  66. package/src/pages/Login.test.tsx +98 -0
  67. package/src/pages/Login.tsx +108 -0
  68. package/src/pages/PagesAdmin.test.tsx +98 -0
  69. package/src/pages/PagesAdmin.tsx +1022 -0
  70. package/src/pages/Profile.test.tsx +98 -0
  71. package/src/pages/Profile.tsx +319 -0
  72. package/src/pages/Register.test.tsx +98 -0
  73. package/src/pages/Register.tsx +116 -0
  74. package/src/pages/Requests.test.tsx +95 -0
  75. package/src/pages/Requests.tsx +422 -0
  76. package/src/pages/ResetPassword.test.tsx +98 -0
  77. package/src/pages/ResetPassword.tsx +92 -0
  78. package/src/pages/Settings.test.tsx +98 -0
  79. package/src/pages/Settings.tsx +393 -0
  80. package/src/pages/Setup.tsx +407 -0
  81. package/src/pages/StorageAdmin.test.tsx +150 -0
  82. package/src/pages/StorageAdmin.tsx +769 -0
  83. package/src/pages/Submissions.test.tsx +95 -0
  84. package/src/pages/Submissions.tsx +378 -0
  85. package/src/pages/Templates.test.tsx +98 -0
  86. package/src/pages/Templates.tsx +103 -0
  87. package/src/pages/ThemeAdmin.test.tsx +144 -0
  88. package/src/pages/ThemeAdmin.tsx +1000 -0
  89. package/src/pages/Users.test.tsx +95 -0
  90. package/src/pages/Users.tsx +334 -0
  91. package/src/pages/Verify.test.tsx +98 -0
  92. package/src/pages/Verify.tsx +95 -0
  93. package/src/prompts/index.ts +13 -0
  94. package/src/prompts/pages/publicPage.ts +44 -0
  95. package/src/prompts/sharedConstants.ts +12 -0
  96. package/src/prompts/tabs/board/adminboard.ts +32 -0
  97. package/src/prompts/tabs/board/privateboard.ts +36 -0
  98. package/src/prompts/tabs/board/publicboard.ts +36 -0
  99. package/src/prompts/tabs/calendar/admincalendar.ts +32 -0
  100. package/src/prompts/tabs/calendar/privatecalendar.ts +36 -0
  101. package/src/prompts/tabs/calendar/publiccalendar.ts +36 -0
  102. package/src/prompts/tabs/crud/admin.ts +54 -0
  103. package/src/prompts/tabs/crud/private.ts +55 -0
  104. package/src/prompts/tabs/crud/shared.ts +53 -0
  105. package/src/prompts/tabs/table/admintable.ts +32 -0
  106. package/src/prompts/tabs/table/privatetable.ts +36 -0
  107. package/src/prompts/tabs/table/publictable.ts +36 -0
  108. package/src/setupTests.ts +1 -0
  109. package/src/templates/AdminPageTemplate.tsx +678 -0
  110. package/src/templates/PrivatePageTemplate.tsx +594 -0
  111. package/src/templates/PublicPageTemplate.tsx +92 -0
  112. package/src/templates/SharedPageTemplate.tsx +551 -0
  113. package/src/templates/TemplateBoard.test.tsx +106 -0
  114. package/src/templates/TemplateBoard.tsx +642 -0
  115. package/src/templates/TemplateCalendar.test.tsx +106 -0
  116. package/src/templates/TemplateCalendar.tsx +848 -0
  117. package/src/templates/TemplateConfirmation.test.tsx +106 -0
  118. package/src/templates/TemplateConfirmation.tsx +145 -0
  119. package/src/templates/TemplateInlineForm.test.tsx +106 -0
  120. package/src/templates/TemplateInlineForm.tsx +129 -0
  121. package/src/templates/TemplatePopupForm.test.tsx +106 -0
  122. package/src/templates/TemplatePopupForm.tsx +174 -0
  123. package/src/templates/TemplateTable.test.tsx +106 -0
  124. package/src/templates/TemplateTable.tsx +675 -0
@@ -0,0 +1,44 @@
1
+ export const publicPagePrompt = (config: any, forms: string[] = []) => {
2
+ const parsedPageName = (config.pageName || config.pageId || 'custom_page')
3
+ .toLowerCase().replace(/[^a-z0-9]+/g, '_');
4
+ const microName = `${parsedPageName.charAt(0).toUpperCase()}${parsedPageName.slice(1)}Content`;
5
+
6
+ return `I need your help building the inner content for a newly created Public Page. This page is powered by the \`PublicPageTemplate\` (located at \`src/templates/PublicPageTemplate.tsx\`).
7
+
8
+ The page "infrastructure" (routing, header, public accessibility) is already set up and working. Your goal is to design the "Landing Content" that lives inside this page.
9
+
10
+ ### ── Current Page Configuration ──────────────────────────────────────────────
11
+ \`\`\`json
12
+ ${JSON.stringify({
13
+ pageName: config.pageName,
14
+ pageTitle: config.pageTitle,
15
+ route: config.route,
16
+ template: config.template,
17
+ }, null, 2)}
18
+ \`\`\`
19
+
20
+ ### ── Available Forms ────────────────────────────────────────────────────────
21
+ The following public forms are available in the system. **These are for your information only—do NOT use them unless specifically needed.** Your priority is to listen to the user's specific input and decide if a particular modal, form, or component is actually required for the context of this page:
22
+ ${forms.length > 0 ? forms.map(f => `- ${f}`).join('\n') : '- No public forms found'}
23
+
24
+ ### ── Your Mission ────────────────────────────────────────────────────────────
25
+ 1. **Create the Content Layer**: Design a new micro-component at \`src/microcomponents/${microName}.tsx\`.
26
+ 2. **Build the UI**: Inside this component, build the landing page content (hero sections, feature grids, contact sections, etc.).
27
+ 3. **Inject into Template**: Once created, import and place \`<${microName} />\` inside the main content area of \`src/templates/PublicPageTemplate.tsx\`, replacing the placeholder robot icon and default text.
28
+
29
+ ### ── Guardrails ─────────────────────────────────────────────────────────────
30
+ - **DO NOT** modify the outer layout of \`PublicPageTemplate.tsx\` (back buttons, page header, footer, dynamic title).
31
+ - **DO NOT** change the routing or page exports.
32
+ - Focus exclusively on the inner content box using the micro-component strategy.
33
+
34
+ ### ── Aesthetic & Performance (Theme System) ───────────────────────────────
35
+ Build with the user's active theme in mind:
36
+ - **CSS Variables**: \`var(--bg-color)\`, \`var(--fg-color)\`, \`var(--accent-color)\`, \`var(--panel-bg)\`, \`var(--panel-border)\`.
37
+ - **Components**: Re-use \`<Button />\`, \`<Input />\`, \`<ConfirmModal />\`, and \`<ContactPopup />\` natively.
38
+ - **Styles**: Use the \`glass-panel\` class for sections and \`text-gradient\` for headers.
39
+
40
+ ### ── Important Formatting Rules ──────────────────────────────────────────────
41
+ - **NO REDUNDANT HEADERS**: The parent template already injects a large dynamic page title and action buttons. DO NOT add a main \`<h1>\` or \`<h2>\` page title at the top of your micro-component. Start directly with your cards, lists, or sub-sections.
42
+
43
+ [WHAT SHOULD I BUILD ON THIS PUBLIC PAGE?]`;
44
+ };
@@ -0,0 +1,12 @@
1
+ export const THEME_INSTRUCTIONS = `### Theme & Styling (Dynamic Firestore Theme)
2
+ Our application uses a dynamic theme engine. You MUST use these global CSS variable tokens to ensure your design matches the user's active theme:
3
+ - **Colors**: \`var(--bg-color)\`, \`var(--fg-color)\`, \`var(--accent-color)\`, \`var(--accent-deep)\`, \`var(--panel-bg)\`, \`var(--panel-border)\`.
4
+ - **Text**: Use the \`text-foreground\` (standard), \`text-accent\` (primary), and \`text-gradient\` (headings) classes.
5
+ - **Glassmorphism**: Always use the \`.glass-panel\` utility class for containers/cards.`;
6
+
7
+ export const COMPONENTS_LIST = `- **<Button />**, **<Input />**, **<ConfirmModal />**, **<DashboardNav />**, **<ContactPopup />**, **<CustomSelect />**.`;
8
+
9
+ export const ADMIN_COMPONENTS = `- **<Button />**, **<Input />**, **<ConfirmModal />**, **<DashboardNav />**, **<CustomSelect />**.`;
10
+
11
+ export const HEADING_RULES = `### ── Important Formatting Rules ──────────────────────────────────────────────
12
+ - **NO REDUNDANT HEADERS**: The parent template already injects a large dynamic page title and action buttons. DO NOT add a main \`<h1>\` or \`<h2>\` page title at the top of your micro-component. Start directly with your cards, lists, or sub-sections.`;
@@ -0,0 +1,32 @@
1
+ import { ADMIN_COMPONENTS, THEME_INSTRUCTIONS } from '../../sharedConstants';
2
+
3
+ export const adminBoardPrompt = (config: any, title: string, tasksCollection: string, categoriesCollection: string) => `I need your help modifying the core Board Template which currently powers the "${config?.tabTitle || config?.tabName || title}" tab.
4
+
5
+ This is a core template located at \`src/templates/TemplateBoard.tsx\`. Any changes you make here will affect ALL board views across the application. Do not completely rewrite it from scratch; instead, carefully integrate the requested features into the existing architecture.
6
+
7
+ ### ── Current Tab Configuration (Context) ────────────────────────────────────
8
+ \`\`\`json
9
+ ${JSON.stringify({
10
+ tabName: config?.tabName,
11
+ tabTitle: config?.tabTitle,
12
+ showButton: config?.showButton,
13
+ buttonStyle: config?.buttonStyle,
14
+ }, null, 2)}
15
+ \`\`\`
16
+
17
+ ### ── Data Architecture ───────────────────────────────────────────────────────
18
+ The current tab is configured with:
19
+ - **Tasks Collection**: \`${tasksCollection}\`
20
+ - **Categories Collection**: \`${categoriesCollection}\`
21
+ - **Access Level**: ADMIN ONLY.
22
+
23
+ ### ── Your Mission ────────────────────────────────────────────────────────────
24
+ 1. **Modify the Core Template**: Carefully edit \`src/templates/TemplateBoard.tsx\`.
25
+ 2. **Handle UX/UI**: Integrate your changes natively with the existing state, drag-and-drop logic, and UI elements.
26
+
27
+ ### ── Architecture & Reusable Components ────────────────────────────────────
28
+ ${ADMIN_COMPONENTS}
29
+
30
+ ${THEME_INSTRUCTIONS}
31
+
32
+ [DESCRIBE FEATURE TO ADD HERE]`;
@@ -0,0 +1,36 @@
1
+ import { COMPONENTS_LIST, THEME_INSTRUCTIONS } from '../../sharedConstants';
2
+
3
+ export const privateBoardPrompt = (config: any, title: string, tasksCollection: string, categoriesCollection: string, forms: string[] = []) => `I need your help modifying the core Board Template which currently powers the "${config?.tabTitle || config?.tabName || title}" tab.
4
+
5
+ This is a core template located at \`src/templates/TemplateBoard.tsx\`. Any changes you make here will affect ALL board views across the application. Do not completely rewrite it from scratch; instead, carefully integrate the requested features into the existing architecture.
6
+
7
+ ### ── Current Tab Configuration (Context) ────────────────────────────────────
8
+ \`\`\`json
9
+ ${JSON.stringify({
10
+ tabName: config?.tabName,
11
+ tabTitle: config?.tabTitle,
12
+ showButton: config?.showButton,
13
+ buttonStyle: config?.buttonStyle,
14
+ }, null, 2)}
15
+ \`\`\`
16
+
17
+ ### ── Data Architecture ───────────────────────────────────────────────────────
18
+ The current tab is configured with:
19
+ - **Tasks Collection**: \`${tasksCollection}\`
20
+ - **Categories Collection**: \`${categoriesCollection}\`
21
+ - **Access Level**: PRIVATE.
22
+
23
+ ### ── Form Selection ─────────────────────────────────────────────────────────
24
+ Available PRIVATE forms:
25
+ ${forms.length > 0 ? forms.map(f => `- ${f}`).join('\n') : '- No active private forms found'}
26
+
27
+ ### ── Your Mission ────────────────────────────────────────────────────────────
28
+ 1. **Modify the Core Template**: Carefully edit \`src/templates/TemplateBoard.tsx\`.
29
+ 2. **Handle UX/UI**: Integrate your changes natively with the existing state, drag-and-drop logic, and UI elements.
30
+
31
+ ### ── Architecture & Reusable Components ────────────────────────────────────
32
+ ${COMPONENTS_LIST}
33
+
34
+ ${THEME_INSTRUCTIONS}
35
+
36
+ [DESCRIBE FEATURE TO ADD HERE]`;
@@ -0,0 +1,36 @@
1
+ import { COMPONENTS_LIST, THEME_INSTRUCTIONS } from '../../sharedConstants';
2
+
3
+ export const publicBoardPrompt = (config: any, title: string, tasksCollection: string, categoriesCollection: string, forms: string[] = []) => `I need your help modifying the core Board Template which currently powers the "${config?.tabTitle || config?.tabName || title}" tab.
4
+
5
+ This is a core template located at \`src/templates/TemplateBoard.tsx\`. Any changes you make here will affect ALL board views across the application. Do not completely rewrite it from scratch; instead, carefully integrate the requested features into the existing architecture.
6
+
7
+ ### ── Current Tab Configuration (Context) ────────────────────────────────────
8
+ \`\`\`json
9
+ ${JSON.stringify({
10
+ tabName: config?.tabName,
11
+ tabTitle: config?.tabTitle,
12
+ showButton: config?.showButton,
13
+ buttonStyle: config?.buttonStyle,
14
+ }, null, 2)}
15
+ \`\`\`
16
+
17
+ ### ── Data Architecture ───────────────────────────────────────────────────────
18
+ The current tab is configured with:
19
+ - **Tasks Collection**: \`${tasksCollection}\`
20
+ - **Categories Collection**: \`${categoriesCollection}\`
21
+ - **Access Level**: PUBLIC/SHARED.
22
+
23
+ ### ── Form Selection ─────────────────────────────────────────────────────────
24
+ Available PUBLIC forms:
25
+ ${forms.length > 0 ? forms.map(f => `- ${f}`).join('\n') : '- No active public forms found'}
26
+
27
+ ### ── Your Mission ────────────────────────────────────────────────────────────
28
+ 1. **Modify the Core Template**: Carefully edit \`src/templates/TemplateBoard.tsx\`.
29
+ 2. **Handle UX/UI**: Integrate your changes natively with the existing state, drag-and-drop logic, and UI elements.
30
+
31
+ ### ── Architecture & Reusable Components ────────────────────────────────────
32
+ ${COMPONENTS_LIST}
33
+
34
+ ${THEME_INSTRUCTIONS}
35
+
36
+ [DESCRIBE FEATURE TO ADD HERE]`;
@@ -0,0 +1,32 @@
1
+ import { ADMIN_COMPONENTS, THEME_INSTRUCTIONS } from '../../sharedConstants';
2
+
3
+ export const adminCalendarPrompt = (config: any, title: string, eventsCollection: string, forms: string[] = []) => `I need your help modifying the core Calendar Template which currently powers the "${config?.tabTitle || config?.tabName || title}" tab.
4
+
5
+ This is a core template located at \`src/templates/TemplateCalendar.tsx\`. Any changes you make here will affect ALL calendar views across the application. Do not completely rewrite it from scratch; instead, carefully integrate the requested features into the existing architecture.
6
+
7
+ ### ── Current Tab Configuration (Context) ────────────────────────────────────
8
+ \`\`\`json
9
+ ${JSON.stringify({
10
+ tabName: config?.tabName,
11
+ tabTitle: config?.tabTitle,
12
+ defaultView: config?.defaultView,
13
+ customFields: config?.customFields,
14
+ showButton: config?.showButton,
15
+ }, null, 2)}
16
+ \`\`\`
17
+
18
+ ### ── Data Architecture ───────────────────────────────────────────────────────
19
+ The current tab is configured with:
20
+ - **Firestore Collection**: \`${eventsCollection}\`
21
+ - **Access Level**: ADMIN ONLY.
22
+
23
+ ### ── Your Mission ────────────────────────────────────────────────────────────
24
+ 1. **Modify the Core Template**: Carefully edit \`src/templates/TemplateCalendar.tsx\`.
25
+ 2. **Handle UX/UI**: Integrate your changes natively with the existing state, UI elements, and data sync logic without breaking existing functionality.
26
+
27
+ ### ── Architecture & Reusable Components ────────────────────────────────────
28
+ ${ADMIN_COMPONENTS}
29
+
30
+ ${THEME_INSTRUCTIONS}
31
+
32
+ [DESCRIBE FEATURE TO ADD HERE]`;
@@ -0,0 +1,36 @@
1
+ import { COMPONENTS_LIST, THEME_INSTRUCTIONS } from '../../sharedConstants';
2
+
3
+ export const privateCalendarPrompt = (config: any, title: string, eventsCollection: string, forms: string[] = []) => `I need your help modifying the core Calendar Template which currently powers the "${config?.tabTitle || config?.tabName || title}" tab.
4
+
5
+ This is a core template located at \`src/templates/TemplateCalendar.tsx\`. Any changes you make here will affect ALL calendar views across the application. Do not completely rewrite it from scratch; instead, carefully integrate the requested features into the existing architecture.
6
+
7
+ ### ── Current Tab Configuration (Context) ────────────────────────────────────
8
+ \`\`\`json
9
+ ${JSON.stringify({
10
+ tabName: config?.tabName,
11
+ tabTitle: config?.tabTitle,
12
+ defaultView: config?.defaultView,
13
+ customFields: config?.customFields,
14
+ showButton: config?.showButton,
15
+ }, null, 2)}
16
+ \`\`\`
17
+
18
+ ### ── Data Architecture ───────────────────────────────────────────────────────
19
+ The current tab is configured with:
20
+ - **Firestore Collection**: \`${eventsCollection}\`
21
+ - **Access Level**: PRIVATE.
22
+
23
+ ### ── Form Selection ─────────────────────────────────────────────────────────
24
+ Available PRIVATE forms:
25
+ ${forms.length > 0 ? forms.map(f => `- ${f}`).join('\n') : '- No active private forms found'}
26
+
27
+ ### ── Your Mission ────────────────────────────────────────────────────────────
28
+ 1. **Modify the Core Template**: Carefully edit \`src/templates/TemplateCalendar.tsx\`.
29
+ 2. **Handle UX/UI**: Integrate your changes natively with the existing state, UI elements, and data sync logic without breaking existing functionality.
30
+
31
+ ### ── Architecture & Reusable Components ────────────────────────────────────
32
+ ${COMPONENTS_LIST}
33
+
34
+ ${THEME_INSTRUCTIONS}
35
+
36
+ [DESCRIBE FEATURE TO ADD HERE]`;
@@ -0,0 +1,36 @@
1
+ import { COMPONENTS_LIST, THEME_INSTRUCTIONS } from '../../sharedConstants';
2
+
3
+ export const publicCalendarPrompt = (config: any, title: string, eventsCollection: string, forms: string[] = []) => `I need your help modifying the core Calendar Template which currently powers the "${config?.tabTitle || config?.tabName || title}" tab.
4
+
5
+ This is a core template located at \`src/templates/TemplateCalendar.tsx\`. Any changes you make here will affect ALL calendar views across the application. Do not completely rewrite it from scratch; instead, carefully integrate the requested features into the existing architecture.
6
+
7
+ ### ── Current Tab Configuration (Context) ────────────────────────────────────
8
+ \`\`\`json
9
+ ${JSON.stringify({
10
+ tabName: config?.tabName,
11
+ tabTitle: config?.tabTitle,
12
+ defaultView: config?.defaultView,
13
+ customFields: config?.customFields,
14
+ showButton: config?.showButton,
15
+ }, null, 2)}
16
+ \`\`\`
17
+
18
+ ### ── Data Architecture ───────────────────────────────────────────────────────
19
+ The current tab is configured with:
20
+ - **Firestore Collection**: \`${eventsCollection}\`
21
+ - **Access Level**: PUBLIC/SHARED.
22
+
23
+ ### ── Form Selection ─────────────────────────────────────────────────────────
24
+ Available PUBLIC forms:
25
+ ${forms.length > 0 ? forms.map(f => `- ${f}`).join('\n') : '- No active public forms found'}
26
+
27
+ ### ── Your Mission ────────────────────────────────────────────────────────────
28
+ 1. **Modify the Core Template**: Carefully edit \`src/templates/TemplateCalendar.tsx\`.
29
+ 2. **Handle UX/UI**: Integrate your changes natively with the existing state, UI elements, and data sync logic without breaking existing functionality.
30
+
31
+ ### ── Architecture & Reusable Components ────────────────────────────────────
32
+ ${COMPONENTS_LIST}
33
+
34
+ ${THEME_INSTRUCTIONS}
35
+
36
+ [DESCRIBE FEATURE TO ADD HERE]`;
@@ -0,0 +1,54 @@
1
+ export const adminCrudPrompt = (config: any, recordsCollection: string) => {
2
+ const parsedTabName = (config.tabName || config.pageId || 'admin_page')
3
+ .toLowerCase().replace(/[^a-z0-9]+/g, '_');
4
+ const microName = `${parsedTabName.charAt(0).toUpperCase()}${parsedTabName.slice(1)}Content`;
5
+
6
+ return `I need your help building the inner functionality for an **already existing** Admin View. This view is powered by the \`AdminPageTemplate\` (located at \`src/templates/AdminPageTemplate.tsx\`).
7
+
8
+ The "infrastructure" (routing, header, database connection) is entirely set up and functioning. Your goal is to design the "Dashboard Content" that lives inside this specific admin view.
9
+
10
+ ### ── Current View Configuration ──────────────────────────────────────────────
11
+ \`\`\`json
12
+ ${JSON.stringify({
13
+ viewName: config.tabName,
14
+ viewTitle: config.tabTitle,
15
+ route: config.route,
16
+ template: config.template,
17
+ storageEnabled: !!config.storage,
18
+ showActionButton: !!config.showButton,
19
+ buttonStyle: config.buttonAction || 'primary',
20
+ }, null, 2)}
21
+ \`\`\`
22
+
23
+ ### ── Note on Forms ──────────────────────────────────────────────────────────
24
+ **No forms are needed for this view.** Focus on building the administrative dashboard and management tools requested by the user.
25
+
26
+ ### ── Data & Storage Architecture ─────────────────────────────────────────────
27
+ The app is already configured to handle data for this specific view using these paths:
28
+ - **Firestore Collection**: \`${recordsCollection}\` (Use this for all view data).
29
+ - **Storage Layer**: ${config.storage ? "Enabled. Uploads are handled via \`admin_files/\` folder in Storage and mirrored to a shared Firestore collection for tracking." : "Disabled for this view."}
30
+ - **Access Level**: Full Admin Access. This view is only visible to users with the 'admin' role.
31
+
32
+ ### ── Your Mission ────────────────────────────────────────────────────────────
33
+ 1. **Create the Content Layer**: Design a new micro-component at \`src/microcomponents/${microName}.tsx\`.
34
+ 2. **Handle UX/UI**: Inside this component, build the interface (lists, charts, management forms, or any feature requested).
35
+ 3. **Inject into Template**: Once created, import and place \`<${microName} />\` inside the main content area of \`src/templates/AdminPageTemplate.tsx\`, replacing the current empty state.
36
+
37
+ ### ── Guardrails ─────────────────────────────────────────────────────────────
38
+ - **CRITICAL: DO NOT CREATE A NEW ROUTE OR NAVIGATION TAB.** You are only modifying the inner content of an existing layout.
39
+ - **DO NOT** modify the outer layout of \`AdminPageTemplate.tsx\` (headers, back buttons, dynamic title).
40
+ - **DO NOT** change the routing or export signatures.
41
+ - **DO NOT** create a new page; build the feature *inside* the micro-component.
42
+
43
+ ### ── Aesthetic & Performance (Theme System) ───────────────────────────────
44
+ Build with the user's active theme in mind:
45
+ - **CSS Variables**: \`var(--bg-color)\`, \`var(--fg-color)\`, \`var(--accent-color)\`, \`var(--panel-bg)\`, \`var(--panel-border)\`.
46
+ - **Components**: Re-use \`<Button />\`, \`<Input />\`, \`<ConfirmModal />\`, and \`<DashboardNav />\` natively.
47
+ - **Styles**: Use \`glass-panel\` and \`text-gradient\` for a premium look.
48
+ - **Example**: See \`src/microcomponents/AdminExampleContent.tsx\` for a structural reference.
49
+
50
+ ### ── Important Formatting Rules ──────────────────────────────────────────────
51
+ - **NO REDUNDANT HEADERS**: The parent template already injects a large dynamic page title and action buttons. DO NOT add a main \`<h1>\` or \`<h2>\` page title at the top of your micro-component. Start directly with your cards, lists, or sub-sections.
52
+
53
+ [WHAT FEATURES SHOULD I ADD TO THIS ADMIN VIEW?]`;
54
+ };
@@ -0,0 +1,55 @@
1
+ export const privateCrudPrompt = (config: any, recordsCollection: string, forms: string[] = []) => {
2
+ const parsedTabName = (config.tabName || config.pageId || 'private_page')
3
+ .toLowerCase().replace(/[^a-z0-9]+/g, '_');
4
+ const microName = `${parsedTabName.charAt(0).toUpperCase()}${parsedTabName.slice(1)}Content`;
5
+
6
+ return `I need your help building the inner functionality for an **already existing** Private User View. This view is powered by the \`PrivatePageTemplate\` (located at \`src/templates/PrivatePageTemplate.tsx\`).
7
+
8
+ The "infrastructure" (auth-guards, dynamic routing, navigation menus, database sync) is entirely set up and functioning. Your task is strictly to design the "Dashboard Content" that lives inside this specific user view.
9
+
10
+ ### ── Current View Configuration ──────────────────────────────────────────────
11
+ \`\`\`json
12
+ ${JSON.stringify({
13
+ viewName: config.tabName,
14
+ viewTitle: config.tabTitle,
15
+ route: config.route,
16
+ template: config.template,
17
+ storageEnabled: !!config.storage,
18
+ showActionButton: !!config.showButton,
19
+ availablePrivateForms: forms,
20
+ }, null, 2)}
21
+ \`\`\`
22
+
23
+ ### ── Available Forms ────────────────────────────────────────────────────────
24
+ The following private forms are available in the system. **These are for your information only—do NOT use them unless specifically needed.** Your priority is to listen to the user's specific input and decide if a particular modal, form, or component is actually required for the context of this page:
25
+ ${forms.length > 0 ? forms.map(f => `- ${f}`).join('\n') : '- No private forms found'}
26
+
27
+ ### ── Data & Storage Architecture ─────────────────────────────────────────────
28
+ Every user sees their own unique data on this page. The system is rigged to handle this isolation:
29
+ - **Firestore Collection**: \`${recordsCollection}\`. The template already filters this by \`uid == current_user.uid\`. Use this for all record storage.
30
+ - **Storage Layer**: ${config.storage ? "Enabled. User files are saved to \`user_files/\` and strictly isolated by user ID." : "Disabled for this view."}
31
+ - **Access Level**: Private. Only the owner of the data can view or modify these records.
32
+
33
+ ### ── Your Mission ────────────────────────────────────────────────────────────
34
+ 1. **Create the Content Layer**: Design a new micro-component at \`src/microcomponents/${microName}.tsx\`.
35
+ 2. **Handle UX/UI**: Inside this component, build the interface (lists, personal file managers, specialized forms).
36
+ 3. **Inject into Template**: Once created, import and place \`<${microName} />\` inside the main content area of \`src/templates/PrivatePageTemplate.tsx\`, replacing the current empty state.
37
+
38
+ ### ── Guardrails ─────────────────────────────────────────────────────────────
39
+ - **CRITICAL: DO NOT CREATE A NEW ROUTE OR NAVIGATION TAB.** You are only modifying the inner content of an existing layout.
40
+ - **DO NOT** modify the outer layout of \`PrivatePageTemplate.tsx\` (navigation, top-bar, dynamic title, sidebars).
41
+ - **DO NOT** change the database subscription logic; use the existing \`records\` state if possible or build your own within the microcomponent using the paths provided.
42
+ - Re-use the \`ContactPopup\` component with the available private forms if the user needs to submit requests.
43
+
44
+ ### ── Aesthetic & Performance (Theme System) ───────────────────────────────
45
+ Build with the user's active theme in mind:
46
+ - **CSS Variables**: Use \`var(--bg-color)\`, \`var(--fg-color)\`, \`var(--accent-color)\`, \`var(--panel-bg)\`, \`var(--panel-border)\`.
47
+ - **Components**: Re-use \`<Button />\`, \`<Input />\`, \`<ConfirmModal />\`, and \`<DashboardNav />\` natively.
48
+ - **Styles**: Use \`glass-panel\` and \`text-gradient\` for a premium look.
49
+ - **Example**: See \`src/microcomponents/PrivateExampleContent.tsx\` for a structural reference.
50
+
51
+ ### ── Important Formatting Rules ──────────────────────────────────────────────
52
+ - **NO REDUNDANT HEADERS**: The parent template already injects a large dynamic page title and action buttons. DO NOT add a main \`<h1>\` or \`<h2>\` page title at the top of your micro-component. Start directly with your cards, lists, or sub-sections.
53
+
54
+ [WHAT SHOULD I BUILD INSIDE THIS PRIVATE VIEW?]`;
55
+ };
@@ -0,0 +1,53 @@
1
+ export const sharedCrudPrompt = (config: any, recordsCollection: string) => {
2
+ const parsedTabName = (config.tabName || config.pageId || 'shared_page')
3
+ .toLowerCase().replace(/[^a-z0-9]+/g, '_');
4
+ const microName = `${parsedTabName.charAt(0).toUpperCase()}${parsedTabName.slice(1)}Content`;
5
+
6
+ return `I need your help building the inner functionality for an **already existing** Shared Member View. This view is powered by the \`SharedPageTemplate\` (located at \`src/templates/SharedPageTemplate.tsx\`).
7
+
8
+ The "infrastructure" (real-time sync, collaborative routing) is entirely set up and functioning. Your goal is to design the "Community Content" that lives inside this specific shared view.
9
+
10
+ ### ── Current View Configuration ──────────────────────────────────────────────
11
+ \`\`\`json
12
+ ${JSON.stringify({
13
+ viewName: config.tabName,
14
+ viewTitle: config.tabTitle,
15
+ route: config.route,
16
+ template: config.template,
17
+ storageEnabled: !!config.storage,
18
+ showActionButton: !!config.showButton,
19
+ }, null, 2)}
20
+ \`\`\`
21
+
22
+ ### ── Note on Forms ──────────────────────────────────────────────────────────
23
+ **No forms are needed for this view.** Focus on building the collaborative features and shared content areas requested by the user.
24
+
25
+ ### ── Data & Storage Architecture ─────────────────────────────────────────────
26
+ All logged-in members share the data on this page. The system is configured for collaboration:
27
+ - **Firestore Collection**: \`${recordsCollection}\`. All authenticated users can read and create records here. The template ensures only creators can edit/delete their own items.
28
+ - **Storage Layer**: ${config.storage ? "Enabled. Shared files are saved to \`mem_files/\` and are visible to all members." : "Disabled for this view."}
29
+ - **Access Level**: Shared Member Access. Requires authentication.
30
+
31
+ ### ── Your Mission ────────────────────────────────────────────────────────────
32
+ 1. **Create the Content Layer**: Design a new micro-component at \`src/microcomponents/${microName}.tsx\`.
33
+ 2. **Handle UX/UI**: Inside this component, build the collaborative interface (group lists, message boards, shared resource trackers).
34
+ 3. **Inject into Template**: Once created, import and place \`<${microName} />\` inside the main content area of \`src/templates/SharedPageTemplate.tsx\`, replacing the current empty state.
35
+
36
+ ### ── Guardrails ─────────────────────────────────────────────────────────────
37
+ - **CRITICAL: DO NOT CREATE A NEW ROUTE OR NAVIGATION TAB.** You are only modifying the inner content of an existing layout.
38
+ - **DO NOT** modify the outer layout of \`SharedPageTemplate.tsx\` (shared navigation, header, dynamic title).
39
+ - **DO NOT** change the real-time listener logic; build your feature *inside* the micro-component.
40
+ - **NEVER** expose administrative control settings in this shared view.
41
+
42
+ ### ── Aesthetic & Performance (Theme System) ───────────────────────────────
43
+ Build with the user's active theme in mind:
44
+ - **CSS Variables**: \`var(--bg-color)\`, \`var(--fg-color)\`, \`var(--accent-color)\`, \`var(--panel-bg)\`, \`var(--panel-border)\`.
45
+ - **Components**: Re-use \`<Button />\`, \`<Input />\`, \`<ConfirmModal />\`, and \`<DashboardNav />\` natively.
46
+ - **Styles**: Use \`glass-panel\` and \`text-gradient\` for a premium look.
47
+ - **Example**: See \`src/microcomponents/SharedExampleContent.tsx\` for a structural reference.
48
+
49
+ ### ── Important Formatting Rules ──────────────────────────────────────────────
50
+ - **NO REDUNDANT HEADERS**: The parent template already injects a large dynamic page title and action buttons. DO NOT add a main \`<h1>\` or \`<h2>\` page title at the top of your micro-component. Start directly with your cards, lists, or sub-sections.
51
+
52
+ [WHAT SHARED FEATURE SHOULD I BUILD IN THIS VIEW?]`;
53
+ };
@@ -0,0 +1,32 @@
1
+ import { ADMIN_COMPONENTS, THEME_INSTRUCTIONS } from '../../sharedConstants';
2
+
3
+ export const adminTablePrompt = (config: any, title: string, tableCollection: string) => `I need your help modifying the core Table Template which currently powers the "${config?.tabTitle || config?.tabName || title}" tab.
4
+
5
+ This is a core template located at \`src/templates/TemplateTable.tsx\`. Any changes you make here will affect ALL table views across the application. Do not completely rewrite it from scratch; instead, carefully integrate the requested features into the existing architecture.
6
+
7
+ ### ── Current Tab Configuration (Context) ────────────────────────────────────
8
+ \`\`\`json
9
+ ${JSON.stringify({
10
+ tabName: config?.tabName,
11
+ tabTitle: config?.tabTitle,
12
+ showButton: config?.showButton,
13
+ buttonStyle: config?.buttonStyle,
14
+ showExportButton: config?.showExportButton,
15
+ }, null, 2)}
16
+ \`\`\`
17
+
18
+ ### ── Data Architecture ───────────────────────────────────────────────────────
19
+ The current tab is configured with:
20
+ - **Table Data Collection**: \`${tableCollection}\`
21
+ - **Access Level**: ADMIN ONLY.
22
+
23
+ ### ── Your Mission ────────────────────────────────────────────────────────────
24
+ 1. **Modify the Core Template**: Carefully edit \`src/templates/TemplateTable.tsx\`.
25
+ 2. **Handle UX/UI**: Integrate your changes natively with the existing state (columns, rows, colors) and UI elements.
26
+
27
+ ### ── Architecture & Reusable Components ────────────────────────────────────
28
+ ${ADMIN_COMPONENTS}
29
+
30
+ ${THEME_INSTRUCTIONS}
31
+
32
+ [DESCRIBE FEATURE TO ADD HERE]`;
@@ -0,0 +1,36 @@
1
+ import { COMPONENTS_LIST, THEME_INSTRUCTIONS } from '../../sharedConstants';
2
+
3
+ export const privateTablePrompt = (config: any, title: string, tableCollection: string, forms: string[] = []) => `I need your help modifying the core Table Template which currently powers the "${config?.tabTitle || config?.tabName || title}" tab.
4
+
5
+ This is a core template located at \`src/templates/TemplateTable.tsx\`. Any changes you make here will affect ALL table views across the application. Do not completely rewrite it from scratch; instead, carefully integrate the requested features into the existing architecture.
6
+
7
+ ### ── Current Tab Configuration (Context) ────────────────────────────────────
8
+ \`\`\`json
9
+ ${JSON.stringify({
10
+ tabName: config?.tabName,
11
+ tabTitle: config?.tabTitle,
12
+ showButton: config?.showButton,
13
+ buttonStyle: config?.buttonStyle,
14
+ showExportButton: config?.showExportButton,
15
+ }, null, 2)}
16
+ \`\`\`
17
+
18
+ ### ── Data Architecture ───────────────────────────────────────────────────────
19
+ The current tab is configured with:
20
+ - **Table Data Collection**: \`${tableCollection}\`
21
+ - **Access Level**: PRIVATE.
22
+
23
+ ### ── Form Selection ─────────────────────────────────────────────────────────
24
+ Available PRIVATE forms:
25
+ ${forms.length > 0 ? forms.map(f => `- ${f}`).join('\n') : '- No active private forms found'}
26
+
27
+ ### ── Your Mission ────────────────────────────────────────────────────────────
28
+ 1. **Modify the Core Template**: Carefully edit \`src/templates/TemplateTable.tsx\`.
29
+ 2. **Handle UX/UI**: Integrate your changes natively with the existing state (columns, rows, colors) and UI elements.
30
+
31
+ ### ── Architecture & Reusable Components ────────────────────────────────────
32
+ ${COMPONENTS_LIST}
33
+
34
+ ${THEME_INSTRUCTIONS}
35
+
36
+ [DESCRIBE FEATURE TO ADD HERE]`;
@@ -0,0 +1,36 @@
1
+ import { COMPONENTS_LIST, THEME_INSTRUCTIONS } from '../../sharedConstants';
2
+
3
+ export const publicTablePrompt = (config: any, title: string, tableCollection: string, forms: string[] = []) => `I need your help modifying the core Table Template which currently powers the "${config?.tabTitle || config?.tabName || title}" tab.
4
+
5
+ This is a core template located at \`src/templates/TemplateTable.tsx\`. Any changes you make here will affect ALL table views across the application. Do not completely rewrite it from scratch; instead, carefully integrate the requested features into the existing architecture.
6
+
7
+ ### ── Current Tab Configuration (Context) ────────────────────────────────────
8
+ \`\`\`json
9
+ ${JSON.stringify({
10
+ tabName: config?.tabName,
11
+ tabTitle: config?.tabTitle,
12
+ showButton: config?.showButton,
13
+ buttonStyle: config?.buttonStyle,
14
+ showExportButton: config?.showExportButton,
15
+ }, null, 2)}
16
+ \`\`\`
17
+
18
+ ### ── Data Architecture ───────────────────────────────────────────────────────
19
+ The current tab is configured with:
20
+ - **Table Data Collection**: \`${tableCollection}\`
21
+ - **Access Level**: PUBLIC/SHARED.
22
+
23
+ ### ── Form Selection ─────────────────────────────────────────────────────────
24
+ Available PUBLIC forms:
25
+ ${forms.length > 0 ? forms.map(f => `- ${f}`).join('\n') : '- No active public forms found'}
26
+
27
+ ### ── Your Mission ────────────────────────────────────────────────────────────
28
+ 1. **Modify the Core Template**: Carefully edit \`src/templates/TemplateTable.tsx\`.
29
+ 2. **Handle UX/UI**: Integrate your changes natively with the existing state (columns, rows, colors) and UI elements.
30
+
31
+ ### ── Architecture & Reusable Components ────────────────────────────────────
32
+ ${COMPONENTS_LIST}
33
+
34
+ ${THEME_INSTRUCTIONS}
35
+
36
+ [DESCRIBE FEATURE TO ADD HERE]`;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';