Contributing - PlugImt/transat-app GitHub Wiki
Thank you for your interest in contributing to Transat 2.0! This document provides guidelines and information for contributors to ensure a smooth collaboration process.
-
YohannCursor (@yohann69) - Lead Developer - Lucie (@luclu7) - Full-Stack Developer
- Enzo (@HeineZo) - Frontend Developer
- Max (@maxbodin) - Developer
- Zephyr (@zephyr-dassouli) - Original developer
Plug'IMT is a student-created association at IMT Atlantique, independent from the school itself.
Before contributing, ensure you have:
- Development Environment: Node.js 18+, npm, Git
- Mobile Setup: Expo Go app installed on your device
-
Code Editor: VS Code recommended with extensions:
- React Native Tools
- ES7+ React/Redux/React-Native snippets
- Prettier
- TypeScript
-
Fork the Repository
# Fork on GitHub, then clone your fork git clone https://github.com/YOUR_USERNAME/Transat.git cd Transat
-
Install Dependencies
npm install --legacy-peer-deps
-
Environment Configuration
cp .env.example .env # Configure your local environment variables
-
Start Development Server
npx expo start --tunnel --clear
-
Verify Setup
- Scan QR code with Expo Go
- Ensure app loads without errors
- Test basic navigation
- All new code must be written in TypeScript
- Proper type definitions for all interfaces and functions
- No
any
types without explicit justification - Use strict type checking
// ✅ Good
interface User {
id: string;
name: string;
email: string;
}
const fetchUser = async (id: string): Promise<User> => {
// Implementation
};
// ❌ Avoid
const fetchUser = async (id: any): Promise<any> => {
// Implementation
};
- Use functional components with hooks
- Implement proper error boundaries
- Follow atomic design principles
- Use React.memo for performance optimization when needed
// ✅ Good Component Structure
interface Props {
title: string;
onPress: () => void;
variant?: 'primary' | 'secondary';
}
export const Button: React.FC<Props> = ({ title, onPress, variant = 'primary' }) => {
return (
<TouchableOpacity
className={`px-4 py-2 rounded ${variant === 'primary' ? 'bg-blue-500' : 'bg-gray-300'}`}
onPress={onPress}
>
<Text className="text-white font-medium">{title}</Text>
</TouchableOpacity>
);
};
- Use NativeWind (Tailwind) classes for styling
- Follow mobile-first responsive design
- Maintain consistent spacing using Tailwind scale
- Support both light and dark themes
// ✅ Good Styling
<View className="flex-1 bg-white dark:bg-gray-900 p-4">
<Text className="text-lg font-semibold text-gray-800 dark:text-white mb-4">
Title
</Text>
</View>
- Use for all server state management
- Implement proper query keys
- Handle loading and error states
- Use optimistic updates where appropriate
// ✅ Good Query Implementation
export const useRestaurantMenu = (date?: string) => {
return useQuery({
queryKey: QUERY_KEYS.restaurantMenu(date),
queryFn: () => restaurantService.getDailyMenu(date),
staleTime: 30 * 60 * 1000,
retry: 3,
});
};
- Use atoms for client-side state
- Keep atoms focused and specific
- Implement proper atom composition
// ✅ Good Atom Usage
export const themeAtom = atom<'light' | 'dark'>('light');
export const userPreferencesAtom = atom({
notifications: true,
language: 'en',
});
- Implement FlatList for large datasets
- Use React.memo and useMemo appropriately
- Optimize image loading and caching
- Minimize bundle size
- Implement proper caching strategies
- Use background sync for critical data
- Handle offline scenarios gracefully
- Minimize API calls
-
feature/feature-name
- New features -
fix/bug-description
- Bug fixes -
refactor/component-name
- Code refactoring -
docs/section-name
- Documentation updates
feature/washing-machine-notifications
fix/restaurant-menu-loading
refactor/auth-components
docs/api-documentation
type(scope): description
body (optional)
footer (optional)
-
feat
: New feature -
fix
: Bug fix -
docs
: Documentation changes -
style
: Code style changes -
refactor
: Code refactoring -
test
: Test additions or changes -
chore
: Build process or auxiliary tool changes
feat(auth): add biometric authentication support
fix(restaurant): resolve menu loading timeout issue
docs(api): update authentication endpoint documentation
refactor(components): extract common button variants
-
Code Quality: Run linting and formatting
npm run lint npm run format
-
Type Check: Ensure TypeScript compilation
npm run check-types
-
Testing: Run all tests
npm test
-
Build: Verify app builds successfully
npx expo start --clear
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed
## Screenshots (if applicable)
Include before/after screenshots for UI changes
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Code is commented where necessary
- [ ] Documentation updated
- Automated Checks: CI/CD pipeline runs automatically
- Code Review: At least one team member review required
- Testing: Reviewer tests on device/simulator
- Approval: Changes approved by core team member
- Merge: Squash and merge to main branch
We use Crowdin for collaborative translation management.
Project Link: https://crowdin.com/project/transat
- Context Understanding: Review screenshots and descriptions
- Consistency: Use established terminology
- Cultural Adaptation: Adapt content for local culture
- Length Considerations: Keep UI text concise
- English (source)
- French (primary target)
- Spanish, German, Portuguese, Chinese
To request a new language:
- Open an issue with language request
- Provide justification for user base
- Commit to translation maintenance
## Bug Description
Clear description of the bug
## Steps to Reproduce
1. Step one
2. Step two
3. Step three
## Expected Behavior
What should happen
## Actual Behavior
What actually happens
## Environment
- Device: iPhone 14 Pro / Android Galaxy S23
- OS Version: iOS 17.0 / Android 13
- App Version: 2.0.0
- Expo Go Version: 50.0.0
## Screenshots/Videos
Include visual evidence if applicable
## Additional Context
Any other relevant information
- Critical: App crashes, security issues
- High: Major functionality broken
- Medium: Minor functionality issues
- Low: UI/UX improvements, typos
## Feature Description
Clear description of the proposed feature
## Problem Statement
What problem does this solve?
## Proposed Solution
How should this be implemented?
## Alternative Solutions
Other approaches considered
## User Stories
- As a [user type], I want [functionality] so that [benefit]
## Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2
## Priority
Low / Medium / High
## Additional Context
Mockups, research, related issues
- Use clear, concise language
- Include code examples
- Provide visual aids when helpful
- Keep documentation up-to-date
- API Documentation: Endpoint specifications
- Component Documentation: Usage examples
- User Guides: Feature explanations
- Development Guides: Setup and workflow
- Contributors listed in README
- Special thanks in release notes
- Optional social media shoutouts
- Conference presentation opportunities
- Code contributions
- Bug reports and testing
- Documentation improvements
- Translation work
- UI/UX design feedback
Join our Discord for real-time communication:
- Development discussions
- Question and answers
- Feature planning
- Community events
Use GitHub Discussions for:
- Feature proposals
- Architecture discussions
- General questions
- Community feedback
- Weekly Standup: Mondays 18:00 CET
- Sprint Planning: Every two weeks
- Retrospectives: End of each sprint
By contributing to Transat 2.0, you agree that your contributions will be licensed under the MIT License.
Every contribution, no matter how small, helps make Transat better for the IMT Atlantique community. We appreciate your time and effort!
Questions? Feel free to reach out to the team or open a discussion on GitHub.