PromptsVault AI is thinking...
Searching the best prompts from our community
Searching the best prompts from our community
Top-rated prompts for Web Dev
Conduct Solidity smart contract security audit. Checklist: 1. Reentrancy vulnerability check. 2. Integer overflow/underflow analysis. 3. Access control verification (modifiers). 4. Gas optimization review. 5. External call safety. 6. Front-running mitigation. 7. Logic error detection. 8. Test coverage analysis (Hardhat/Foundry). Include formal verification results.
Build a conversion-optimized checkout experience. Requirements: 1. Three-step progress indicator (Information → Shipping → Payment). 2. Auto-save form data to localStorage with debouncing. 3. Real-time address validation using Google Places API. 4. Dynamic shipping cost calculator based on location. 5. Express checkout options (Apple Pay, Google Pay). 6. Trust badges and security indicators. 7. Mobile-first responsive design with sticky CTA. 8. Abandoned cart recovery email trigger. Use React Hook Form for validation and Stripe for payment processing.
Optimize React Native app performance. Checklist: 1. Analyze bundle size and startup time. 2. Implement FlatList optimizations (windowSize, initialNumToRender). 3. Memoize heavy computations with useMemo/useCallback. 4. Optimize image loading and caching. 5. Remove unnecessary re-renders using React.memo. 6. Offload complex logic to native modules. 7. Monitor frame drops (FPS) with Perf Monitor. 8. Profile memory usage and fix leaks. Include interaction to next paint (INP) improvements.
Envision a VR history classroom in 2030. Scene: Students visiting Ancient Rome. Features: Haptic feedback, AI characters, interactive artifacts. Benefits: Immersion, retention, accessibility. Challenges: Motion sickness, cost.
Build WebXR product viewer for e-commerce. Features: 1. 3D model loading (glTF/GLB). 2. AR placement on real-world surfaces (hit testing). 3. Touch gestures for rotation and scaling. 4. Lighting estimation for realism. 5. Fallback for non-XR devices (3D model viewer). 6. Annotations on model parts. 7. Animation playback controls. 8. Performance optimization (draco compression). Include 'View in Room' button integration.
Build content-driven sites with Contentful. Setup: 1. Define content models in Contentful. 2. GraphQL or REST API for content. 3. Rich text rendering with @contentful/rich-text-react-renderer. 4. Preview mode for editors. 5. Localization support. 6. Asset optimization and delivery. 7. Webhooks for build triggers. 8. TypeScript types from content models. Use with Next.js ISR for dynamic static sites.
Implement charts quickly with Chart.js. Chart types: 1. Line charts for trends. 2. Bar charts for comparisons. 3. Pie/Doughnut for proportions. 4. Radar for multi-axis data. 5. Scatter for correlations. 6. Mixed chart types. 7. Responsive and accessible. 8. Plugin system for customization. Use react-chartjs-2 wrapper and implement real-time updating with data push.
Implement navigation in React Native apps. Patterns: 1. Stack navigator for hierarchical screens. 2. Tab navigator for main sections. 3. Drawer navigator for side menu. 4. Deep linking and universal links. 5. Screen transitions and gestures. 6. Nested navigators composition. 7. Authentication flow routing. 8. Persistent navigation state. Use React Navigation v6 with TypeScript for type-safe routes and implement header customization.
Create custom CMS with Sanity.io. Architecture: 1. Schema definitions with Sanity Studio. 2. Portable Text for rich content. 3. Real-time collaboration. 4. GROQ query language. 5. Custom input components. 6. Image pipeline with hotspot. 7. Versioning and drafts. 8. Live preview integration. Deploy studio separately or with app. Use @sanity/client and implement incremental builds.
Build with Supabase as backend. Features: 1. PostgreSQL database with REST API. 2. Auto-generated APIs from schema. 3. Authentication (email, OAuth, magic links). 4. Row-level security policies. 5. Real-time subscriptions. 6. Storage for files. 7. Edge functions for serverless. 8. TypeScript SDK. Use supabase.from() for queries and implement triggers for complex logic.
Implement progressive enhancement with htmx. Pattern: 1. Server-rendered HTML with hx-get attributes. 2. Partial page updates without full reload. 3. hx-trigger for various events (click, scroll, intersect). 4. hx-swap strategies (innerHTML, outerHTML, beforeend). 5. Loading indicators with hx-indicator. 6. Form validation with server-side logic. 7. WebSocket updates with hx-ws. 8. Graceful fallback for no-JS scenarios. Use with Express or Django for HTML-over-the-wire architecture.
Enable real-time features with Socket.io. Implementation: 1. Server-side io instance. 2. Client-side connection. 3. Emit and on for events. 4. Rooms for group messaging. 5. Broadcasting to multiple clients. 6. Acknowledgements for reliability. 7. Middleware for authentication. 8. Automatic reconnection. Use with Redis adapter for scaling across servers and implement presence detection.
Build comprehensive E2E testing with Playwright. Test structure: 1. Page Object Model for maintainability. 2. Multi-browser testing (Chromium, Firefox, WebKit). 3. Parallel test execution. 4. Visual regression with screenshots. 5. Network mocking and interception. 6. Authentication state persistence. 7. Trace viewer for debugging. 8. CI/CD integration with GitHub Actions. Use fixtures for test data, implement retry logic, and generate HTML reports with test results.
Build modern iOS apps with SwiftUI. Components: 1. View protocol for custom views. 2. @State and @Binding for local state. 3. @ObservedObject for external state. 4. List with ForEach for collections. 5. Navigation with NavigationStack. 6. Async/await for data loading. 7. Custom view modifiers. 8. Animations with withAnimation. Use Combine for reactive programming and implement dark mode support with @Environment.
Create a resumable PWA using Qwik's unique architecture. Requirements: 1. Instant interactivity with 0 hydration. 2. Service worker for offline capability. 3. Lazy-load components on interaction. 4. Streaming SSR with early hints. 5. Smart prefetching based on viewport. 6. App shell pattern for navigation. 7. Push notifications integration. 8. Install prompt with custom UI. Use Qwik City for routing and resumability for instant TTI even on slow networks.
Build type-safe APIs with tRPC. Architecture: 1. Define routers with input/output schemas. 2. Zod for runtime validation. 3. Automatic TypeScript inference. 4. React Query integration for client. 5. Middleware for auth and logging. 6. Context for user sessions. 7. Subscriptions with WebSockets. 8. Error handling with TRPCError. No code generation needed. Use with Next.js or standalone Express server.
Use Redux Toolkit for efficient Redux. APIs: 1. configureStore with defaults. 2. createSlice for reducers and actions. 3. Immer for immutable updates. 4. createAsyncThunk for async logic. 5. RTK Query for data fetching. 6. Entity adapter for normalized data. 7. TypeScript inference. 8. DevTools extension. No more action constants. Use createSelector for memoized selectors and implement listener middleware for side effects.
Implement component testing with Cypress. Workflow: 1. Mount React/Vue components in isolation. 2. cy.get() for element selection. 3. Intercept API calls with cy.intercept(). 4. Test user interactions (click, type, drag). 5. Visual viewport testing. 6. Custom commands for reusability. 7. Fixtures for test data. 8. Time travel debugging. Use with TypeScript and implement accessibility testing with cypress-axe plugin.
Implement GraphQL with Apollo Client. Setup: 1. ApolloProvider with InMemoryCache. 2. useQuery hook for data fetching. 3. useMutation for data updates. 4. Optimistic UI responses. 5. Cache policies (cache-first, network-only). 6. Fragment composition for reusable fields. 7. Pagination with fetchMore. 8. Local state management. Use codegen for TypeScript types and implement error handling with Error Link.
Master data fetching with Tanstack Query (React Query). Features: 1. useQuery for async state management. 2. Query keys for caching strategy. 3. Automatic refetching on window focus. 4. Mutations with invalidation. 5. Optimistic updates for instant UI. 6. Infinite queries for pagination. 7. Prefetching for better UX. 8. DevTools for debugging. Use with axios or fetch and implement retry logic with exponential backoff.
Document components effectively with Storybook 7. Setup: 1. CSF3 format for stories. 2. Autodocs for prop table generation. 3. Controls addon for prop manipulation. 4. Actions addon for event logging. 5. Interactions testing with @storybook/test. 6. Accessibility checks with a11y addon. 7. Design tokens documentation. 8. MDX for custom documentation pages. Use composition for multiple projects and implement visual testing with Chromatic.
Use Jotai's atomic approach to state. Concepts: 1. atom() for primitive state. 2. Derived atoms with get(). 3. Async atoms for data fetching. 4. atomFamily for dynamic atoms. 5. useAtom hook like useState. 6. Focus on specific atoms. 7. No string keys needed. 8. Works with Suspense. Minimal re-renders due to fine-grained subscriptions. Integrate with localStorage atoms for persistence.
Build a framework-agnostic design system with Lit. Components: 1. Custom elements with @customElement decorator. 2. Reactive properties with @property. 3. Shadow DOM for style encapsulation. 4. Slots for content projection. 5. CSS custom properties for theming. 6. Event dispatching with CustomEvent. 7. Form-associated custom elements. 8. TypeScript for type safety. Package as npm library, document with web-component-analyzer, and test with @web/test-runner.
Develop with Expo's managed workflow. Features: 1. Over-the-air updates with EAS Update. 2. No native code compilation needed. 3. Expo SDK for native functionality. 4. Development builds for custom native code. 5. Easy third-party library integration. 6. QR code app distribution. 7. Push notifications setup. 8. App icon and splash screen generation. Build with EAS Build and submit to stores. Use expo-router for file-based routing.
Implement SWR for optimal data experience. Pattern: 1. useSWR hook with cache key. 2. Return stale data immediately. 3. Revalidate in background. 4. Dedupe simultaneous requests. 5. Focus revalidation. 6. Interval polling for real-time feel. 7. Error retry with exponential backoff. 8. Mutation with useSWRMutation. Use globally for all requests and implement dependent fetching for serial queries.
Create a lightweight desktop app with Tauri. Benefits: 1. Rust backend for performance and security. 2. Native webview (no bundled Chromium). 3. React/Vue/Svelte frontend. 4. Commands for Rust-to-JS communication. 5. File system API with permissions. 6. System tray and notifications. 7. Smaller bundle size vs Electron. 8. Window customization and multi-window support. Use @tauri-apps/api and implement plugin system for extensibility.
Create accessible dropdowns with Alpine.js. Features: 1. x-data for component state. 2. x-show with transitions for visibility. 3. x-on:click.outside to close dropdown. 4. Keyboard navigation (Arrow, Enter, Esc). 5. x-bind for dynamic classes. 6. Focus trap within dropdown. 7. ARIA attributes for screen readers. 8. Multiple dropdown coordination. Use x-cloak to prevent flash and implement searchable dropdown with x-model for filter input.
Create a multi-page application with Parcel's zero-config approach. Setup: 1. Multiple HTML entry points. 2. Automatic code splitting per page. 3. Shared chunks for common dependencies. 4. Hot module replacement. 5. Image optimization and resizing. 6. PostCSS and Sass support out-of-box. 7. Environment variable injection. 8. Production builds with tree-shaking. No webpack config needed. Use @parcel/transformer-typescript and implement service worker for offline support.
Design Flutter apps with platform-adaptive UI. Architecture: 1. StatelessWidget and StatefulWidget patterns. 2. Provider or Riverpod for state management. 3. Platform checks for iOS/Android differences. 4. Cupertino widgets for iOS feel. 5. Material Design 3 for Android. 6. Responsive layouts with LayoutBuilder. 7. Custom theming with ThemeData. 8. Navigation with GoRouter. Use const constructors for performance and implement accessibility with Semantics.
Create stunning animations with Framer Motion. Techniques: 1. motion.div with animate prop. 2. Variants for orchestration. 3. Layout animations with layout prop. 4. Shared layout animations. 5. Exit animations with AnimatePresence. 6. Gesture animations (drag, tap, hover). 7. useScroll for scroll-triggered. 8. Custom spring physics. Use stagger for children and implement page transitions with ease.
Build immersive 3D with Three.js. Setup: 1. Scene, camera, renderer trio. 2. Geometry and materials. 3. Lights (ambient, directional, point). 4. OrbitControls for camera. 5. Animation loop with requestAnimationFrame. 6. GLTF model loading. 7. Texture mapping and normal maps. 8. Post-processing effects. Use React Three Fiber for React integration and implement raycasting for object interaction.
Design a high-performance blog using Astro 4 Content Collections. Structure: 1. Type-safe frontmatter with Zod schemas. 2. MDX support with custom components. 3. Tag-based filtering and pagination. 4. Reading time estimation. 5. Related posts recommendation. 6. RSS feed generation. 7. Table of contents from headings. 8. Code syntax highlighting with Shiki. 9. View transitions between pages. Use island architecture for interactive components like search and comments.
Build reactive forms using Angular 17 signals. Implementation: 1. Signal-based form state management. 2. Computed validation rules with effect(). 3. Custom validators with async signals. 4. Real-time error messages. 5. Dirty/touched state tracking. 6. Form submission with loading states. 7. Field dependencies and conditional validation. 8. Accessibility with ARIA attributes. Use standalone components and inject FormBuilder. Display inline errors with smooth animations.
Set up a Turborepo monorepo with shared components. Structure: 1. apps/ folder for Next.js and React apps. 2. packages/ui for shared component library. 3. packages/config for shared configs (ESLint, TS). 4. Parallel task execution with turbo run. 5. Remote caching for CI/CD speed. 6. Versioning with changesets. 7. Storybook for component documentation. 8. Testing with Vitest across packages. Use pnpm workspaces and implement proper dependency graphs.
Implement reactive programming with MobX. Concepts: 1. makeObservable or makeAutoObservable. 2. @observable for tracked properties. 3. @computed for derived values. 4. @action for state mutations. 5. observer() HOC for React. 6. reaction() for side effects. 7. runInAction for async updates. 8. Decorators or annotations. MobX automatically tracks dependencies. Use with TypeScript and strict mode for best practices.
Build a modular page builder using Gatsby 5 Slice API. Components: 1. Reusable slices for headers, footers, CTAs. 2. GraphQL queries for slice data. 3. Dynamic slice ordering via CMS. 4. Partial builds for changed slices only. 5. Preview mode for content editors. 6. A/B testing for slice variations. 7. Analytics tracking per slice. 8. Responsive image optimization. Integrate with Contentful or Sanity and use StaticImage for performance.
Implement robust error handling in Remix. Patterns: 1. Route-level ErrorBoundary for unexpected errors. 2. useRouteError hook to access error details. 3. CatchBoundary for thrown responses (404, 401). 4. Nested error boundaries for granular recovery. 5. Custom error pages with helpful messages. 6. Error logging to external service. 7. Fallback UI with retry button. 8. Development vs production error display. Use loader error throwers for validation failures and graceful degradation.
Build native mobile apps with Capacitor. Features: 1. Shared web codebase for iOS/Android. 2. Native plugin APIs (Camera, Geolocation, Storage). 3. Custom native plugins. 4. Live reload during development. 5. Native UI components when needed. 6. App Store deployment workflow. 7. Push notifications with FCM. 8. Biometric authentication. Use with Ionic components or any web framework. Implement offline-first with service workers.
Craft custom visualizations with D3.js. Patterns: 1. Data binding with selection.data(). 2. Enter/update/exit pattern. 3. Scales (linear, time, ordinal). 4. Axes with d3.axis(). 5. SVG path generation. 6. Transitions for smooth updates. 7. Zoom and pan behaviors. 8. Force-directed graphs. Use Observable Plot for simpler charts or build completely custom. Integrate with React using useRef.
Create a real-time chat application using Svelte 5's new runes. Requirements: 1. Use $state and $derived runes for reactive messages. 2. WebSocket connection with auto-reconnect. 3. Typing indicators with $effect rune. 4. Message grouping by date dividers. 5. Infinite scroll for message history. 6. File upload with drag-and-drop. 7. Emoji picker integration. 8. Read receipts and online status. Style with SvelteKit and use server-sent events for presence.
Build a cross-platform desktop app with Electron and React. Architecture: 1. Main process for system APIs. 2. Renderer process with React UI. 3. IPC communication between processes. 4. Context isolation for security. 5. Auto-updater for releases. 6. Native menus and tray icons. 7. File system access and dialogs. 8. Custom window controls. Use electron-builder for packaging and implement deep linking for protocol handling.
Write effective unit tests with Vitest. Practices: 1. describe/it blocks for test organization. 2. expect assertions with matchers. 3. Mock functions with vi.fn() and vi.spyOn(). 4. Component testing with @testing-library/react. 5. Coverage reporting with c8. 6. Snapshot testing for UI components. 7. Setup/teardown with beforeEach/afterEach. 8. Test.concurrent for parallelization. Use in-source testing for co-location and implement custom matchers for domain logic.
Leverage Solid.js's fine-grained reactivity for a metrics dashboard. Features: 1. createSignal for individual metrics. 2. createMemo for derived calculations. 3. createResource for async data fetching. 4. Live updates without virtual DOM overhead. 5. Multiple chart types (line, bar, pie). 6. Real-time WebSocket data streaming. 7. Granular updates only re-render changed cells. 8. Time range selector with transitions. Achieve 60fps performance with large datasets.
Create Android UI with Jetpack Compose. Structure: 1. Composable functions for UI components. 2. remember and mutableStateOf for state. 3. LazyColumn for efficient lists. 4. Modifier chain for styling. 5. ViewModel integration. 6. Material 3 theming. 7. Side effects with LaunchedEffect. 8. Navigation component for screens. Use Accompanist for additional utilities and implement animations with animateContentSize.
Integrate Firebase for rapid development. Services: 1. Firestore for document database. 2. Collections and documents structure. 3. Real-time listeners with onSnapshot. 4. Compound queries with where clauses. 5. Firebase Auth for users. 6. Cloud Storage for media. 7. Security rules for access control. 8. Cloud Functions for backend logic. Use Firebase SDK v9 modular approach and batch writes for transactions.
Build a modern shopping cart using Vue 3 Composition API. Features: 1. Reactive cart state with Pinia store. 2. Add/remove items with smooth transitions. 3. Quantity adjustments with debounced updates. 4. Price calculations including tax and shipping. 5. Persistent cart using localStorage. 6. Empty state with product recommendations. 7. Checkout button with loading state. Use Tailwind for styling and Vueuse for composable utilities. Implement optimistic UI updates for better UX.
Develop a custom Vite 5 plugin for specialized workflow. Plugin features: 1. Transform hook for custom file types. 2. Virtual modules for config injection. 3. HMR API for hot updates. 4. Dev server middleware. 5. Build hooks for asset processing. 6. SSR transform handling. 7. Dependency pre-bundling optimization. 8. Watch mode for external tools. Use TypeScript with proper plugin typing and implement configureServer for custom routes.
Leverage Valtio's proxy magic for state. Usage: 1. proxy() creates mutable state. 2. Direct property mutations. 3. snapshot() for immutable reads. 4. useSnapshot hook in React. 5. subscribe() for listeners. 6. Nested objects auto-tracked. 7. Derive computed values. 8. Works outside React. Simple mental model: mutate state directly, components auto-update. Use with class instances for OOP patterns.
Deploy Appwrite for self-hosted backend. Features: 1. Database with collections. 2. User authentication and teams. 3. Storage with file permissions. 4. Cloud functions in multiple languages. 5. Real-time events. 6. Webhooks for integrations. 7. User roles and permissions. 8. SDKs for web and mobile. Docker-based deployment. Use Appwrite Console for management and implement server-side rendering support.
Architect a data fetching layer with Nuxt 3 composables. Structure: 1. useFetch with key-based caching. 2. useAsyncData for complex queries. 3. Custom composable useApiClient. 4. Global error handling middleware. 5. Loading states with useLoadingIndicator. 6. Optimistic updates pattern. 7. Request deduplication. 8. Stale-while-revalidate strategy. Integrate Pinia for client-side state and implement automatic retries with exponential backoff.