34 lines
935 B
Plaintext
34 lines
935 B
Plaintext
# Solace Treasury DApp - Development Rules
|
|
|
|
## Code Style
|
|
- Use TypeScript for all new code
|
|
- Follow ESLint and Prettier configurations
|
|
- Use functional components with hooks in React
|
|
- Prefer named exports over default exports
|
|
|
|
## Smart Contracts
|
|
- Follow Solidity style guide
|
|
- Use OpenZeppelin contracts where applicable
|
|
- Always include comprehensive tests
|
|
- Document all public functions with NatSpec comments
|
|
|
|
## Frontend
|
|
- Use Next.js App Router conventions
|
|
- Implement responsive design (mobile-first)
|
|
- Use GSAP for animations, Three.js for 3D
|
|
- Follow accessibility best practices
|
|
|
|
## Backend
|
|
- Use TypeScript strict mode
|
|
- Validate all inputs with Zod
|
|
- Use Drizzle ORM for database operations
|
|
- Implement proper error handling
|
|
|
|
## Security
|
|
- Never commit private keys or secrets
|
|
- Validate all user inputs
|
|
- Use parameterized queries for database
|
|
- Implement rate limiting for APIs
|
|
- Chain validation for all transactions
|
|
|