React TypeScript Next.js Node.js .cursorrules prompt file
About .cursorrules prompt file
What you can build
Decentralized Finance Dashboard: Create a web app using Next.js 14 App Router and Wagmi v2 for aggregating and displaying DeFi related data such as token prices, liquidity pools, and yield farming opportunities. Use TypeScript interfaces for data modeling and Tailwind CSS for a responsive design.
NFT Minting Platform: Develop a platform using Solidity for smart contract development, TypeScript for front-end logic, and Next.js for the server-side rendering of NFTs. Integrate Shadcn UI and Tailwind Aria for elegant UI components.
Real-time Cryptocurrency Portfolio Tracker: Build a React application that uses the Viem v2 library for interacting with blockchain data in real-time. Use Next.js and functional components to render user portfolios dynamically, with responsiveness handled by Radix UI components.
Decentralized Voting Application: Implement a secure voting system using Solidity for the backend logic and TypeScript with Next.js for the frontend. Use Zod for form input validation and ensure error resilience with custom error types.
Smart Contract IDE Plugin: Create a Node.js-based plugin for IDEs that supports Solidity development, offering features like syntax highlighting and auto-completion. Use TypeScript for robust type checking and rely on modularization for code maintainability.
Blockchain-based Supply Chain Management System: Design a fault-tolerant supply chain solution using Solidity for smart contract management, TypeScript for interfacing, and Next.js for presenting supply chain data to users in real-time, leveraging Tailwind CSS for effortless styling.
Educational Platform for Web3 Developers: Build an interactive platform using Next.js and Vite to teach Web3 development, featuring courses on Solidity, smart contract development, and blockchain integration. Use React components for interactivity and a mobile-first design approach.
DAO Management Interface: Develop a Decentralized Autonomous Organization (DAO) management app using Wagmi v2 and Solidity, hosted on a server-less architecture using Next.js. Employ Aria UI for accessibility and seamless user interaction.
Crowdfunding Platform on Ethereum: Create a crowdfunding platform using TypeScript, with smart contract logic written in Solidity. Implement authentication and payment interfaces using React functional components and Radix UI for structure and style.
Crypto Wallet Integration Library: Offer a library using Node.js and TypeScript to simplify the integration of cryptocurrency wallets into web apps. Embrace functional programming and export components for extensibility and ease of integration.
Benefits
- Prioritize concise, technical responses with TypeScript examples, avoiding unnecessary complexity.
- Implement functional programming, emphasizing declarative code with iteration and modularization over duplication.
- Ensure robust error handling with early returns, guard clauses, and user-friendly error messages, leveraging consistent error handling patterns.
Synopsis
Developers working on Next.js projects can use this prompt to build modular, type-safe applications with efficient error handling and optimized component structures.
Overview of .cursorrules prompt
The .cursorrules file provides guidelines for developers specializing in technologies such as Solidity, TypeScript, Node.js, and React. It emphasizes writing concise and technical responses using accurate TypeScript examples while promoting functional and declarative programming styles. Key principles include favoring modularization over duplication, using descriptive variable names, and preferring named exports for components. The file outlines specific practices for JavaScript and TypeScript, such as using the "function" keyword for pure functions, leveraging TypeScript interfaces, and prioritizing error handling. It stipulates dependencies like Next.js 14, Wagmi v2, and Viem v2, and offers guidance on using React/Next.js with a focus on functional components, responsive design, and efficient error management. Additionally, it provides conventions for using server actions, data handling, and maintaining performance priorities like Web Vitals.