|
| 1 | +# Contributing to PolicyEngine App V2 |
| 2 | + |
| 3 | +Welcome to our newest frontend project! We're excited to have you contribute. This guide will help you get started and understand our development workflow. |
| 4 | + |
| 5 | +## Project Overview |
| 6 | + |
| 7 | +This project is the next iteration of our application (app-v2), building upon the foundation of app-v1. We're creating a modern, component-based frontend that includes: |
| 8 | +- Interactive calculator-related pages with dynamic functionality (Policy, Population, Simulation, etc) |
| 9 | +- Static informational pages (About Us, Learning, API Playground, etc.) |
| 10 | +- Improved user experience and performance |
| 11 | + |
| 12 | +## Getting Started |
| 13 | + |
| 14 | +Before you begin, please refer to the main README.md for development setup and helpful commands. |
| 15 | + |
| 16 | +### Link to Figma Designs |
| 17 | + |
| 18 | +🎨 **Figma Access**: [Design Files Link](https://www.figma.com/design/ZZLB3A5QNYy97d7dBEPpQ8/PE-App-Redesign---Final-Screens?m=auto&t=0MkV9on8ot5RR4Lv-6) |
| 19 | + |
| 20 | +**To get access:** |
| 21 | +1. Please visit the link and request access. |
| 22 | +2. Alternatively, please sign up with your email and provide your Figma account email to maintenaners for access. You'll receive an invitation with instructions shortly. |
| 23 | + |
| 24 | +### A Note On Design Availability |
| 25 | + |
| 26 | +- ✅ **Calculator pages**: Full Figma designs available |
| 27 | +- ⏳ **Static pages**: No Figma Designs available. For now - refer to app-v1 components. Use these as functional reference, but implement with modern patterns and our new design system. |
| 28 | + |
| 29 | +### Design System Guidelines |
| 30 | + |
| 31 | +- We follow Mantine's design system as our foundation. Documentation Link: [https://mantine.dev/](https://mantine.dev/) |
| 32 | +- Custom styling should align with our defined design tokens. Check `/src/styles/` and `src/designTokens` directories for our styling constants |
| 33 | +- **Component Patterns**: Refer to existing app-v2 components in `/src/components/` (Sample: `src/components/IngredientReadView.tsx`) |
| 34 | +- **TypeScript Guidelines**: Follow strict TypeScript practice |
| 35 | + |
| 36 | +## Development Workflow |
| 37 | + |
| 38 | +### Finding Beginner-Friendly Issues |
| 39 | + |
| 40 | +- For existing contributors: Issues have been or will be assigned to you. |
| 41 | +- For new contributors, look for labels `good first issue` or `help wanted` in our issue tracker and assign yourself. |
| 42 | +These Issues have links and screenshots for the reference app-v1 component that is to be migrated over to app-v2. |
| 43 | + |
| 44 | +### Recommended Progression Path |
| 45 | + |
| 46 | +We recommend contributors follow this learning path: |
| 47 | + |
| 48 | +1. **Start with Components** (Beginner) |
| 49 | + - Create individual UI components. |
| 50 | + - Focus on reusability and proper TypeScript types. |
| 51 | + - [Optionally] Write Storybook stories and tests. |
| 52 | + |
| 53 | +2. **Move to Integration** (Intermediate) |
| 54 | + - Combine components into page sections |
| 55 | + - Handle component interactions and state management |
| 56 | + |
| 57 | +### Branch Naming Conventions |
| 58 | + |
| 59 | +Use the following format for branch names: |
| 60 | +- `feat/[issue-number]-brief-description` (e.g., `feat/123-add-calculator-component`) |
| 61 | +- `fix/[issue-number]-brief-description` (e.g., `fix/456-fix-navigation-bug`) |
| 62 | +- `docs/brief-description` (e.g., `docs/update-contributing-guide`) |
| 63 | + |
| 64 | +### Development Standards |
| 65 | + |
| 66 | +Our project uses automated code quality tools: |
| 67 | +- **ESLint**: `npm run lint` (with eslint-config-mantine) |
| 68 | +- **Prettier**: `npm run prettier` and `npm run prettier:write` |
| 69 | +- **TypeScript**: `npm run typecheck` |
| 70 | + |
| 71 | +All checks must pass before merging. |
| 72 | + |
| 73 | +### Testing Requirements (Optional for now) |
| 74 | + |
| 75 | +- Write unit tests for new components using Vitest + React Testing Library |
| 76 | +- Ensure all tests pass: `npm run test` |
| 77 | +- Aim for good test coverage of component functionality |
| 78 | +- Add Storybook stories for visual components |
| 79 | + |
| 80 | +### Pull Request Process |
| 81 | + |
| 82 | +1. Create a new branch from `master` |
| 83 | +2. Make your changes with clear, atomic commits |
| 84 | +3. Run the full test suite: `npm run test` (Skip this step until tests are added) |
| 85 | +4. Push your branch and create a pull request |
| 86 | +5. Fill out the PR template completely |
| 87 | +6. Link the related issue(s) -> 'Fixes #IssueNumber' |
| 88 | +7. Wait for code review and address feedback |
| 89 | + |
| 90 | +### Review Process |
| 91 | + |
| 92 | +- All PRs require at least one approval from a maintainer |
| 93 | +- Automated checks must pass (tests, linting, type checking) |
| 94 | +- Address all review comments before merging |
| 95 | +- PRs will be merged by maintainers after approval |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +Thank you for contributing to our project! Your help makes this application better for everyone. 🚀 |
0 commit comments