Thank you for your interest in contributing to goapps-frontend! This document contains guidelines for contributing to the frontend application.
- Getting Started
- Development Environment
- Contribution Workflow
- Pull Request Guidelines
- Code Review Process
- Testing Requirements
- Documentation Standards
- Adding Components
- Adding Pages
- Getting Help
- Node.js 20+ - Download
- npm - Package manager
- Git - Version control
- VSCode - Recommended editor
# Verify Node.js version
node --version # Should be 20+
# Install dependencies
npm install# Clone with SSH
git clone git@github.com:mutugading/goapps-frontend.git
cd goapps-frontend
# Or with HTTPS
git clone https://github.com/mutugading/goapps-frontend.git
cd goapps-frontendRecommended extensions:
{
"recommendations": [
"dbaeumer.vscode-eslint",
"bradlc.vscode-tailwindcss",
"esbenp.prettier-vscode",
"formulahendry.auto-rename-tag"
]
}npm run devOpen http://localhost:3000.
Create .env.local for local development:
# Backend Services
COSTING_SERVICE_HOST=localhost
COSTING_SERVICE_PORT=50051| Script | Description |
|---|---|
npm run dev |
Start dev server |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
For major changes, create an issue first using available templates:
| Template | Usage |
|---|---|
| 🐛 Bug Report | Report bugs |
| ✨ Feature Request | Request features |
| 📱 UI/UX Improvement | Suggest UI changes |
# Update main branch
git checkout main
git pull origin main
# Create feature branch
git checkout -b <type>/<description>
# Examples:
git checkout -b feat/finance-dashboard
git checkout -b fix/sidebar-collapse
git checkout -b refactor/chart-components# 1. Write code following RULES.md
# 2. Check for lint errors
npm run lint
# 3. Check for type errors
npx tsc --noEmit
# 4. Build to verify
npm run buildgit add .
git commit -m "feat(finance): add UOM table component"
git push origin <branch-name>Create PR via GitHub UI using the PR template.
| Requirement | Description |
|---|---|
| CI Passing | Lint, type check, build pass |
| Review Approval | 1 maintainer approval |
| No Conflicts | Up-to-date with main |
| Screenshots | Include for UI changes |
| Label | Description |
|---|---|
type: feature |
New feature |
type: bug |
Bug fix |
type: ui |
UI/UX changes |
module: finance |
Finance module |
module: hr |
HR module |
component: sidebar |
Sidebar component |
For Reviewers:
- Follows RULES.md guidelines
- Component structure correct
- Loading states implemented
- Responsive design tested
- Dark mode compatible
- TypeScript types proper
- No unnecessary re-renders
| PR Type | SLA |
|---|---|
| Bug fix | 24 hours |
| Feature | 48 hours |
| Large refactor | 1 week |
# 1. Lint check
npm run lint
# 2. Type check
npx tsc --noEmit
# 3. Build check
npm run build
# 4. Manual testing
npm run dev- Desktop (1440px+)
- Tablet (768px)
- Mobile (375px)
- Light mode
- Dark mode
- Keyboard navigation
- ✅ Adding new components
- ✅ Adding new pages
- ✅ Changing navigation
- ✅ Changing API integration
- ✅ Breaking changes
/**
* PageHeader - Standard page header with title and actions
*
* @example
* <PageHeader title="Dashboard" subtitle="Overview">
* <Button>Action</Button>
* </PageHeader>
*/
export function PageHeader({ title, subtitle, children }: PageHeaderProps) {
// ...
}# Location: src/components/common/my-component.tsx"use client" // Only if needed
import { cn } from "@/lib/utils"
export interface MyComponentProps {
title: string
className?: string
}
export function MyComponent({ title, className }: MyComponentProps) {
return (
<div className={cn("base-styles", className)}>
{title}
</div>
)
}// src/components/common/index.ts
export { MyComponent } from "./my-component"npx shadcn@latest add [component-name]
⚠️ Never modify files incomponents/ui/
# Location: src/app/(dashboard)/[module]/[page]/page.tsximport { PageHeader } from "@/components/common"
export default function MyPage() {
return (
<div>
<PageHeader title="Page Title" />
{/* Content */}
</div>
)
}// src/app/(dashboard)/[module]/[page]/loading.tsx
import { TableSkeleton } from "@/components/loading"
export default function Loading() {
return <TableSkeleton />
}// src/config/navigation.ts
{
title: "New Page",
url: "/module/page",
icon: SomeIcon,
}| Channel | Purpose |
|---|---|
| GitHub Issues | Bug reports, features |
| Slack #goapps-frontend | Quick questions |
- ✅ Search existing issues
- ✅ Read documentation
- ✅ Check RULES.md
- ✅ Try debugging first
- 🤝 Be respectful
- 💡 Give constructive feedback
- 📝 Document your changes
- ✅ Test before pushing
- 🙋 Ask if unsure
Thank you for contributing! 🚀