Getting Started
Prerequisites
Before you begin, ensure you have the following installed:- Node.js (v18 or higher recommended)
- npm (comes with Node.js)
- Git for version control
Setting Up Development Environment
-
Clone the repository
-
Install dependencies
-
Start the development server
The application will be available at
http://localhost:5173 -
Verify the setup
- Open the URL in your browser
- Check that the application loads correctly
- Try navigating between pages
Available Scripts
The project includes several npm scripts for development:Development
Building
dist/ directory. This command:
- Bundles all JavaScript and CSS
- Minifies and optimizes assets
- Generates static files ready for deployment
Preview
npm run build first.
Linting
Code Style and Standards
ESLint Configuration
The project uses ESLint with the following key rules:- React Hooks Rules: Enforces Rules of Hooks and exhaustive deps
- React Refresh: Ensures components support HMR
- No Unused Variables: Error, except for uppercase variables (components)
Code Formatting
Follow these conventions: JavaScript/JSX:- Use ES6+ features (arrow functions, destructuring, etc.)
- Use functional components with hooks (no class components)
- Use named exports for components
- Keep components focused and single-purpose
- Use
@/path alias for src imports - Group imports: React → third-party → local components → hooks → styles
- Use named imports from the components barrel file
- Use CSS Modules for component-specific styles
- Name CSS files with
.module.cssextension - Use semantic class names
Adding New Components
Step 1: Create Component Directory
Create a new directory undersrc/components/ with PascalCase naming:
Step 2: Create Component File
Create the JSX file inside the directory: src/components/MyNewComponent/MyNewComponent.jsxStep 3: Create Styles (Optional)
If the component needs specific styles, create a CSS Module: src/components/MyNewComponent/MyNewComponent.module.cssStep 4: Export Component
Add your component to the barrel file for easy imports: src/components/index.jsStep 5: Use the Component
Import and use your new component:Adding New Pages
Step 1: Create Page Component
Create a new file insrc/pages/:
src/pages/MyPage.jsx
Step 2: Add Route
Updatesrc/App.jsx to include the new route:
Step 3: Add Navigation (Optional)
If the page needs to be accessible from navigation, update the Header or relevant component with a link:Creating Custom Hooks
Hook Structure
Custom hooks should:- Start with
useprefix - Be placed in
src/hooks/ - Return values and functions needed by components
- Encapsulate reusable logic
Using Hooks
Import and use in your components:Testing Approach
Currently, the project does not have automated tests configured. When adding tests:Recommended Testing Strategy
- Unit Tests: Test individual components and hooks
- Integration Tests: Test component interactions
- E2E Tests: Test complete user workflows
Suggested Tools
- Vitest: Fast unit testing with Vite integration
- React Testing Library: Component testing
- Playwright or Cypress: E2E testing
Manual Testing Checklist
Before submitting changes, manually verify:- Component renders correctly
- All interactive features work (buttons, forms, links)
- Responsive design works on different screen sizes
- No console errors or warnings
- Navigation works correctly
- Browser back/forward buttons work as expected
- ESLint passes (
npm run lint)
Submitting Changes
Before You Commit
-
Run the linter
Fix any errors or warnings.
-
Test your changes
- Run the dev server and verify functionality
- Test edge cases and different scenarios
- Check responsive design
-
Review your code
- Remove console.logs and debug code
- Check for commented-out code
- Ensure proper formatting
Commit Message Guidelines
Write clear, descriptive commit messages: Format:feat: New featurefix: Bug fixrefactor: Code refactoringstyle: Formatting, missing semicolons, etc.docs: Documentation changeschore: Maintenance tasks
Pull Request Process
-
Create a feature branch
-
Make your changes and commit
-
Push to remote
-
Open a Pull Request
- Provide a clear title and description
- Reference any related issues
- Add screenshots for UI changes
- Request review from maintainers
-
Address feedback
- Make requested changes
- Push updates to the same branch
- Respond to comments
Common Issues and Solutions
Port Already in Use
If port 5173 is already in use:Module Not Found
If you encounter module errors:ESLint Errors
For persistent linting issues:Import Path Issues
Ensure you’re using the correct path alias:- Use
@/componentsinstead of relative paths - Check
vite.config.jsandjsconfig.jsonfor alias configuration
Getting Help
If you encounter issues:- Check existing documentation in this docs site
- Review project structure to understand the codebase
- Look at existing components for examples
- Check the console for error messages
- Ask for help from maintainers or other contributors
Code Review Guidelines
When reviewing code:- Code follows project conventions
- Component structure is logical
- No unnecessary dependencies added
- Styles use CSS Modules appropriately
- Imports use path aliases
- No console.logs or debug code
- Code is readable and well-organized
- Changes are focused and purposeful
Next Steps
Now that you understand the contribution process:- Explore the Project Structure to understand the codebase
- Pick an issue or feature to work on
- Set up your development environment
- Start coding and have fun!