deps
This commit is contained in:
parent
ebd50740f0
commit
1a6d7291c4
6 changed files with 496 additions and 75 deletions
74
README.md
74
README.md
|
@ -11,6 +11,7 @@ persistence.
|
|||
- Real-time collaboration with Server-Sent Events
|
||||
- Item locking mechanism to prevent conflicts
|
||||
- Hierarchical items (parent-child relationships)
|
||||
- **Item dependencies: Define prerequisites for completing items**
|
||||
- SQLite database for data persistence
|
||||
- **Modern web frontend with React and TypeScript**
|
||||
- **Real-time updates across multiple browser tabs/windows**
|
||||
|
@ -293,7 +294,8 @@ All API endpoints return JSON responses with a consistent format:
|
|||
"content": "New item",
|
||||
"checked": false,
|
||||
"parent_id": null,
|
||||
"checklist_uuid": "123e4567-e89b-12d3-a456-426614174000"
|
||||
"checklist_uuid": "123e4567-e89b-12d3-a456-426614174000",
|
||||
"dependencies": []
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -309,7 +311,8 @@ All API endpoints return JSON responses with a consistent format:
|
|||
"content": "Updated content",
|
||||
"checked": true,
|
||||
"parent_id": null,
|
||||
"checklist_uuid": "123e4567-e89b-12d3-a456-426614174000"
|
||||
"checklist_uuid": "123e4567-e89b-12d3-a456-426614174000",
|
||||
"dependencies": [2, 3]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -348,7 +351,16 @@ All API endpoints return JSON responses with a consistent format:
|
|||
"content": "Item 1",
|
||||
"checked": false,
|
||||
"parent_id": null,
|
||||
"checklist_uuid": "123e4567-e89b-12d3-a456-426614174000"
|
||||
"checklist_uuid": "123e4567-e89b-12d3-a456-426614174000",
|
||||
"dependencies": []
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"content": "Item 2",
|
||||
"checked": true,
|
||||
"parent_id": null,
|
||||
"checklist_uuid": "123e4567-e89b-12d3-a456-426614174000",
|
||||
"dependencies": [1]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -363,8 +375,9 @@ All API endpoints return JSON responses with a consistent format:
|
|||
|
||||
The application uses SQLite with the following schema:
|
||||
|
||||
- `checklists` table: Stores checklist metadata
|
||||
- `checklist_info` table: Stores checklist metadata (uuid, name)
|
||||
- `items` table: Stores checklist items with hierarchical relationships
|
||||
- `dependencies` table: Stores item dependencies (item_id, dependency_id)
|
||||
|
||||
## Real-time Features
|
||||
|
||||
|
@ -374,6 +387,41 @@ The application uses SQLite with the following schema:
|
|||
- **Broadcast updates to all connected clients**
|
||||
- **Immediate UI updates**: Changes appear instantly across all browsers
|
||||
|
||||
## Item Dependencies
|
||||
|
||||
The application supports item dependencies, allowing you to define prerequisites
|
||||
that must be completed before an item can be marked as done.
|
||||
|
||||
### How Dependencies Work
|
||||
|
||||
- **Prerequisites**: Items can depend on other items being completed first
|
||||
- **Visual Indicators**: Items with unmet dependencies show warning indicators
|
||||
- **Prevention**: Items cannot be completed until all dependencies are satisfied
|
||||
- **Circular Prevention**: The system prevents circular dependencies
|
||||
- **Real-time Updates**: Dependency status updates in real-time across all
|
||||
clients
|
||||
|
||||
### Managing Dependencies
|
||||
|
||||
1. **Add Dependencies**: Click the dependency icon (⚡) on any item to open the
|
||||
dependency manager
|
||||
2. **Select Prerequisites**: Choose which items must be completed first
|
||||
3. **Visual Feedback**: Items show dependency status with color-coded
|
||||
indicators:
|
||||
- 🟠 Orange: Dependencies not met (shows count)
|
||||
- 🟢 Green: All dependencies met (shows "Ready")
|
||||
4. **Completion Prevention**: Items with unmet dependencies cannot be checked
|
||||
off
|
||||
|
||||
### Dependency Features
|
||||
|
||||
- **Flexible Dependencies**: Items can depend on any number of other items
|
||||
- **Hierarchical Support**: Dependencies work with parent-child relationships
|
||||
- **Real-time Validation**: Dependency status updates immediately when items are
|
||||
completed
|
||||
- **Clear Feedback**: Users see exactly which items need to be completed first
|
||||
- **Error Prevention**: System prevents circular dependencies automatically
|
||||
|
||||
## Development
|
||||
|
||||
### Local Development
|
||||
|
@ -383,7 +431,8 @@ To run in development mode with automatic reloading, you can use tools like
|
|||
|
||||
#### Using the Development Script
|
||||
|
||||
The project includes a development script that runs both backend and frontend with hot reloading:
|
||||
The project includes a development script that runs both backend and frontend
|
||||
with hot reloading:
|
||||
|
||||
```bash
|
||||
# Start development environment
|
||||
|
@ -391,6 +440,7 @@ The project includes a development script that runs both backend and frontend wi
|
|||
```
|
||||
|
||||
This will:
|
||||
|
||||
- Start the Go backend with Air for hot reloading
|
||||
- Start the React frontend with Vite for hot reloading
|
||||
- Proxy API requests from frontend to backend
|
||||
|
@ -413,6 +463,7 @@ For a consistent development environment using Docker with hot reloading:
|
|||
```
|
||||
|
||||
This will:
|
||||
|
||||
- Build a development container with all dependencies
|
||||
- Mount your source code for hot reloading
|
||||
- Start both backend (Air) and frontend (Vite) with hot reloading
|
||||
|
@ -440,8 +491,10 @@ docker-compose -f docker-compose.dev.yml up --build --force-recreate
|
|||
|
||||
The Docker development environment includes:
|
||||
|
||||
- **Hot Reloading**: Both Go backend and React frontend reload automatically on code changes
|
||||
- **Volume Mounts**: Your local code is mounted into the container for live editing
|
||||
- **Hot Reloading**: Both Go backend and React frontend reload automatically on
|
||||
code changes
|
||||
- **Volume Mounts**: Your local code is mounted into the container for live
|
||||
editing
|
||||
- **Dependency Management**: All dependencies are pre-installed in the container
|
||||
- **Consistent Environment**: Same environment across all developers
|
||||
- **Easy Cleanup**: Simple commands to start/stop the development environment
|
||||
|
@ -449,6 +502,7 @@ The Docker development environment includes:
|
|||
#### File Watching
|
||||
|
||||
The development container uses:
|
||||
|
||||
- **Air** for Go backend hot reloading (watches `.go` files)
|
||||
- **Vite** for React frontend hot reloading (watches all frontend files)
|
||||
- **inotify-tools** for efficient file system watching
|
||||
|
@ -459,5 +513,7 @@ If you encounter issues:
|
|||
|
||||
1. **Port conflicts**: Ensure ports 8080 and 5173 are not in use
|
||||
2. **Permission issues**: The container runs with appropriate permissions
|
||||
3. **Hot reload not working**: Check that your files are being watched by the respective tools
|
||||
4. **Container won't start**: Check Docker logs with `docker-compose -f docker-compose.dev.yml logs`
|
||||
3. **Hot reload not working**: Check that your files are being watched by the
|
||||
respective tools
|
||||
4. **Container won't start**: Check Docker logs with
|
||||
`docker-compose -f docker-compose.dev.yml logs`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue