This guide explains how to set up and work on the Open Hardware Initiative website as a developer.
- Git - Download here
- Bun (recommended) - Download here
- Node.js 18+ (alternative) - Download here
- Code Editor - VS Code, Sublime Text, etc.
- TypeScript and JavaScript Language Features
- Tailwind CSS IntelliSense
- ESLint
- Prettier
- GitHub Copilot - AI coding assistant (highly recommended!)
git clone https://github.com/OpenHardware-Initiative/OpenHardware-Initiative.github.io.git
cd OpenHardware-Initiative.github.iocd "Source code"
bun installbun run devThe site will be available at http://localhost:8080
-
Create a feature branch (optional for small changes)
git checkout -b feature/your-feature-name
-
Make your changes in the code
-
Test locally - Check the browser for your changes
-
Commit your changes
git add . git commit -m "Add feature: brief description"
-
Push to main branch
git push origin main
- Lint your code:
bun run lint - Check TypeScript errors in your editor
- Test on different screen sizes (mobile, tablet, desktop)
GitHub Copilot is excellent for this project! It can help with:
- Component generation - "Create a React component for a team member card"
- Tailwind classes - "Add responsive grid layout with 3 columns on desktop"
- TypeScript interfaces - "Create interface for project data"
- Common patterns - "Add conditional rendering for loading state"
Pro tip: Be specific in your prompts for better results!
- Save any file to see changes immediately
- Browser automatically refreshes
- No need to restart the dev server
- Browser DevTools - Check console for errors
- React DevTools - Inspect component state
- Network tab - Check for failed requests
- Vite error overlay - Shows build errors in browser
bun run dev # Start development server
bun run build # Build for production
bun run preview # Preview production build
bun run lint # Check code qualitysrc/
├── components/ # React components
├── pages/ # Page components
├── data/ # Content data (edit these!)
├── config/ # Configuration files
├── hooks/ # Custom React hooks
├── utils/ # Utility functions
└── lib/ # Third-party library configs
- Content:
src/data/files - Components:
src/components/ - Pages:
src/pages/ - Styling: Tailwind classes in components
- Configuration:
src/config/files
- Use TypeScript for all new code
- Follow existing patterns in the codebase
- Use meaningful variable names
- Add comments for complex logic
- Small, focused commits - One change per commit
- Descriptive commit messages - "Add team member: John Doe"
- Test before pushing - Always test locally first
- Optimize images before adding to public/
- Use lazy loading for heavy components
- Check bundle size with
bun run build
- Push to main → GitHub Actions builds and deploys
- No manual steps required
- Site updates in 2-3 minutes
bun run build
bun run previewPro Tip: GitHub Copilot is incredibly helpful for this React/TypeScript/Tailwind stack. It understands the project structure and can generate code that follows existing patterns!