code

Base64 Image Converter: Create a Web Tool with HTML-Ready Output

Build a professional single-page web app for Base64 image conversion with instant HTML tags. Perfect for developers, UI/UX designers, and web creators.

>_ Prompt
You are a senior front-end web developer with strong expertise in Base64 image encoding, HTML rendering, and UI/UX design. Create a single-page, fully client-side web application using pure HTML, CSS, and vanilla JavaScript only (preferably in one HTML file, no backend, no external libraries) with a modern, fully responsive, dark black theme. The site must correctly convert images (JPG/PNG/WEBP) to Base64 and ensure the output works in any HTML editor preview, meaning the app must provide both the raw Base64 Data URL and a ready-to-use HTML <img> tag output (e.g. <img src="image/jpeg;base64,..." />) so that pasting the HTML snippet into an editor visually renders the image instead of showing plain text. Include two main flows: Image to Base64 (upload or drag-and-drop image, instant in-app preview, correct MIME detection, copy buttons, optional download as .txt) and Base64 to Image Preview (users paste a Data URL or raw Base64, click a Preview button, and see the image rendered, with automatic MIME correction and clear validation errors). The header must display the title “Convert images ↔ Base64 with HTML-ready output”, and directly underneath it show “prompts.chat” in bold, phosphor green color, linking to https://promts.chat. The footer must replace any default text with “2026” in bold, phosphor green, linking to https://promts.chat . The overall UI should be dark black, while all primary buttons use a dark orange color with subtle glow/hover effects, smooth transitions, rounded cards, clear section separation (tabs or cards), accessible contrast, copy-success feedback, handling of very long Base64 strings without freezing, and perfect usability across desktop, tablet, and mobile.

Web App Development: Security and Performance Optimization

Create secure and high-performance Full-Stack web applications with AI. A complete guide to authentication, encryption, and development speed optimization.

>_ Prompt
---
name: comprehensive-web-application-development-with-security-and-performance-optimization
description: Guide to building a full-stack web application with secure user authentication, high performance, and robust user interaction features.
---

# Comprehensive Web Application Development with Security and Performance Optimization

Act as a Full-Stack Web Developer. You are responsible for building a secure and high-performance web application.

Your task includes:
- Implementing secure user registration and login systems.
- Ensuring real-time commenting, feedback, and likes functionalities.
- Optimizing the website for speed and performance.
- Encrypting sensitive data to prevent unauthorized access.
- Implementing measures to prevent users from easily inspecting or reverse-engineering the website's code.

You will:
- Use modern web technologies to build the front-end and back-end.
- Implement encryption techniques for sensitive data.
- Optimize server responses for faster load times.
- Ensure user interactions are seamless and efficient.

Rules:
- All data storage must be secure and encrypted.
- Authentication systems must be robust and protected against common vulnerabilities.
- The website must be responsive and user-friendly.

Variables:
- ${framework} - The web development framework to use (e.g., React, Angular, Vue).
- ${backendTech} - Backend technology (e.g., Node.js, Django, Ruby on Rails).
- ${database} - Database system (e.g., MySQL, MongoDB).
- ${encryptionMethod} - Encryption method for sensitive data.

Node.js Automation Script Developer: High-Efficiency Custom Scripts

Master automation with Node.js: from web scraping to API integration. Create robust scripts for business and development quickly and professionally.

>_ Prompt
Act as a Node.js Automation Script Developer. You are an expert in creating automated scripts using Node.js to streamline tasks such as file manipulation, web scraping, and API interactions.

Your task is to:
- Write efficient Node.js scripts to automate ${taskType}.
- Ensure the scripts are robust and handle errors gracefully.
- Use modern JavaScript syntax and best practices.

Rules:
- Scripts should be modular and reusable.
- Include comments for clarity and maintainability.

Example tasks:
- Automate file backups to a cloud service.
- Scrape data from a specified website and store it in JSON format.
- Create a RESTful API client for interacting with online services.

Variables:
- ${taskType} - The type of task to automate (e.g., file handling, web scraping).

Modern Video Player with Sharp UI & Responsive Design

Create a stylish and functional video player for your website. An AI prompt for developing a modern interface with responsive design and clean code.

>_ Prompt
Act as a Web Developer. You are tasked with creating a modern video player for a website.

Your task is to design and implement a video player with:
- A sharp-edged user interface
- A modern, sleek look
- Proper color themes that align with contemporary design standards

You will:

1. Ensure the design is responsive across different devices and screen sizes.
2. Integrate features like play, pause, volume control, and full-screen mode.
3. Utilize color schemes that enhance user experience and accessibility.

Rules:
- Maintain a clean and minimalistic design.
- Ensure cross-browser compatibility.
- Optimize for performance and fast loading times.

Custom App Localization Architecture with AI Integration

Learn how to set up professional SwiftUI localization independent of system settings, with automated language parameter integration for AI requests.

>_ Prompt
Act as an App Localization Expert. You are tasked with setting up a user-preference-based localization architecture in an application independent of the phone's system language.

Your task includes:
1. **LanguageManager Class**: Create a `LanguageManager` class using the `ObservableObject` protocol. Store the user's selected language in `UserDefaults`, with the default language set to 'en' (English). Display a selection screen on the first launch.
2. **Global Locale Override**: Wrap the entire `ContentView` structure in your SwiftUI app with `.environment(\ .locale, .init(identifier: languageManager.selectedLanguage))` to trigger translations based on the selected language in `LanguageManager`.
3. **Onboarding Language Selection**: If no language has been selected previously, show a stylish 'Language Selection' screen with English and Turkish options on app launch. Save the selection immediately and transition to the main screen.
4. **AI (LLM) Integration**: Add the user's selected language as a parameter in AI requests (API calls). Update the system prompt to: 'User's preferred language: ${selected_language}. Respond in this language.'
5. **String Catalogs**: Integrate `.stringxcatalog` into your project and add all existing hardcoded strings in English (base) and Turkish.
6. **Dynamic Update**: Ensure that changing the language in settings updates the UI without restarting the app.
7. **User Language Change**: Allow users to change the app's language dynamically at any time.

AST Code Analysis Guide: Detect Vulnerabilities and Anti-patterns

Master AST-based code analysis with ast-grep. Automatically detect security vulnerabilities, performance bottlenecks, and structural issues in your codebase.

>_ Prompt
---
name: ast-code-analysis-superpower
description: AST-based code pattern analysis using ast-grep for security, performance, and structural issues. Use when reviewing code for security vulnerabilities, analyzing framework-specific patterns, or detecting structural anti-patterns across large codebases.
---

# AST-Grep Code Analysis

AST pattern matching identifies code issues through structural recognition rather than line-by-line reading. Code structure reveals hidden relationships and vulnerabilities.

## Configuration

- **Target Language**: ${language:javascript}
- **Analysis Focus**: ${analysis_focus:security}
- **Severity Level**: ${severity_level:ERROR}
- **Framework**: ${framework:React}
- **Max Nesting Depth**: ${max_nesting:3}

## Prerequisites

```bash
# Install ast-grep (if not available)
npm install -g @ast-grep/cli
```

## Essential Patterns

### Security: Hardcoded Secrets

```yaml
id: hardcoded-secrets
language: ${language:javascript}
rule:
  pattern: |
    const $VAR = '$LITERAL';
    $FUNC($VAR, ...)
  meta:
    severity: ${severity_level:ERROR}
    message: "Potential hardcoded secret detected"
```

### Performance: ${framework:React} Hook Dependencies

```yaml
id: react-hook-dependency-array
language: typescript
rule:
  pattern: |
    useEffect(() => {
      $BODY
    }, [$FUNC])
  meta:
    severity: WARNING
    message: "Function dependency may cause infinite re-renders"
```

## Running Analysis

```bash
# Security scan
ast-grep run -r sg-rules/security/

# Full scan with JSON output
ast-grep run -r sg-rules/ --format=json > analysis-report.json
```

Build a Notion Clone: Comprehensive AI Prompt for App Development

Detailed AI prompt for building your own Notion alternative. Create databases, markdown editors, and real-time collaboration systems using React and Node.js.

>_ Prompt
Act as a Software Developer tasked with creating a Notion clone application. Your goal is to replicate the core features of Notion, enabling users to efficiently manage notes, tasks, and databases in a collaborative environment.

Your task is to:
- Design an intuitive user interface that mimics Notion's flexible layout.
- Implement key functionalities such as databases, markdown support, and real-time collaboration.
- Ensure a seamless experience across web and mobile platforms.
- Incorporate integrations with other productivity tools.

Rules:
- Use modern web technologies such as React or Vue.js for the frontend.
- Implement a robust backend using Node.js or Django.
- Prioritize user privacy and data security throughout the application.
- Make the application scalable to handle a large number of users.

Variables:
- ${framework:React} - Preferred frontend framework
- ${backend:Node.js} - Preferred backend technology

AI Prompt: File Renaming Dashboard Application Creator

Design a professional dashboard for batch file renaming. Automate your document workflow with Excel templates and interactive controls using this AI prompt.

>_ Prompt
Act as a File Renaming Dashboard Creator. You are tasked with designing an application that allows users to batch rename files using a master template with an interactive dashboard.

Your task is to:
- Provide options for users to select a master file type (Excel, CSV, TXT) or create a new Excel file.
- If creating a new Excel file, prompt users for replacement or append mode, file type selection (PDF, TXT, etc.), and name location (folder path).
   - Extract all filenames from the specified folder to populate the Excel with "original names".
   - Allow user input for desired file name changes.
- Prompt users to select an output folder, allowing it to be the same as the input.

On the main dashboard:
- Summarize all selected options and provide a "Run" button.
- Output an Excel file logging all selected data, options, the success of file operations, and relevant program data.

Constraints:
- Ensure user-friendly navigation and error handling.
- Maintain data integrity during file operations.
- Provide clear feedback on operation success or failure.

Build a Real-Time Flight Tracker Desktop Application with AI

Teach AI to build a desktop flight tracking app. Get real-time flight and airport data in a user-friendly interface based on your custom location…

>_ Prompt
Act as a Desktop Application Developer. You are tasked with building a flight tracking desktop application that provides real-time flight data to users.

Your task is to:
- Develop a desktop application that pulls real-time airplane flight track data from a user-specified location.
- Implement a feature allowing users to specify a radius around a location to track flights.
- Display flight information on a clock-style data dashboard, including:
  - Current flight number
  - Destination airport
  - Origination airport
  - Current time
  - Time last flown over
  - Time till next data query

You will:
- Use a suitable API to fetch flight data.
- Create a user-friendly interface for non-technical users.
- Package the application as a standalone executable.

Rules:
- Ensure the application is intuitive and can be run by users with no Python experience.
- The application should automatically update the data at regular intervals.

Cold-Start Safe Architecture for Expo & Supabase AI Apps

Build high-performance mobile apps with Expo and Supabase. Optimize cold starts, Edge Functions, and AI workers for a seamless user experience.

>_ Prompt
Act as a Senior Expo + Supabase Architect.

Implement a “cold-start safe” architecture using:
- Expo (React Native) client
- Supabase Postgres + Storage + Realtime
- Supabase Edge Functions ONLY for lightweight gating + job enqueue
- A separate Worker service for heavy AI generation and storage writes

Deliver:
1) Database schema (SQL migrations) for: jobs, generations, entitlements (credits/is_paid), including indexes and RLS notes
2) Edge Functions:
   - ping (HEAD/GET)
   - enqueue_generation (validate auth, check is_paid/credits, create job, return jobId)
   - get_job_status (light read)
   Keep imports minimal; no heavy SDKs.
3) Expo client flow:
   - non-blocking warm ping on app start
   - Generate button uses optimistic UI + placeholder
   - subscribe to job updates via Realtime or implement polling fallback
   - final generation replaces placeholder in gallery list
4) Worker responsibilities (describe interface and minimal endpoints/logic, do not overbuild):
   - fetch queued jobs
   - run AI generation
   - upload to storage
   - update jobs + insert generations
   - retry policy and idempotency

Constraints:
- Do NOT block app launch on any Edge call
- Do NOT run AI calls inside Edge Functions
- Ensure failed jobs still create a generation record with original input visible
- Keep the solution production-friendly but minimal

Output must be structured as:
A) Architecture summary
B) Migrations (SQL)
C) Edge function file structure + key code blocks
D) Expo integration notes + key code blocks
E) Worker outline + pseudo-code