Thank you for contributing to the SMKN 32 Smart Assist project! This document outlines our development workflow and branching strategy.
This is a monorepo with separate frontend and backend directories. We use a bidirectional auto-sync strategy to keep all branches updated while maintaining clear ownership boundaries.
| Branch | Purpose | Developers | Directory Access |
|---|---|---|---|
main |
Production code | All (read-only) | All directories |
frontend-dev |
Frontend development | Frontend team | Can only modify frontend/ |
backend-dev |
Backend development | Backend team | Can only modify backend/ |
-
Clone and checkout frontend-dev:
git clone https://github.com/BinaryNeedle/SMKN32SmartAssist.git cd SMKN32SmartAssist git checkout frontend-dev -
Make changes (only in
frontend/directory):cd frontend # Make your changes git add . git commit -m "feat(frontend): your feature description"
-
Push to frontend-dev:
git push origin frontend-dev
-
Automatic sync (handled by GitHub Actions):
- Your changes auto-merge to
main mainauto-syncs tobackend-dev- Backend developers get your latest changes!
- Your changes auto-merge to
Same process, but work in backend/ directory:
git checkout backend-dev
cd backend
# Make your changes
git add .
git commit -m "feat(backend): your feature description"
git push origin backend-dev✅ Full monorepo on your branch - Run both frontend and backend locally
✅ Automatic syncing - No manual merges needed
✅ Latest code - Always have the other team's latest changes
✅ Clear boundaries - Can't accidentally modify the wrong directory
Our CI automatically blocks pull requests that violate directory ownership:
- ❌ Frontend PR touching
backend/→ Rejected - ❌ Backend PR touching
frontend/→ Rejected - ✅ Frontend PR touching only
frontend/→ Allowed - ✅ Backend PR touching only
backend/→ Allowed
Frontend:
cd frontend
npm install
npm run dev
# Open http://localhost:3000Backend (Bun/TypeScript):
cd backend
bun install
bun run dev
# Backend runs on http://localhost:8000Both together:
# Terminal 1
cd frontend && npm run dev
# Terminal 2
cd backend && bun run devWe use semantic commit messages:
<type>(<scope>): <short description>
[optional body]
[optional footer]
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, no logic change)refactor: Code refactoringtest: Adding testschore: Maintenance tasks
frontend: Changes infrontend/directorybackend: Changes inbackend/directoryci: CI/CD workflow changes
feat(frontend): add chat history pagination
fix(backend): resolve RAG embedding timeout
docs: update README with deployment guide
chore(ci): add PR validation workflow
- Use ESLint and Prettier
- Run
npm run lintbefore committing - Write TypeScript (avoid
anytypes)
- Use Biome for formatting
- Run
bun run formatbefore committing - Add structured logging (no
console.log)
- Technical issues: Open a GitHub issue
- Security concerns: See
backend/SECURITY.md - Deployment: See
backend/DEPLOYMENT.md
Happy coding! 🚀