Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 42 additions & 45 deletions README.md

Large diffs are not rendered by default.

36 changes: 0 additions & 36 deletions prompts/apps/cleanup-pages.prompt.md

This file was deleted.

45 changes: 45 additions & 0 deletions prompts/auth/set-login-as-default-page.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!-- DESCRIPTION: This prompt guides the user/agent to set the Login page as the default landing page ('/') while maintaining the existing '/login' route for compatibility. -->

<!-- VIDEO_ID: 9bZkp7q19f0 -->

<!-- AGENT: GEMINI 3 PRO -->

Please configure the React routing to make the Login page as the default starting page of the application (`/`).

Follow these specific requirements:
1. **Modify `src/routes/index.tsx`**:
* Remove the default Landing Page route that is currently serving `/`.
* Ensure `LoginRoutes` is imported and included in the `createBrowserRouter` array.

2. **Modify `src/routes/LoginRoutes.tsx`**:
* Change the login route definition to serve at the root path `/`.
* **Crucially**, keep the existing `login` path (`/login`) as well. This is to ensure that redirects (like after logout) that point to `/login` do not break.
* The `LoginRoutes` structure should handle both `/` and `/login` pointing to the login component (e.g., `<JwtAuthLogin />`).

## Example Expected Changes

**In `src/routes/index.tsx`:**
Remove the landing page block:
```tsx
// REMOVE THIS BLOCK
// {
// path: '/',
// element: <SimpleLayout layout={SimpleLayoutType.LANDING} enableElevationScroll />,
// children: [
// {
// index: true,
// element: <PagesLanding />
// }
// ]
// },
```

**In `src/routes/LoginRoutes.tsx`:**
Update the children array for your auth provider (e.g., JWT):
```tsx
children: [
{ path: '/', element: <JwtAuthLogin /> }, // NEW: Default route
{ path: 'login', element: <JwtAuthLogin /> }, // KEEP: For compatibility/redirects
// ... other existing routes
]
```
Original file line number Diff line number Diff line change
@@ -1,87 +1,76 @@
<!-- DESCRIPTION: The "Global Rebrand" Prompt
This prompt completely rebrands the application by replacing the Project Name, Text References, Metadata, and Logo Alt Text. -->
<!-- DESCRIPTION: The "Global Rebrand" Prompt This prompt completely rebrands the application by replacing the Project Name, Text References, Metadata, and Logo Alt Text. -->

<!-- AGENT: [Gemini 3.0 Pro] -->
<!-- VIDEO_ID: 9bZkp7q19f0 -->

Act as a Senior Frontend Developer. Your goal is to rebrand this application from **{{OLD_BRAND}}** to **{{NEW_BRAND}}** with ZERO errors. You must update all configuration files, global text references, and asset pointers.
<!-- AGENT: Gemini 3.0 Pro -->

**INPUT VARIABLES:**
Your goal is to rebrand this application from **{{OLD_BRAND}}** to **{{NEW_BRAND}}** with ZERO errors. You must update all configuration files, global text references, and asset pointers.

**INPUT VARIABLES:**
- **Old Brand:** `{{OLD_BRAND}}` (e.g., Mantis)
- **New Brand:** `{{NEW_BRAND}}` (e.g., Able Pro)
- **New Package Name:** `{{NEW_PACKAGE_NAME}}` (e.g., able-pro-react-js)
- **New Package Name:** `{{NEW_PACKAGE_NAME}}` (e.g., able-pro-react-ts)

---

### **Step 1: Global Text Replacement**

**Action:**

1. **Case Sensitive Search:** Search for `{{OLD_BRAND}}` and replace with `{{NEW_BRAND}}` in all text files (excluding `node_modules`).
2. **Lowercase Search:** Search for `{{OLD_BRAND_LOWER}}` (lowercase) and replace with `{{NEW_BRAND_LOWER}}` (lowercase).
- _Constraint:_ Do NOT replace external library names (e.g., `mantis-ui` if it is a third-party dependency) unless you are sure it is an internal package.
- _Constraint:_ Check URLs carefully. Update links to documentation or repositories if they should point to the new brand, but keep them if they are historical references.
* *Constraint:* Do NOT replace external library names (e.g., `mantis-ui` if it is a third-party dependency) unless you are sure it is an internal package.
* *Constraint:* Check URLs carefully. Update links to documentation or repositories if they should point to the new brand, but keep them if they are historical references.

---

### **Step 2: Update Configuration Files**

**Target File:** `package.json`
**Action:**

1. Update `"name"` property to `{{NEW_PACKAGE_NAME}}`.
2. Update `"description"` references.

**Target File:** `public/index.html`
**Action:**

1. Update `<title>` to `{{NEW_BRAND}} React Admin Dashboard`.
2. Update `<meta name="title">` and `<meta name="description">` content.

**Target File:** `README.md`
**Action:**

1. Replace the H1 title with `{{NEW_BRAND}} Material React Admin Template`.
2. Update installation steps and descriptions to reflect `{{NEW_BRAND}}`.

---

### **Step 3: Update Components & Assets**

**Target File:** `src/components/logo/LogoMain.jsx` & `src/components/logo/LogoIcon.jsx`
**Target File:** `src/components/logo/LogoMain.tsx` & `src/components/logo/LogoIcon.tsx`
**Action:**

1. Update the `alt` text for images/SVGs to `{{NEW_BRAND}}`.
```jsx
```tsx
// Example
alt = "{{NEW_BRAND}}";
alt="{{NEW_BRAND}}"
```

**Target File:** `src/layout/Dashboard/Drawer/DrawerHeader/index.jsx`
**Target File:** `src/layout/Dashboard/Drawer/DrawerHeader/index.tsx`
**Action:**

1. Ensure the Logo component is correctly wrapped and accessible.

**Target File:** `src/layout/Dashboard/Footer.jsx`
**Target File:** `src/layout/Dashboard/Footer.tsx`
**Action:**

1. Update copyright text to reflect the new brand or company if applicable.

---

### **Step 4: Landing Page & Content Updates**

**Target Directories:** `src/sections/landing/`, `src/pages/`
**Action:**

1. Iterate through all Landing Page blocks (Header, Feature, Demo, Testimonial, etc.).
2. Replace marketing copy: "Welcome to {{OLD_BRAND}}" -> "Welcome to {{NEW_BRAND}}".
3. Update `alt` tags in `CardMedia` or `img` elements: `alt="{{OLD_BRAND}}"` -> `alt="{{NEW_BRAND}}"`.

---

### **Final Verification Checklist**

- [ ] `package.json` name is updated.
- [ ] Browser tab title reads `{{NEW_BRAND}}...`.
- [ ] "Welcome to {{OLD_BRAND}}" no longer appears on the Landing Page.
Expand Down
53 changes: 53 additions & 0 deletions prompts/core/remove-section.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!--
DESCRIPTION: When triggered, the agent must immediately begin making changes to the codebase. It handles file deletion, routing updates, menu cleanup, and surgical removal.
-->

<!-- VIDEO_ID: 9bZkp7q19f0 -->

<!-- AGENT: Project Cleanup Specialist -->

# Task: Execute Dynamic Page & Section Removal

**CRITICAL:** This is not a planning task. You are authorized and required to use your tools (`run_command`, `replace_file_content`, `multi_replace_file_content`) to permanently modify the codebase based on the parameters below.

## Target Items

- **Pages to Remove (Paths):** {{PAGE_PATHS}}
- **Sections to Remove (Names/Labels):** {{SECTION_NAMES}}

## Execution Workflow

### 1. Identify and Delete Pages

For every entry in `{{PAGE_PATHS}}`:

1. **Delete Files:** Use `run_command` (e.g., `rm -rf`) to permanently delete the file or directory.
2. **Clean Routes:** Open `src/routes/` files and delete the route objects and imports associated with these paths.
3. **Clean Sidebar/Menu:** Open `src/menu-items/` files and remove the corresponding menu objects.
4. **Clean Loadables:** Search for any `Loadable` wrappers for these paths and remove them.

### 2. Surgical Section Removal

For every section name in `{{SECTION_NAMES}}`:

1. **Locate:** Search for the component name or specific text label across the project.
2. **Surgical Strike:** Identify the parent wrapper (Grid, Stack, Card) and remove the entire block.
3. **Purge Imports:** Immediately remove the imports for the deleted sections and any unused local state/variables.

### 3. Integrated Cleanup & Verification

1. **Lint Fixes:** Check for and fix any "unused import" or "broken reference" errors introduced by these removals.
2. **Empty Containers:** Remove any structural wrappers that are now empty.

## Strict Rules

1. **Immediate Execution:** Start making changes immediately. Do not ask for confirmation for specific files once the paths are provided.
2. **Atomic Commits (Optional):** If possible, group related deletions.
3. **No Placeholders:** If you remove a section, ensure the layout remains balanced.

---

**INPUT PROVIDED:**

- **PAGE_PATHS:** {{PAGE_PATHS}}
- **SECTION_NAMES:** {{SECTION_NAMES}}
41 changes: 41 additions & 0 deletions prompts/core/scroll-to-top.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!-- DESCRIPTION: Add Scroll to Top Button to Landing Page: Implement a floating "Scroll to Top" button specifically for the Landing Page to improve navigation on long scrollable content. -->

<!-- VIDEO_ID: 9bZkp7q19f0 -->

<!-- AGENT: Claude Opus 4.5 -->

## Requirements

### 1. Feature Description
Add a **Floating "Scroll to Top" Button** to the Landing Page (`src/pages/landing.tsx`).
- **Behavior**: The button should appear when the user scrolls down (e.g., > 200px) and disappear when at the top.
- **Action**: Clicking the button should smoothly scroll the window back to the top.
- **Positioning**: Fixed at the bottom-right corner, ensuring it doesn't overlap with the existing "Preset Color" switcher if present.
- **Styling**: Circular Floating Action Button (FAB) with primary theme color.

### 2. Files to Modify/Create

| File | Action | Purpose |
|------|--------|---------|
| `src/components/ScrollToTopButton.tsx` | **CREATE** | Reusable Scroll to Top button component (if not exists) |
| `src/pages/landing.tsx` | **MODIFY** | Import and add the button to the landing page layout |

---

### 3. Implementation Details

#### **1. Reusable Component (`src/components/ScrollToTopButton.tsx`)**

If this component doesn't exist yet, create it. It uses `useScrollTrigger` for visibility.

### 4. Positioning Considerations
- The Landing page currently has a "Preset Color" switcher that slides in at `bottom: { xs: 0, sm: '25%' }` and `right: { xs: 0, sm: 16 }`.
- Ensure `ScrollToTopButton` is positioned to avoid collision, e.g., `bottom: 30px` and `right: 30px`.
- Since the Preset Color switcher takes up vertical space on the side, moving the ScrollToTop button to **bottom-right** (standard) is fine, as the color switcher is `bottom: 25%` (approx middle-bottom-right).

## Acceptance Criteria
- [ ] Scroll to Top button appears after scrolling down 200px.
- [ ] Button is hidden when at the top of the page.
- [ ] Clicking smoothly scrolls to top.
- [ ] Button does not overlap with the existing Color Preset switcher.
- [ ] Consistent styling with the rest of the Landing page.
43 changes: 43 additions & 0 deletions prompts/layouts/remove-group-title.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!-- DESCRIPTION: This prompt is used to remove group titles (section headers) from the menu drawer sidebar navigation -->

<!-- VIDEO_ID: 9bZkp7q19f0 -->

<!-- AGENT: Claude Opus 4.5 (Thinking) -->

I want to **remove the group titles (section headers) from the menu drawer sidebar**.

Currently, the sidebar navigation shows group titles like "Dashboard", "Widget", "Applications", etc. above each section. I want to hide/remove these titles while keeping all the menu items and their functionality intact.

**Rules for Execution:**

1. **Locate the NavGroup Component:**
* Find the component responsible for rendering navigation groups in the drawer
* Identify where the group titles are rendered using the `subheader` prop

2. **Remove Group Titles:**
* Modify the subheader to not render the title typography
* Keep only a divider as the subheader, or remove it entirely if no separator is needed

3. **Adjust Spacing:**
* Update any spacing/margin that was added specifically for the title display

4. **Preserving Functionality:**
* Keep all menu items and navigation working
* Keep collapse/expand functionality
* Keep icons and tooltips
* Keep mini drawer behavior
* Do NOT delete any routes or components

5. **Final Verification:**
* Ensure the application builds without errors
* Verify the sidebar still functions correctly (click navigation, collapse menus)
* Test in both expanded and mini drawer modes

## Example

**Input:**
Remove all group titles from the sidebar

**Output:**
* Modified the NavGroup component to not render group titles
* **Result:** Sidebar now shows menu items without section headers, with optional dividers between groups
Loading