- Node.js 18+
- pnpm 8+
- Make (optional, but recommended)
# Install dependencies
make install
# or
pnpm install
# Start development server (staging)
make dev
# or
pnpm run dev:stage
# Start development server (production)
make dev-prod
# or
pnpm run dev:prod
# Build for staging
make build
# or
pnpm run build:stage
# Build for production
make build-prod
# or
pnpm run build:prod
# Run tests
make test
# Run tests in watch mode
make test-watch
# Run tests with coverage
make test-coverage
# Run linter
make lint
# Fix linting issues
make lint-fix
src/
├── config/ # Configuration files
│ └── networks/ # Network-specific configurations
├── lib/ # Core business logic
│ └── networks/ # Network-related logic
├── utils/ # Utility functions
├── components/ # Reusable components
│ ├── ui/ # Base UI components
│ ├── layout/ # Layout components
│ ├── forms/ # Form components
│ └── modals/ # Modal components
├── styles/ # Global styles
├── pages/ # Application pages
└── types/ # TypeScript types
All base UI components are in src/components/ui/
. These follow our design system and include:
- Button
- Typography
- Card
- Modal
- Alert
- Toast
-
Use TypeScript for all components
-
Follow the component structure:
// imports import * as React from 'react' import { cn } from '@/utils/class-merge' // types interface ComponentProps { // props } // component export const Component = React.forwardRef<HTMLElement, ComponentProps>(( { prop1, prop2, className, ...props }, ref ) => { return ( // JSX ) }) // display name Component.displayName = 'Component'
-
Use proper prop types and validation
-
Include proper JSDoc comments
-
Add proper accessibility support
-
Add proper test coverage
Use design system colors from tailwind.config.js
:
colors: {
primary: 'var(--primary)',
secondary: 'var(--secondary)',
// etc.
}
Use typography classes from our system:
<Typography variant="heading-1">Heading 1</Typography>
<Typography variant="body-sm">Body text</Typography>
Use design system spacing:
<div className="space-y-4 p-6">
Use Tabler Icons:
import { IconName } from '@tabler/icons-react'
Use Zustand for global state:
import create from 'zustand'
interface Store {
count: number
increment: () => void
}
export const useStore = create<Store>((set) => ({
count: 0,
increment: () => set((state) => ({ count: state.count + 1 })),
}))
- Write unit tests for all components
- Use React Testing Library
- Follow testing best practices
- Add JSDoc comments for all components and functions
- Keep README up to date
- Document all props and variants
See all available commands:
make help
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
MIT