Contributing to Sailor
Thank you for considering contributing to Sailor CMS!
Getting Started
Prerequisites:
- Node.js 20+
- Git
- Basic knowledge of SvelteKit, TypeScript
Setup:
- Fork and clone the repository
- Run
npm install
- Create
.env
file withBETTER_AUTH_SECRET
andDATABASE_URL
- Run
npx sailor db:update
- Run
npm run dev
- Visit http://localhost:5173/sailor
Project Structure
src/lib/sailor/
├── templates/ # Define content types here
├── generated/ # Auto-generated (don't edit)
├── core/ # Core CMS functionality
└── scripts/ # Utility scripts
src/routes/sailor/ # Admin interface
src/components/sailor/ # Admin UI components
Development Guidelines
Code Style:
- TypeScript for all new code
- Run
npm run lint
before submitting - Follow existing patterns
Before Contributing:
- Check existing issues
- Open an issue for new features
- Keep PRs focused
- Test your changes
Types of Contributions
Bug Fixes: Include reproduction steps and reference issue number
New Features: Discuss in issue first, follow existing patterns
Documentation: Fix typos, add examples, keep current
UI/UX: Follow design patterns, test on mobile/desktop
Development Workflow
Adding Collections/Blocks:
- Create template in appropriate folder
- Register in index file
- Run
npx sailor db:update
- Test in admin interface
Important Rules:
- Never edit generated files
- Always use templates for schema changes
- Test with existing data
Pull Request Process
- Create feature branch from
master
- Make changes following guidelines
- Test thoroughly (dev server, linting, TypeScript)
- Commit with clear message
- Open PR with description and screenshots
What Not to Do
- Don’t edit generated files in
src/lib/sailor/generated/
- Don’t modify shadcn/ui components
- Don’t commit database files
- Don’t include sensitive data
Getting Help
- GitHub Issues for bugs and features
- Check existing documentation first
Thank you for helping make Sailor CMS better!