Before You Start
Communication
- Language: Use informal French (“tu” form) in all communications and code comments
- Issues: Check if a similar issue exists before creating a new one
- Discussions: For major changes, open an issue first to discuss your approach
- Discord: Join our Discord community for questions and discussions
Contribution Workflow
Create a feature branch
Use Conventional Branch naming:Branch prefixes:
feat/- New featurefix/- Bug fixdocs/- Documentation changesrefactor/- Code refactoringtest/- Adding testschore/- Maintenance tasks
Make your changes
- Follow the code style guidelines
- Write clear, descriptive commit messages
- Test your changes on both iOS and Android
- Update documentation if needed
Commit your changes
Use Conventional Commits:Commit message format:Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
Pull Request Requirements
Before submitting a Pull Request, ensure:- One change per PR: Don’t bundle multiple features or bug fixes
- Conventional Commits: All commits follow the convention
- Code style: Passes ESLint and Prettier checks
- Testing: Tested on both iOS and Android
- Documentation: Updated if you changed documented parts
- No console.log: Use the logger utility instead
- Informal language: Use French “tu” form in user-facing text
- Build success: App compiles without errors
Pull Requests that don’t meet these requirements will be marked as invalid until corrections are made.
Code Style
ESLint Configuration
Papillon enforces strict code style rules. Run the linter to check your code:Indentation & Formatting
Indentation & Formatting
- Indentation: 2 spaces (no tabs)
- Semicolons: Required
- Quotes: Double quotes for strings
- Line length: 80 characters max
- Trailing commas: ES5 style
Naming Conventions
Naming Conventions
- Variables & Functions: camelCase
- Components: PascalCase
- Constants: UPPER_SNAKE_CASE
- Private members: _prefixed
- No var: Use
constorlet
Code Quality
Code Quality
- No console: Use
@/utils/logger/loggerinstead - No unused variables: Prefix with
_if intentionally unused - No unused imports: Automatically removed by ESLint
- Strict equality: Use
===and!== - No empty functions: Add a comment explaining why
- Max depth: 4 levels of nesting
TypeScript
TypeScript
- Strict mode: Enabled
- Explicit types: For function parameters and return values
- No
any: Use proper types orunknown - Interface over type: Prefer interfaces for object shapes
Import Sorting
Imports are automatically sorted byeslint-plugin-simple-import-sort:
Prettier Configuration
Code formatting is handled by Prettier:Component Guidelines
React Component Structure
Component Best Practices
- Props interface: Always define a TypeScript interface for props
- JSDoc comments: Document complex components
- Destructure props: In function signature
- Early returns: For conditional rendering
- Memoization: Use
React.memo()for expensive components - Hooks order: useState → useEffect → custom hooks → callbacks
Testing
Papillon uses Jest and React Test Renderer for testing.Running Tests
Writing Tests
While tests are encouraged, they’re not strictly required for all contributions. Focus on manual testing on both platforms.
Documentation
Update documentation when you:- Add new features
- Change existing APIs
- Modify project structure
- Update configuration
- README.md: Project overview and quick start
- .github/CONTRIBUTING.md: This guide (French version)
- docs/: Comprehensive documentation (you are here)
- Code comments: For complex logic
Security
Security guidelines:- Use
.envfiles for secrets (already gitignored) - Store sensitive data in Expo SecureStore
- Validate all user inputs
- Sanitize data from external APIs
- Keep dependencies updated
Reporting Issues
When creating an issue:Check for duplicates
Search existing issues to avoid duplicates. If you find a similar issue, add a 👍 reaction instead of creating a new one.
Use the issue template
Fill out the provided template completely. It helps us understand and resolve issues faster.
Provide details
For bugs:
- Current behavior
- Expected behavior
- Steps to reproduce
- Screenshots/videos
- Device info (OS, version, device model)
- Clear description
- Use cases
- Screenshots/mockups
- Potential implementation approach
Code Review Process
What to Expect
- Automated checks: CI runs linting, tests, and builds
- Maintainer review: A team member reviews your code
- Feedback: You may be asked to make changes
- Approval: Once approved, your PR will be merged
Responding to Feedback
- Be responsive to review comments
- Make requested changes promptly
- Ask questions if feedback is unclear
- Push additional commits to the same branch
- Mark conversations as resolved when addressed
Getting Help
Discord Community
Join our Discord for real-time help and discussions
GitHub Discussions
For longer-form questions and discussions
Documentation
Read the full documentation
Issue Tracker
Report bugs and request features
Additional Resources
- Expo Documentation
- React Native Documentation
- Conventional Commits
- Conventional Branch
- TypeScript Handbook
Thank you for contributing to Papillon! Your contributions help make school management better for thousands of students.

