Implement remaining handlers and fix admin login
- Fix admin login bcrypt hash in database migrations - Add static data handler (GET /api/static_data/, POST /api/static_data/refresh/) - Add user handler (list users, get user, list profiles in shared residences) - Add generate tasks report endpoint for residences - Remove all placeholder handlers from router - Add seeding documentation to README New files: - internal/handlers/static_data_handler.go - internal/handlers/user_handler.go - internal/services/user_service.go - internal/dto/responses/user.go 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
45
README.md
45
README.md
@@ -136,6 +136,51 @@ This Go version uses the same PostgreSQL database as the Django version. GORM mo
|
||||
- `residence_residence` - Residences
|
||||
- `task_task` - Tasks
|
||||
|
||||
## Seeding Data
|
||||
|
||||
Seed files are located in `seeds/`:
|
||||
- `001_lookups.sql` - Lookup tables (residence types, task categories, priorities, etc.)
|
||||
- `002_test_data.sql` - Test users, residences, tasks, contractors, etc.
|
||||
|
||||
### Local Development
|
||||
|
||||
```bash
|
||||
# Seed lookup tables
|
||||
./dev.sh seed
|
||||
|
||||
# Seed test data
|
||||
./dev.sh seed-test
|
||||
```
|
||||
|
||||
### Production (Dokku)
|
||||
|
||||
```bash
|
||||
# Seed lookup tables (required)
|
||||
cat seeds/001_lookups.sql | dokku postgres:connect mycrib-db
|
||||
|
||||
# Seed test data
|
||||
cat seeds/002_test_data.sql | dokku postgres:connect mycrib-db
|
||||
```
|
||||
|
||||
### Test Users
|
||||
|
||||
All test users have password: `password123`
|
||||
|
||||
| Username | Email | Tier | Notes |
|
||||
|----------|-------|------|-------|
|
||||
| admin | admin@example.com | Pro | Admin user |
|
||||
| john | john@example.com | Pro | Owns 2 residences |
|
||||
| jane | jane@example.com | Free | Owns 1 residence, shared access to residence 1 |
|
||||
| bob | bob@example.com | Free | Owns 1 residence |
|
||||
|
||||
### Test Data Includes
|
||||
|
||||
- 4 residences (house, beach house, apartment, condo)
|
||||
- 4 contractors with specialties
|
||||
- 10 tasks across residences
|
||||
- Documents/warranties
|
||||
- Notifications
|
||||
|
||||
## Migration from Django
|
||||
|
||||
This is a full rewrite that maintains API compatibility. The mobile clients (KMM) work with both versions without changes.
|
||||
|
||||
Reference in New Issue
Block a user