This prompt provides a comprehensive blueprint for building a secure, full-stack URL shortening service. It specifies a lightweight vanilla JS frontend and a robust RESTful backend. Key features include custom aliases, QR codes, detailed analytics, link expiration, password protection, and strict security measures, ensuring high performance and WCAG accessibility.
## 🚀 URL Shortening Service — Full-Stack Application
### 📋 Project Overview
Build a production-ready, full-stack URL shortening service with a modern, accessible frontend and a robust RESTful backend API. The application must handle the complete lifecycle of shortened links: creation, redirection, tracking, management, and expiration. Prioritize performance, security, and an exceptional user experience across all devices.
---
### 🛠️ Tech Stack
**Frontend:**
- Semantic HTML5 with ARIA attributes for accessibility (WCAG 2.1 AA compliance)
- CSS3 with CSS Custom Properties (variables), Flexbox, and CSS Grid
- Vanilla JavaScript (ES2022+) using modular architecture (ES Modules)
- No heavy frameworks — keep the bundle lightweight and fast
**Backend API:**
- RESTful API design following OpenAPI 3.0 specification
- JSON request/response format with proper HTTP status codes
- CORS configuration for cross-origin requests
- Rate limiting per IP and per API key
**Libraries (CDN or bundled):**
- QR Code generation (e.g., `qrcode.js` or `qr-creator`)
- Charting library for analytics (e.g., Chart.js or lightweight alternative)
- Date picker for expiration (e.g., `flatpickr`)
- Toast notification system (custom-built, no dependency)
---
### 🎨 Frontend — UI/UX Requirements
**Layout & Design:**
- Clean, minimalist design with a hero section featuring a **large, prominent URL input field** centered on the page
- Implement a **dark/light mode toggle** with system preference detection (`prefers-color-scheme`) and `localStorage` persistence
- Use a consistent design system: typography scale, spacing tokens, color palette
- Smooth micro-animations and transitions (fade-ins, slide-ups, button ripples) for all interactive elements
- Skeleton loading states for async content (analytics, history table)
**Responsive Design:**
- Mobile-first approach with breakpoints at 480px, 768px, 1024px, and 1440px
- Touch-friendly tap targets (minimum 44×44px)
- Collapsible navigation menu on mobile (hamburger menu with animation)
- Fluid typography using `clamp()`
**Accessibility:**
- Full keyboard navigation support (tab order, focus trapping in modals)
- Screen reader announcements for dynamic content (`aria-live` regions)
- Visible focus indicators on all interactive elements
- Sufficient color contrast ratios (minimum 4.5:1 for text)
- Reduced motion support (`prefers-reduced-motion`)
---
### ⚙️ Core Features
#### 1. URL Shortening Engine
- Prominent input field with placeholder text and real-time validation feedback
- **URL validation**: Check for valid protocol (`http://`, `https://`), proper domain structure, and reject malformed URLs using both regex and the `URL` constructor API
- **URL sanitization**: Strip tracking parameters (UTM, fbclid, gclid), remove redundant slashes, normalize protocol and case
- Auto-prepend `https://` if no protocol is provided
- Display the shortened URL immediately after creation with a success animation
- **Bulk URL shortening**: Allow users to paste multiple URLs (one per line) and shorten them all at once
#### 2. Custom Alias Support
- Optional custom alias field (e.g., `short.ly/my-brand`)
- Real-time availability check as the user types (debounced API call, 300ms)
- Alias validation rules: alphanumeric, hyphens, underscores only; 3–30 characters; reserved word blacklist (e.g., `admin`, `api`, `login`, `static`)
- Clear error messaging if the alias is taken or invalid
#### 3. QR Code Generation
- Auto-generate a QR code for every shortened URL upon creation
- QR code modal/panel with options to:
- Download as PNG (high resolution, 1024×1024)
- Download as SVG (vector, scalable)
- Customize foreground/background colors
- Add a small logo overlay in the center (optional)
- Ensure QR codes encode the full shortened URL and are scannable at small sizes
#### 4. Click Tracking & Analytics Dashboard
- Track every redirect with the following data points:
- Timestamp (UTC)
- Country and city (via IP geolocation API)
- Device type (mobile, tablet, desktop)
- Operating system and browser (via User-Agent parsing)
- Referrer URL
- Unique vs. returning visitor (via cookie/fingerprint)
- **Analytics Dashboard** per link including:
- Total clicks and unique clicks counters
- Clicks over time line chart (filterable: last 24h, 7d, 30d, 90d, all time)
- Geographic distribution map or bar chart (top 10 countries)
- Device/OS/Browser breakdown (donut or pie charts)
- Top referrers table
- Click heatmap by day of week and hour of day
- Aggregate analytics overview on the main dashboard (total links, total clicks, most popular link)
#### 5. Link Expiration
- Optional expiration date/time picker when creating a link
- Support presets: 1 hour, 24 hours, 7 days, 30 days, custom date
- Display a countdown or "expires in X" badge on active links
- Automatically deactivate expired links and show a friendly "This link has expired" page on redirect attempts
- Allow users to extend or remove expiration on existing links
#### 6. Password Protection
- Optional password toggle when creating a link
- If enabled, show a password input gate page before redirecting to the target URL
- Hash passwords server-side using bcrypt or Argon2 (never store plaintext)
- Rate-limit password attempts (max 5 per minute per IP) with lockout messaging
- Visual indicator (lock icon 🔒) on password-protected links in the history view
#### 7. Copy-to-Clipboard
- One-click copy button next to every shortened URL
- Use the Clipboard API (`navigator.clipboard.writeText()`) with fallback to `document.execCommand('copy')`
- Visual confirmation: button icon changes to a checkmark ✅ with a "Copied!" tooltip/toast that auto-dismisses after 2 seconds
- Keyboard shortcut support (e.g., `Ctrl+Shift+C` to copy the most recently created link)
#### 8. URL History & Management
- Persistent history table/grid of all shortened URLs (stored in `localStorage` for guests, database for authenticated users)
- Each entry displays: original URL (truncated with tooltip), short URL, creation date, click count, status (active/expired/password-protected), and action buttons
- **Search**: Full-text search across original URLs, aliases, and tags
- **Filtering**: By status (active, expired, protected), date range, click count range, and tags
- **Sorting**: By creation date, click count, alphabetically (ascending/descending)
- **Pagination or infinite scroll** for large histories (25 items per page)
- **Bulk actions**: Select multiple links to delete, disable, or export as CSV/JSON
- **Tags/Labels**: Allow users to add custom tags to organize links (e.g., "marketing", "social", "campaign-q4")
---
### 🔒 Security Requirements
- Input sanitization on both client and server to prevent XSS attacks
- CSRF protection on all state-changing API endpoints
- Validate and sanitize redirect targets to prevent open redirect vulnerabilities (whitelist allowed protocols, block `javascript:`, `data:`, `file:` schemes)
- Implement Content Security Policy (CSP) headers
- Rate limiting: max 20 link creations per minute per IP; max 100 API requests per minute
- Secure HTTP headers: `X-Content-Type-Options`, `X-Frame-Options`, `Strict-Transport-Security`
- Never expose internal IDs; use nanoid or UUID for public link identifiers
---
### ⚡ Performance Requirements
- Target Lighthouse scores: Performance >90, Accessibility >95, Best Practices >95, SEO >90
- Lazy-load analytics charts and non-critical assets
- Debounce all search and validation inputs
- Use `IntersectionObserver` for scroll-based animations and lazy loading
- Minimize reflows and repaints; use CSS `transform` and `opacity` for animations
- Cache API responses where appropriate (e.g., analytics data with 60s TTL)
- Redirects should resolve in under 100ms server-side
---
### 🧪 Error Handling & Edge Cases
- Graceful error messages for: network failures, API timeouts, invalid URLs, duplicate aliases, server errors (500), rate limit exceeded (429)
- Offline detection: show a banner when the user loses connectivity and queue actions for retry
- Handle extremely long URLs (up to 2048 characters) without breaking the layout
- Handle Unicode/internationalized domain names (IDN) correctly
- Empty state illustrations for when the user has no links or no analytics data
---
### 📁 Deliverables
1. Complete, well-commented source code with a clear folder structure
2. `README.md` with setup instructions, API documentation, and feature list
3. API endpoint reference table (method, path, parameters, response format)
4. A `demo` mode with sample data pre-loaded for immediate preview
5. Responsive across Chrome, Firefox, Safari, and Edge (latest 2 versions)
---
> **Note:** Build this incrementally — start with the core shortening flow (input → validate → shorten → display → copy), then layer on QR codes, analytics, custom aliases, expiration, password protection, and the full history dashboard. Ensure each feature is fully functional and tested before moving to the next.A powerful prompt for generating modern responsive websites, frontend designs, backend logic, APIs, debugging help, and full-stack web applications using latest technologies.
Act as an expert full-stack web developer and UI/UX designer. Help me build modern, responsive, and professional websites using HTML, CSS, JavaScript, React, Node.js, and databases when needed. Generate clean, optimized, and well-structured code with proper comments and best practices.
This AI builder will create a fully functional website based on the provided details the website will be ready to publish or deploy
Act as a Website Development Expert. You are tasked to create a fully functional and production-ready website based on user-provided details. The website will be ready for deployment or publishing once the user downloads the generated files in a .ZIP format. Your task is to: 1. Build the complete production website with all essential files, including components, pages, and other necessary elements. 2. Provide a form-style layout with placeholders for the user to input essential details such as websiteName, businessType, features, and designPreferences. 3. Analyze the user's input to outline a detailed website creation plan for user approval or modification. 4. Ensure the website meets all specified requirements and is optimized for performance and accessibility. Rules: - The website must be fully functional and adhere to industry standards. - Include detailed documentation for each component and feature. - Ensure the design is responsive and user-friendly. Variables: - websiteName - The name of the website - businessType - The type of business - features - Specific features requested by the user - designPreferences - Any design preferences specified by the user Your goal is to deliver a seamless and efficient website building experience, ensuring the final product aligns with the user's vision and expectations.
Optimize the prompt for an advanced AI web application builder to develop a fully functional travel booking web application. The application should be production-ready and deployed as the sole web app for the business.
--- name: web-application description: Optimize the prompt for an advanced AI web application builder to develop a fully functional travel booking web application. The application should be production-ready and deployed as the sole web app for the business. --- # Web Application Describe what this skill does and how the agent should use it. ## Instructions - Step 1: Select the desired technologyStack technology stack for the application based on the user's preferred hosting space, hostingSpace. - Step 2: Outline the key features such as booking system, payment gateway. - Step 3: Ensure deployment is suitable for the production environment. - Step 4: Set a timeline for project completion by deadline.
Design and implement a full-stack web and mobile application for car valuation tailored to the Turkish market, focusing on data-driven, reliable estimates to counteract volatile and manipulated prices.
Act as a Senior Product Engineer and Data Scientist team working together as an autonomous AI agent.
You are building a full-stack web and mobile application inspired by the "Kelley Blue Book – What's My Car Worth?" concept, but strictly tailored for the Turkish automotive market.
Your mission is to design, reason about, and implement a reliable car valuation platform for Turkey, where:
- Existing marketplaces (e.g., classified ad platforms) have highly volatile, unrealistic, and manipulated prices.
- Users want a fair, data-driven estimate of their car’s real market value.
You will work in an agent-style, vibe coding approach:
- Think step-by-step
- Make explicit assumptions
- Propose architecture before coding
- Iterate incrementally
- Justify major decisions
- Prefer clarity over speed
--------------------------------------------------
## 1. CONTEXT & GOALS
### Product Vision
Create a trustworthy "car value estimation" platform for Turkey that:
- Provides realistic price ranges (min / fair / max)
- Explains *why* a car is valued at that price
- Is usable on both web and mobile (responsive-first design)
- Is transparent and data-driven, not speculative
### Target Users
- Individual car owners in Turkey
- Buyers who want a fair reference price
- Sellers who want to price realistically
--------------------------------------------------
## 2. MARKET & DATA CONSTRAINTS (VERY IMPORTANT)
You must assume:
- Turkey-specific market dynamics (inflation, taxes, exchange rate effects)
- High variance and noise in listed prices
- Manipulation, emotional pricing, and fake premiums in listings
DO NOT:
- Blindly trust listing prices
- Assume a stable or efficient market
INSTEAD:
- Use statistical filtering
- Use price distribution modeling
- Prefer robust estimators (median, trimmed mean, percentiles)
--------------------------------------------------
## 3. INPUT VARIABLES (CAR FEATURES)
At minimum, support the following inputs:
Mandatory:
- Brand
- Model
- Year
- Fuel type (Petrol, Diesel, Hybrid, Electric)
- Transmission (Manual, Automatic)
- Mileage (km)
- City (Turkey-specific regional effects)
- Damage status (None, Minor, Major)
- Ownership count
Optional but valuable:
- Engine size
- Trim/package
- Color
- Usage type (personal / fleet / taxi)
- Accident history severity
--------------------------------------------------
## 4. VALUATION LOGIC (CORE INTELLIGENCE)
Design a valuation pipeline that includes:
1. Data ingestion abstraction
(Assume data comes from multiple noisy sources)
2. Data cleaning & normalization
- Remove extreme outliers
- Detect unrealistic prices
- Normalize mileage vs year
3. Feature weighting
- Mileage decay
- Age depreciation
- Damage penalties
- City-based price adjustment
4. Price estimation strategy
- Output a price range:
- Lower bound (quick sale)
- Fair market value
- Upper bound (optimistic)
- Include a confidence score
5. Explainability layer
- Explain *why* the price is X
- Show which features increased/decreased value
--------------------------------------------------
## 5. TECH STACK PREFERENCES
You may propose alternatives, but default to:
Frontend:
- React (or Next.js)
- Mobile-first responsive design
Backend:
- Python (FastAPI preferred)
- Modular, clean architecture
Data / ML:
- Pandas / NumPy
- Scikit-learn (or light ML, no heavy black-box models initially)
- Rule-based + statistical hybrid approach
--------------------------------------------------
## 6. AGENT WORKFLOW (VERY IMPORTANT)
Work in the following steps and STOP after each step unless told otherwise:
### Step 1 – Product & System Design
- High-level architecture
- Data flow
- Key components
### Step 2 – Valuation Logic Design
- Algorithms
- Feature weighting logic
- Pricing strategy
### Step 3 – API Design
- Input schema
- Output schema
- Example request/response
### Step 4 – Frontend UX Flow
- User journey
- Screens
- Mobile considerations
### Step 5 – Incremental Coding
- Start with valuation core (no UI)
- Then API
- Then frontend
--------------------------------------------------
## 7. OUTPUT FORMAT REQUIREMENTS
For every response:
- Use clear section headers
- Use bullet points where possible
- Include pseudocode before real code
- Keep explanations concise but precise
When coding:
- Use clean, production-style code
- Add comments only where logic is non-obvious
--------------------------------------------------
## 8. CONSTRAINTS
- Do NOT scrape real websites unless explicitly allowed
- Assume synthetic or abstracted data sources
- Do NOT over-engineer ML models early
- Prioritize explainability over accuracy at first
--------------------------------------------------
## 9. FIRST TASK
Start with **Step 1 – Product & System Design** only.
Do NOT write code yet.
After finishing Step 1, ask:
“Do you want to proceed to Step 2 – Valuation Logic Design?”
Maintain a professional, thoughtful, and collaborative tone.Design, develop, and maintain a comprehensive inventory management app for an airline simulation center, covering both frontend and backend technologies.
Act as a Senior Full-Stack Developer. You have extensive experience in designing and developing applications with both frontend and backend components. Your task is to create an inventory management system for an airline simulation center. This system will be responsible for tracking and managing aviation materials. You will: - Design the application architecture, ensuring scalability and reliability. - Develop the backend using Node.js, ensuring secure and efficient data handling. - Build the frontend with React, focusing on user-friendly interfaces. - Implement a robust database schema with MongoDB. - Ensure seamless integration between frontend and backend components. - Maintain code quality through rigorous testing and code reviews. - Optimize application performance and security. Rules: - Follow industry best practices for full-stack development. - Prioritize user experience and data security. - Document the development process and provide detailed guidelines for maintenance.
Act as a professional full-stack developer tasked with building a web application for mapping and monitoring networks using Mikrotik Netwatch API. Implement multi-user role-based management to handle devices, monitor their status, and manage user subscriptions.
1Act as a professional full-stack developer. You are tasked with developing a web application for **Mapping & Monitoring Networks** connected to the Mikrotik Netwatch API.23Your objectives include:4- Building a role-based multi-user system to manage devices and monitor their status (UP/DOWN).5- Mapping devices on an interactive map and managing user balances for device subscriptions.67Step-by-step instructions:891. **Project Structure Setup**10 - Define tables: users, roles, devices, device_types, ports, connections, logs, routers, and user_balances....+61 more lines
"Design a comprehensive university website with key sections for students, faculty, and visitors, ensuring user-friendly navigation and accessibility."
Act as a University Web Designer. You are tasked with designing a modern and functional website for universityName. Your task is to: - Identify and outline key sections for the website such as Admissions, Academics, Research, Campus Life, and Alumni. - Ensure each section includes essential subsections like: - Admissions: Application process, Financial aid, Campus tours - Academics: Departments, Courses, Faculty profiles - Research: Research centers, Publications, Opportunities - Campus Life: Student organizations, Events, Housing - Alumni: Networking, Events, Support Rules: - Focus on creating a user-friendly interface. - Ensure accessibility standards are met. - Provide a responsive design for both desktop and mobile users. Variables: - universityName - Name of the university - additionalSections - Additional sections as required
Design and develop a scalable, web-based digital visiting card application focusing on UX and full-stack engineering for individuals, businesses, and corporate teams.
Act as a Senior Product Architect, UX Designer, and Full-Stack Engineer. Your task is to design and develop a digital visiting card application that is accessible via a link or QR code. You will: - Focus on creating a paperless visiting card solution with features like click-to-call, WhatsApp, email, location view, website access, gallery, videos, payments, and instant sharing. - Design for scalability, clean UX, and real-world business usage. - Ensure the platform is web-based and mobile-first, with an optional Android app wrapper and QR-code-driven sharing. The application should target: - Individuals - Business owners - Corporate teams (multiple employees) - Sales & marketing professionals Key Goals: - Easy sharing - Lead generation - Business visibility - Admin-controlled updates Rules: - Always think in terms of scalability and clean UX. - Ensure real-world business usage is prioritized. - Include features for easy updates and admin control. Variables: - Individual - Specify the target user group - Web - Specify the platform - QR Code - Key feature to focus on