Major features: - Add drag-and-drop photo gallery to Service create/edit modals - Add Resource Types management section to Settings (CRUD for custom types) - Add edit icon consistency to Resources table (pencil icon in actions) - Improve Services page with drag-to-reorder and customer preview mockup Backend changes: - Add photos JSONField to Service model with migration - Add ResourceType model with category (STAFF/OTHER), description fields - Add ResourceTypeViewSet with CRUD operations - Add service reorder endpoint for display order Frontend changes: - Services page: two-column layout, drag-reorder, photo upload - Settings page: Resource Types tab with full CRUD modal - Resources page: Edit icon in actions column instead of row click - Sidebar: Payments link visibility based on role and paymentsEnabled - Update types.ts with Service.photos and ResourceTypeDefinition Note: Removed photos from ResourceType (kept only for Service) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
103 lines
3.2 KiB
Markdown
103 lines
3.2 KiB
Markdown
# SmoothSchedule - Multi-Tenant Scheduling Platform
|
|
|
|
## Quick Reference
|
|
|
|
### Project Structure
|
|
```
|
|
/home/poduck/Desktop/smoothschedule2/
|
|
├── frontend/ # React + Vite + TypeScript frontend
|
|
│ └── CLAUDE.md # Frontend-specific docs
|
|
│
|
|
├── smoothschedule/ # Django backend (RUNS IN DOCKER!)
|
|
│ └── CLAUDE.md # Backend-specific docs
|
|
│
|
|
└── legacy_reference/ # Old code for reference (do not modify)
|
|
```
|
|
|
|
### Development URLs
|
|
- **Frontend:** `http://demo.lvh.me:5173` (or any business subdomain)
|
|
- **Platform Frontend:** `http://platform.lvh.me:5173`
|
|
- **Backend API:** `http://lvh.me:8000/api/`
|
|
|
|
Note: `lvh.me` resolves to `127.0.0.1` - required for subdomain cookies to work.
|
|
|
|
## CRITICAL: Backend Runs in Docker
|
|
|
|
**NEVER run Django commands directly.** Always use Docker Compose:
|
|
|
|
```bash
|
|
cd /home/poduck/Desktop/smoothschedule2/smoothschedule
|
|
|
|
# Run migrations
|
|
docker compose -f docker-compose.local.yml exec django python manage.py migrate
|
|
|
|
# Django shell
|
|
docker compose -f docker-compose.local.yml exec django python manage.py shell
|
|
|
|
# View logs
|
|
docker compose -f docker-compose.local.yml logs -f django
|
|
|
|
# Any management command
|
|
docker compose -f docker-compose.local.yml exec django python manage.py <command>
|
|
```
|
|
|
|
## Key Configuration Files
|
|
|
|
### Backend (Django)
|
|
| File | Purpose |
|
|
|------|---------|
|
|
| `smoothschedule/docker-compose.local.yml` | Docker services config |
|
|
| `smoothschedule/.envs/.local/.django` | Django env vars (SECRET_KEY, etc.) |
|
|
| `smoothschedule/.envs/.local/.postgres` | Database credentials |
|
|
| `smoothschedule/config/settings/local.py` | Local Django settings |
|
|
| `smoothschedule/config/settings/base.py` | Base Django settings |
|
|
| `smoothschedule/config/urls.py` | URL routing |
|
|
|
|
### Frontend (React)
|
|
| File | Purpose |
|
|
|------|---------|
|
|
| `frontend/.env.development` | Vite env vars |
|
|
| `frontend/vite.config.ts` | Vite configuration |
|
|
| `frontend/src/api/client.ts` | Axios API client |
|
|
| `frontend/src/types.ts` | TypeScript interfaces |
|
|
| `frontend/src/i18n/locales/en.json` | Translations |
|
|
|
|
## Key Django Apps
|
|
|
|
| App | Location | Purpose |
|
|
|-----|----------|---------|
|
|
| `schedule` | `smoothschedule/smoothschedule/schedule/` | Resources, Events, Services |
|
|
| `users` | `smoothschedule/smoothschedule/users/` | Authentication, User model |
|
|
| `tenants` | `smoothschedule/smoothschedule/tenants/` | Multi-tenancy (Business model) |
|
|
|
|
## Common Tasks
|
|
|
|
### After modifying Django models:
|
|
```bash
|
|
cd /home/poduck/Desktop/smoothschedule2/smoothschedule
|
|
docker compose -f docker-compose.local.yml exec django python manage.py makemigrations
|
|
docker compose -f docker-compose.local.yml exec django python manage.py migrate
|
|
```
|
|
|
|
### After modifying frontend:
|
|
Frontend hot-reloads automatically. If issues, restart:
|
|
```bash
|
|
cd /home/poduck/Desktop/smoothschedule2/frontend
|
|
npm run dev
|
|
```
|
|
|
|
### Debugging 500 errors:
|
|
```bash
|
|
cd /home/poduck/Desktop/smoothschedule2/smoothschedule
|
|
docker compose -f docker-compose.local.yml logs django --tail=100
|
|
```
|
|
|
|
### Testing API directly:
|
|
```bash
|
|
curl -s "http://lvh.me:8000/api/resources/" | jq
|
|
```
|
|
|
|
## Git Branch
|
|
Currently on: `feature/platform-superuser-ui`
|
|
Main branch: `main`
|