feat: fix alot of issues

This commit is contained in:
2026-10-08 00:25:30 +02:00
parent 8b1e38cb4d
commit e5580767a5
35 changed files with 127 additions and 615 deletions
+9 -9
View File
@@ -1,9 +1,9 @@
## KoolTab Flutter App — Remote Backoffice Integration (Improved Pairing Flow)
## KoolTap Flutter App — Remote Backoffice Integration (Improved Pairing Flow)
You are implementing the device-side integration for the KoolTab remote tab control system. The Flutter app (bar POS terminal) needs to register with a remote backend, sync open tabs, and process remote close-tab commands.
You are implementing the device-side integration for the KoolTap remote tab control system. The Flutter app (bar POS terminal) needs to register with a remote backend, sync open tabs, and process remote close-tab commands.
### Project Location
`C:\Users\bram\StudioProjects\kooltab2`
`C:\Users\bram\StudioProjects\kooltap`
### Architecture Overview
- State management: `provider` (ChangeNotifier pattern)
@@ -22,7 +22,7 @@ You are implementing the device-side integration for the KoolTab remote tab cont
### Pairing Flow (improved)
Instead of typing a UUID venueId, the flow is:
1. Tablet calls `GET https://api.kooltab.com/api/v1/venues/` (public, no auth)
1. Tablet calls `GET https://api.kooltap.com/api/v1/venues/` (public, no auth)
2. Gets list of `[{id, name}]` — admin picks venue from a dropdown
3. Admin enters device name (e.g. "Bar terminal 1")
4. Admin enters the 6-character registration code (generated from dashboard)
@@ -44,7 +44,7 @@ Do NOT rewrite these files, just modify as needed:
#### 1. Update Server URL
In `lib/utils/app_config.dart`:
```dart
const kRemoteServerUrl = 'https://api.kooltab.com/api/v1/';
const kRemoteServerUrl = 'https://api.kooltap.com/api/v1/';
```
#### 2. Add Venue Model
@@ -91,7 +91,7 @@ Create `lib/views/registration_view.dart` — a full-screen registration flow wi
**Step 3 — Success screen:**
- Success animation/message
- "Start using KoolTab" button → navigates to main bar screen and triggers sync
- "Start using KoolTap" button → navigates to main bar screen and triggers sync
#### 6. Wire Registration into Navigation
In `lib/app/app_bootstrap.dart`:
@@ -120,13 +120,13 @@ In the **Settings screen** (`lib/views/settings_view.dart`) or **Admin screen**:
**Venues list:**
```
GET https://api.kooltab.com/api/v1/venues/
Response: [{"id": "uuid", "name": "KoolTab Demo Bar"}, ...]
GET https://api.kooltap.com/api/v1/venues/
Response: [{"id": "uuid", "name": "KoolTap Demo Bar"}, ...]
```
**Device registration:**
```
POST https://api.kooltab.com/api/v1/devices/register
POST https://api.kooltap.com/api/v1/devices/register
{
"venueId": "uuid-from-venue-list",
"name": "Bar terminal 1",