Thank you for your interest in contributing to SereniBase! This document provides guidelines and instructions for contributing.
- Be respectful and inclusive
- Welcome newcomers and help them learn
- Focus on constructive feedback
- Respect different viewpoints and experiences
- Fork the repository and clone your fork
- Create a branch for your feature/fix:
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix - Install dependencies:
npm install cd sdk && npm install && cd ..
- Set up environment variables:
cp .env.example .env # Edit .env with your API endpoint - Start development server:
npm run dev
- TypeScript: Use TypeScript for all new code
- Formatting: Follow existing code style (ESLint rules)
- Naming: Use descriptive names, follow existing conventions
- Comments: Add comments for complex logic, not obvious code
- Use functional components with hooks
- Keep components focused and single-purpose
- Extract reusable logic into custom hooks
- Place components in appropriate directories:
src/components/common/- Shared UI componentssrc/components/modals/- Modal componentssrc/components/shared/- Shared business componentssrc/plugins/- Plugin-specific components
- Plugins should be self-contained in
src/plugins/[PluginName]/ - Register extensions using the Plugin API
- Follow existing plugin patterns (see GridViewPlugin, CalendarViewPlugin)
- Document plugin-specific configuration
- Write tests for new features and bug fixes
- Run tests before submitting:
npm run test - Aim for meaningful test coverage
- Test files should be co-located:
ComponentName.test.tsx
- Update documentation if you change functionality
- Add tests for new features or bug fixes
- Run linting:
npm run lint - Run tests:
npm run test - Ensure build succeeds:
npm run build - Update CHANGELOG.md (if applicable)
Use descriptive titles:
feat: Add dark mode togglefix: Resolve navigation persistence issuedocs: Update README with new setup stepsrefactor: Simplify navigation store logic
Include:
- What changed and why
- How to test the changes
- Screenshots (for UI changes)
- Related issues (if any)
- Check if the bug already exists in issues
- Create a new issue with:
- Clear title and description
- Steps to reproduce
- Expected vs actual behavior
- Environment details (OS, browser, Node version)
- Screenshots (if applicable)
- Check if the feature was already requested
- Create an issue describing:
- The problem it solves
- Proposed solution
- Use cases
- Mockups/wireframes (if applicable)
- Update README.md for user-facing changes
- Add JSDoc comments for public APIs
- Update plugin documentation if adding new plugins
- Keep CONTRIBUTING.md up to date
- All PRs require review before merging
- Address review feedback promptly
- Be open to suggestions and improvements
- Keep PRs focused and reasonably sized
src/
├── components/ # React components
├── hooks/ # Custom React hooks
├── plugins/ # Plugin implementations
├── stores/ # State management (Zustand)
├── service/ # API services
├── utils/ # Utility functions
├── types/ # TypeScript type definitions
└── auth/ # Authentication logic
- Unit Tests: Test utilities, hooks, and pure functions
- Component Tests: Test component rendering and interactions
- Integration Tests: Test feature workflows (future)
Run tests:
npm run test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage report
npm run test:ui # UI test runner- Clear
node_modulesand reinstall:rm -rf node_modules && npm install - Check Node.js version (requires 20+)
- Verify environment variables are set
- Ensure API endpoint is accessible
- Check test environment setup
- Review test output for specific errors
- Issues: Open a GitHub/GitLab issue
- Discussions: Use project discussions (if available)
- Email: support@serenibase.com
Your contributions make SereniBase better for everyone. We appreciate your time and effort!