Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .cursor/rules/project-wide.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
description: Project-Wide Rules for the Hypergraph monorepo and its packages
globs:
alwaysApply: true
---

# Hypergraph Project-Wide Rules

## Monorepo Structure
- Use pnpm workspaces for package management
- Follow consistent package naming conventions
- Use workspace dependencies where appropriate
- Maintain proper package.json structure
- Use consistent versioning across packages

## TypeScript Configuration
- Use strict TypeScript configuration
- Implement proper type definitions
- Use consistent import/export patterns
- Follow TypeScript best practices
- Use proper module resolution

## Code Style
- Use Biome for linting and formatting
- Follow consistent naming conventions
- Use proper indentation and spacing
- Implement proper code organization
- Follow established file structure patterns

## Testing
- Use Vitest for testing framework
- Write comprehensive unit tests
- Test both success and error scenarios
- Use proper mocking strategies
- Maintain good test coverage

## Documentation
- Write clear, comprehensive documentation
- Use proper JSDoc comments
- Maintain up-to-date README files
- Document API interfaces
- Use consistent documentation patterns

## Git Workflow
- Use conventional commit messages
- Implement proper branching strategy
- Use meaningful commit descriptions
- Follow established PR review process
- Maintain clean git history

## Security
- Use secure dependencies
- Implement proper authentication
- Follow security best practices
- Use proper encryption where needed
- Maintain secure coding practices

## Performance
- Optimize bundle sizes
- Implement proper caching strategies
- Use efficient algorithms
- Monitor performance metrics
- Follow performance best practices
50 changes: 50 additions & 0 deletions .cursor/rules/root-config.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
description: Root Configuration Rules for the Hypergraph monorepo and its packages
globs:
alwaysApply: true
---

# Root Configuration Rules

## Package Management
- Use pnpm for package management
- Maintain consistent workspace configuration
- Use proper dependency management
- Follow semantic versioning
- Use proper package.json structure

## Build Configuration
- Use TypeScript for configuration
- Implement proper build scripts
- Use consistent build tooling
- Maintain proper output structure
- Use proper source maps

## Linting and Formatting
- Use Biome for linting and formatting
- Maintain consistent code style
- Use proper ignore patterns
- Implement proper rule configuration
- Follow established conventions

## Documentation
- Maintain comprehensive README
- Use proper documentation structure
- Include setup instructions
- Document development workflow
- Use consistent documentation style

## CI/CD
- Use proper GitHub Actions
- Implement proper testing workflows
- Use proper deployment strategies
- Maintain proper environment configuration
- Follow security best practices

## Development Tools
- Use proper development dependencies
- Implement proper tooling configuration
- Use consistent development workflow
- Maintain proper debugging setup
- Use proper IDE configuration

56 changes: 56 additions & 0 deletions apps/connect/.cursor/rules/frontend-app.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
description: Connect frontend application patterns and conventions
globs: ["src/**/*.tsx", "src/**/*.ts"]
alwaysApply: false
---

# Connect Frontend App Rules

## Technology Stack
- Use Vite for build tooling
- Use TanStack Router for routing
- Use TanStack Query for server state
- Use Tailwind CSS for styling
- Use React 19 with latest features

## Component Architecture
- Use functional components with hooks
- Implement proper TypeScript interfaces
- Use the Hypergraph React SDK components
- Follow the established routing patterns

## State Management
- Use XState Store for complex state
- Use React Query for server state
- Use Hypergraph contexts for app state
- Implement proper loading states

## Authentication
- Use Privy for authentication
- Implement proper SIWE integration
- Handle authentication state properly
- Use secure authentication patterns

## Routing
- Use TanStack Router for type-safe routing
- Implement proper route guards
- Use nested routing where appropriate
- Handle route parameters safely

## Styling
- Use Tailwind CSS for styling
- Follow responsive design patterns
- Use consistent design tokens
- Implement proper accessibility

## Performance
- Use React.memo for expensive components
- Implement proper code splitting
- Use lazy loading for routes
- Optimize bundle size

## Testing
- Use React Testing Library
- Test user interactions
- Mock external dependencies
- Test authentication flows
55 changes: 55 additions & 0 deletions apps/create-hypergraph-app/.cursor/rules/cli-app.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
description: Create Hypergraph App CLI patterns and conventions
globs: ["src/**/*.ts"]
alwaysApply: false
---

# Create Hypergraph App CLI Rules

## CLI Architecture
- Use Effect CLI for command-line interface
- Implement proper subcommands
- Use descriptive command names
- Provide helpful error messages
- Implement proper help text

## Template System
- Use structured templates for scaffolding
- Implement proper template validation
- Use consistent template structure
- Provide clear template documentation
- Support multiple template types

## File Operations
- Use safe file system operations
- Implement proper error handling
- Validate file paths and permissions
- Use consistent file naming
- Implement proper backup strategies

## User Experience
- Provide clear progress indicators
- Implement proper error recovery
- Use consistent output formatting
- Provide helpful suggestions
- Implement proper validation

## Code Generation
- Generate type-safe code
- Use consistent code formatting
- Implement proper imports
- Follow established patterns
- Generate comprehensive documentation

## Testing
- Test CLI commands thoroughly
- Mock file system operations
- Test error scenarios
- Test template generation
- Use Vitest for testing

## Distribution
- Use proper package.json configuration
- Implement proper binary setup
- Use TypeScript for type safety
- Follow npm publishing best practices
55 changes: 55 additions & 0 deletions apps/create-hypergraph/.cursor/rules/cli-tool.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
description: Create Hypergraph CLI tool patterns and conventions
globs: ["src/**/*.ts"]
alwaysApply: false
---

# Create Hypergraph CLI Rules

## CLI Architecture
- Use Effect CLI for command-line interface
- Implement proper subcommands
- Use descriptive command names
- Provide helpful error messages
- Implement proper help text

## Template System
- Use structured templates for scaffolding
- Implement proper template validation
- Use consistent template structure
- Provide clear template documentation
- Support multiple template types

## File Operations
- Use safe file system operations
- Implement proper error handling
- Validate file paths and permissions
- Use consistent file naming
- Implement proper backup strategies

## User Experience
- Provide clear progress indicators
- Implement proper error recovery
- Use consistent output formatting
- Provide helpful suggestions
- Implement proper validation

## Code Generation
- Generate type-safe code
- Use consistent code formatting
- Implement proper imports
- Follow established patterns
- Generate comprehensive documentation

## Testing
- Test CLI commands thoroughly
- Mock file system operations
- Test error scenarios
- Test template generation
- Use Vitest for testing

## Distribution
- Use proper package.json configuration
- Implement proper binary setup
- Use TypeScript for type safety
- Follow npm publishing best practices
56 changes: 56 additions & 0 deletions apps/events/.cursor/rules/events-app.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
description: Events application patterns and conventions
globs: ["src/**/*.tsx", "src/**/*.ts"]
alwaysApply: false
---

# Events App Rules

## Technology Stack
- Use Vite for build tooling
- Use TanStack Router for routing
- Use React for UI components
- Use Tailwind CSS for styling
- Use Hypergraph SDK for data management

## Event Management
- Implement proper event creation
- Use type-safe event schemas
- Implement proper event validation
- Handle event state management
- Use proper event lifecycle

## User Management
- Implement proper user authentication
- Handle user permissions
- Manage user profiles
- Implement proper user state
- Use secure authentication patterns

## Data Management
- Use Hypergraph for data storage
- Implement proper data synchronization
- Handle offline scenarios
- Use proper data validation
- Implement proper error handling

## UI/UX
- Use consistent design patterns
- Implement responsive design
- Follow accessibility guidelines
- Use proper loading states
- Implement proper error states

## Performance
- Optimize component rendering
- Implement proper caching
- Use lazy loading
- Optimize bundle size
- Monitor performance metrics

## Testing
- Test user interactions
- Test event workflows
- Mock external dependencies
- Test error scenarios
- Use React Testing Library
56 changes: 56 additions & 0 deletions apps/next-example/.cursor/rules/nextjs-example.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
description: Next.js example application patterns and conventions
globs: ["src/**/*.tsx", "src/**/*.ts"]
alwaysApply: false
---

# Next.js Example App Rules

## Technology Stack
- Use Next.js 15+ for framework
- Use App Router for routing
- Use TypeScript for type safety
- Use Tailwind CSS for styling
- Use Hypergraph SDK for data

## Next.js Patterns
- Use App Router structure
- Implement proper page components
- Use Server Components where appropriate
- Use Client Components for interactivity
- Follow Next.js best practices

## Routing
- Use App Router file-based routing
- Implement proper dynamic routes
- Use proper route handlers
- Handle route parameters safely
- Implement proper redirects

## Data Fetching
- Use Server Components for data fetching
- Implement proper loading states
- Handle error boundaries
- Use proper caching strategies
- Implement proper revalidation

## Styling
- Use Tailwind CSS for styling
- Follow responsive design patterns
- Use consistent design tokens
- Implement proper accessibility
- Use CSS modules when needed

## Performance
- Use Next.js optimizations
- Implement proper image optimization
- Use proper code splitting
- Optimize bundle size
- Monitor Core Web Vitals

## Testing
- Use Next.js testing utilities
- Test page components
- Test API routes
- Mock external dependencies
- Test user interactions
Loading
Loading