Development Workflows
Local development setup and workflows
Development Workflows
ShipKit provides a streamlined development environment with tools and scripts for efficient development.
Local Development Setup
Prerequisites
-
Node.js
- Use Node.js 18.x or later
- Recommended: Use
nvm
with.nvmrc
-
Package Manager
- PNPM is the default package manager
- Install:
npm install -g pnpm
-
Docker
- Required for local database
- Docker Compose for service orchestration
Environment Setup
-
Clone Repository
-
Install Dependencies
-
Environment Variables
-
Start Database
Development Server
-
Start Development Server
-
Access Application
- Web: http://localhost:3000
- Payload CMS: http://localhost:3000/admin
Database Management
Database Scripts
-
Sync Database
This script:
- Runs Drizzle migrations
- Initializes Payload CMS
- Seeds database if
SEED_DB=true
-
Seed Database
Seeds the database with:
- CMS collections (RBAC, Features, FAQs, Testimonials)
- Initial content
-
Drop Database
Removes all database tables and content
Database Configuration
Development Tools
Code Quality
-
TypeScript
- Strict mode enabled
- Path aliases configured
- Server/client type separation
-
ESLint
-
Prettier
-
Biome
Testing
-
Vitest Configuration
-
Run Tests
Development Practices
Git Workflow
-
Branch Naming
- Feature:
feature/description
- Fix:
fix/description
- Release:
release/version
- Feature:
-
Commit Messages
- Follow conventional commits
- Include scope:
feat(auth): add OAuth provider
-
Pull Requests
- Use PR template
- Include tests
- Update documentation
Code Organization
-
Directory Structure
-
Component Guidelines
- Use functional components
- Implement proper types
- Add JSDoc comments
- Include tests
-
API Guidelines
- Use server actions
- Implement error handling
- Add request validation
- Document endpoints
Environment Management
Configuration Files
-
Next.js Config
-
TypeScript Config
-
Environment Variables
Environment Sync
Deployment
Vercel Deployment
-
Configuration
-
Environment Setup
- Configure production variables
- Set up database connection
- Enable edge functions
-
Deployment Commands
Best Practices
-
Code Quality
- Write clean, maintainable code
- Follow TypeScript best practices
- Add comprehensive tests
- Document complex logic
-
Performance
- Optimize bundle size
- Use proper caching
- Implement lazy loading
- Monitor metrics
-
Security
- Follow security guidelines
- Validate user input
- Use proper authentication
- Handle sensitive data
-
Documentation
- Keep docs up to date
- Include code examples
- Document breaking changes
- Add troubleshooting guides
Notes
- Use TypeScript for all new code
- Follow the established coding style
- Write tests for new features
- Update documentation when needed
- Use server actions for API calls
- Keep dependencies up to date