docs: add frontend onboarding docs
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 55s
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 55s
This commit is contained in:
83
docs/workflow.md
Normal file
83
docs/workflow.md
Normal file
@@ -0,0 +1,83 @@
|
||||
# Development Workflow
|
||||
|
||||
This repo is intentionally simple: make changes, validate locally, then push only when ready.
|
||||
|
||||
## Start a session
|
||||
|
||||
```bash
|
||||
git status --short --branch
|
||||
git fetch origin main
|
||||
```
|
||||
|
||||
If working on staging:
|
||||
|
||||
```bash
|
||||
git switch terry-staging
|
||||
git pull --ff-only
|
||||
```
|
||||
|
||||
If working directly on production deploy branch:
|
||||
|
||||
```bash
|
||||
git switch main
|
||||
git pull --ff-only origin main
|
||||
```
|
||||
|
||||
## Make changes
|
||||
|
||||
Use the existing structure:
|
||||
|
||||
- Public pages: `src/pages/`
|
||||
- Admin pages: `src/pages/admin/`
|
||||
- Shared components: `src/components/`
|
||||
- API helpers/types: `src/api.ts`
|
||||
- Translations/copy: `src/i18n.tsx`
|
||||
- Display helpers: `src/utils/`
|
||||
|
||||
Avoid editing generated `dist/` files.
|
||||
|
||||
## Validate
|
||||
|
||||
Run:
|
||||
|
||||
```bash
|
||||
npx tsc --noEmit
|
||||
npm run format:check
|
||||
npm run build
|
||||
```
|
||||
|
||||
For formatting fixes:
|
||||
|
||||
```bash
|
||||
npm run format
|
||||
```
|
||||
|
||||
## Commit
|
||||
|
||||
Check the diff first:
|
||||
|
||||
```bash
|
||||
git diff
|
||||
git status --short
|
||||
```
|
||||
|
||||
Use concise commits, for example:
|
||||
|
||||
```bash
|
||||
git add <files>
|
||||
git commit -m "fix: remove unused imports"
|
||||
```
|
||||
|
||||
## Push
|
||||
|
||||
Only push when Terry asks.
|
||||
|
||||
```bash
|
||||
git push origin main
|
||||
```
|
||||
|
||||
or for staging:
|
||||
|
||||
```bash
|
||||
git push origin terry-staging
|
||||
```
|
||||
Reference in New Issue
Block a user