Thank you for your interest in contributing to Foliox! This document provides guidelines and instructions for contributing to the project.
- Be respectful and inclusive
- Welcome newcomers and help them learn
- Focus on constructive feedback
- Respect different viewpoints and experiences
If you find a bug, please open an issue with:
- A clear, descriptive title
- Steps to reproduce the bug
- Expected behavior vs actual behavior
- Environment details (Node.js version, OS, etc.)
- Relevant error messages or logs
Feature suggestions are welcome! Please open an issue with:
- A clear description of the feature
- Use cases and examples
- Potential implementation approach (if you have ideas)
- Any relevant references or examples
-
Fork the repository and create a branch from
maingit checkout -b feature/your-feature-name
-
Make your changes following the coding standards below
-
Test your changes
npm run lint npm run build
-
Commit your changes with clear, descriptive commit messages
git commit -m "Add feature: description of what you added" -
Push to your fork and open a Pull Request
git push origin feature/your-feature-name
-
Update documentation if you've changed functionality
-
Fork and clone the repository:
git clone https://github.com/your-username/foliox.git cd foliox -
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env.local
Edit
.env.localwith your configuration. -
Set up the database:
npx prisma migrate dev npx prisma generate
-
Run the development server:
npm run dev
- Use TypeScript for all new code
- Avoid
anytypes - use proper types orunknown - Define interfaces for data structures
- Use type inference where appropriate
- Follow existing code patterns and conventions
- Use meaningful variable and function names
- Keep functions focused and single-purpose
- Add comments for complex logic, but avoid obvious comments
- Maximum line length: 100 characters (soft limit)
- Keep related functionality together
- Use the existing directory structure
- Place new utilities in appropriate
lib/utils/files - Create new modules in
lib/modules/if needed
- Use proper HTTP methods (GET, POST, etc.)
- Return appropriate status codes
- Handle errors gracefully with clear error messages
- Validate input data
- Use TypeScript types for request/response
- Use Prisma migrations for schema changes
- Add indexes for frequently queried fields
- Keep migrations focused and atomic
- Test migrations on a copy of production data
- Use functional components with TypeScript
- Keep components focused and reusable
- Use Shadcn/ui components when possible
- Follow the existing component structure
Before submitting a PR:
-
Lint your code:
npm run lint
-
Build the project:
npm run build
-
Test manually:
- Test the feature you added
- Test edge cases and error scenarios
- Verify no console errors
Use clear, descriptive commit messages:
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters
- Reference issues and pull requests when applicable
Examples:
Add custom URL validation
Fix GitHub API rate limit handling
Update README with deployment instructions
- Update documentation if you've changed functionality
- Add comments to complex code sections
- Ensure all tests pass and the build succeeds
- Request review from maintainers
- Address feedback promptly and professionally
- Code follows the project's coding standards
- All tests pass (
npm run build) - Linter passes (
npm run lint) - Documentation updated (if needed)
- Commit messages are clear and descriptive
- No console errors or warnings
We welcome contributions in these areas:
- Bug fixes: Fix issues reported in the issue tracker
- Features: Implement features from the roadmap
- Documentation: Improve README, code comments, or guides
- Performance: Optimize queries, caching, or rendering
- Testing: Add unit tests or integration tests
- UI/UX: Improve component design or user experience
- Accessibility: Improve keyboard navigation, screen reader support, etc.
If you have questions about contributing:
- Open an issue with the
questionlabel - Check existing issues and discussions
- Review the codebase and documentation
By contributing to Foliox, you agree that your contributions will be licensed under the GNU General Public License v3.0.
Thank you for contributing to Foliox!