Skip to content

Commit b0fb765

Browse files
authored
Merge pull request #13 from elzacka/claude/FINAL-revert-oct23-011CUWF8mZH378WgNiNQgQgX
revert: restore app to working state from Oct 23, 2:45 AM (commit a95…
2 parents a764aad + 7b6cac2 commit b0fb765

File tree

8 files changed

+782
-4906
lines changed

8 files changed

+782
-4906
lines changed

.gitignore

Lines changed: 2 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -13,41 +13,6 @@ dist-ssr
1313
dev-dist
1414
*.local
1515

16-
# Environment variables and secrets
17-
.env
18-
.env.local
19-
.env.development
20-
.env.development.local
21-
.env.test.local
22-
.env.production.local
23-
.env.staging
24-
.env*.local
25-
*.env
26-
!.env.example
27-
28-
# Credentials and secrets (various formats)
29-
credentials.json
30-
secrets.json
31-
*-credentials.json
32-
*-secrets.json
33-
*.pem
34-
*.key
35-
*.cert
36-
*.p12
37-
*.pfx
38-
service-account*.json
39-
firebase-adminsdk*.json
40-
.credentials/
41-
.secrets/
42-
43-
# API keys and tokens
44-
*api-key*
45-
*apikey*
46-
*api_key*
47-
*.token
48-
auth-token*
49-
access-token*
50-
5116
# Editor directories and files
5217
.vscode/*
5318
!.vscode/extensions.json
@@ -59,79 +24,10 @@ access-token*
5924
*.sln
6025
*.sw?
6126

62-
# Temporary files and folders
63-
temp/
64-
tmp/
65-
*.tmp
66-
.cache/
67-
*.backup
68-
*.bak
69-
70-
# Test coverage
71-
coverage/
72-
*.lcov
73-
74-
# Prettier
75-
.prettier-cache
76-
77-
# For Claude and app owner/developer - Personal/temporary files
27+
# For Claude and app owner/developer
7828
CLAUDE.md
7929
Console log in localhost.md
8030
Console log debug info.md
8131
Github build errors.md
32+
s1.png
8233
UI adjustments.md
83-
*.local.md
84-
notes/
85-
debug/
86-
scratch/
87-
personal/
88-
TODO.md
89-
NOTES.md
90-
.scratch/
91-
92-
# Screenshots and media (development/debugging)
93-
*.png
94-
*.jpg
95-
*.jpeg
96-
*.gif
97-
*.bmp
98-
*.webp
99-
*.mp4
100-
*.mov
101-
*.avi
102-
!public/**/*.png
103-
!public/**/*.jpg
104-
!public/**/*.jpeg
105-
!public/**/*.gif
106-
!public/**/*.webp
107-
!public/**/*.svg
108-
!src/assets/**/*
109-
!docs/**/*
110-
111-
# Debug and troubleshooting files
112-
*.dump
113-
*.trace
114-
*.profile
115-
debug.log
116-
error.log
117-
combined.log
118-
performance.log
119-
*.har
120-
*.cpuprofile
121-
*.heapsnapshot
122-
123-
# Database files (if any)
124-
*.db
125-
*.sqlite
126-
*.sqlite3
127-
*.db-journal
128-
129-
# OS-specific files
130-
Thumbs.db
131-
Desktop.ini
132-
.AppleDouble
133-
.LSOverride
134-
Icon
135-
._*
136-
.Spotlight-V100
137-
.Trashes

README.md

Lines changed: 25 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -118,90 +118,35 @@ The application uses a cohesive Norwegian nature-inspired color palette:
118118

119119
## 🤝 Contributing
120120

121-
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed development guidelines.
122-
123-
### Quick Start - Remote Development
124-
125-
**Option 1: GitHub Codespaces (Recommended)**
126-
```bash
127-
1. Click "Code""Codespaces""Create codespace on main"
128-
2. Wait for environment to build (automatic npm install)
129-
3. Run: npm run dev
130-
4. Access dev server via forwarded port
131-
```
132-
133-
**Option 2: Local Development**
134-
```bash
135-
git clone https://github.com/elzacka/trakke-react.git
136-
cd trakke-react
137-
npm install
138-
npm run dev
139-
```
140-
141-
### Development Workflow (Zero Local Setup Required)
142-
143-
1. **Create Feature Branch**
121+
### Development Workflow
122+
1. Fork repository → create feature branch
123+
2. **ALWAYS run before committing**:
144124
```bash
145-
git checkout -b feature/your-feature-name
125+
npm run lint # Must pass with 0 errors (max 150 warnings)
126+
npm run build # TypeScript build must succeed
146127
```
147-
148-
2. **Make Changes** - Automatic quality checks on commit via Husky
149-
- ESLint auto-fixes on commit
150-
- Prettier formats code
151-
- Tests run automatically
152-
153-
3. **Push to GitHub** - Branch preview deploys automatically
128+
3. Use the safe-commit helper script (recommended):
154129
```bash
155-
git push -u origin feature/your-feature-name
130+
./scripts/safe-commit.sh "Your commit message"
156131
```
157-
158-
4. **Test Your Feature**
159-
- Preview URL posted in PR comments
160-
- Scan QR code to test on iPhone
161-
- Test desktop in any browser
162-
163-
5. **Create Pull Request**
164-
- Automated quality checks run
165-
- Preview deployment updates on each push
166-
- Merge when all checks pass
167-
168-
### Quality Automation
169-
170-
**Automated on every commit:**
171-
- ESLint auto-fix
172-
- Prettier formatting
173-
- Type checking (via pre-commit hook)
174-
175-
**Automated on every push:**
176-
- Full test suite
177-
- Build verification
178-
- Preview deployment
179-
- Quality check reports
180-
181-
**Automated weekly:**
182-
- Dependency updates via Dependabot
183-
184-
### Available Commands
185-
186-
```bash
187-
npm run dev # Start development server
188-
npm run build # Production build
189-
npm run typecheck # TypeScript type checking
190-
npm run lint # Run ESLint
191-
npm run lint:fix # Auto-fix ESLint issues
192-
npm run format # Format with Prettier
193-
npm test # Run tests in watch mode
194-
npm run test:ui # Open Vitest UI
195-
npm run test:coverage # Run tests with coverage
196-
```
197-
198-
### Claude Code Commands
199-
200-
If using Claude Code, custom slash commands are available:
201-
- `/check` - Run all quality checks
202-
- `/test` - Run tests with optional coverage
203-
- `/fix` - Auto-fix linting and formatting
204-
- `/review` - Comprehensive code review
132+
4. Follow TypeScript + Norwegian terminology guidelines
133+
5. Test on desktop and mobile before submitting PR
134+
135+
### Code Quality Requirements
136+
- **ESLint**: Zero tolerance for errors, max 150 warnings
137+
- **TypeScript**: All builds must pass type checking
138+
- **Pre-commit Hook**: Automatically blocks commits with ESLint errors
139+
- **Language**: All user-facing text in Norwegian (Bokmål)
140+
141+
### Adding POI Categories
142+
1. Add fetch function to appropriate service (e.g., `src/services/overpassService.ts`)
143+
2. Add transform function to `src/MapLibreTrakkeApp.tsx`
144+
3. Add loading logic to main POI loading `useEffect`
145+
4. Enable category in `src/components/HierarchicalCategoryFilter.tsx`
146+
5. Verify POI type exists in `src/data/pois.ts`
147+
6. Add data attribution to "Om kartet" modal
148+
149+
See `CLAUDE.md` for detailed implementation guidelines.
205150

206151
## 🏔️ Norwegian Heritage
207152

0 commit comments

Comments
 (0)