feat: fix alot of issues
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# KoolTab Architecture
|
||||
# KoolTap Architecture
|
||||
|
||||
## Overview
|
||||
|
||||
KoolTab is a modular monolith designed for remote tab control in venues.
|
||||
KoolTap is a modular monolith designed for remote tab control in venues.
|
||||
|
||||
## Components
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## KoolTab Flutter App — Planned Tab Sync
|
||||
## KoolTap Flutter App — Planned Tab Sync
|
||||
|
||||
Add support for **planned tab names** that are synced from the server. The server now returns a `plannedTabNames` list in the sync response. The app should create open tabs for any planned names that don't already have an open tab.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone <repo>
|
||||
cd kooltab
|
||||
cd kooltap_backoffice
|
||||
|
||||
# Install dependencies
|
||||
pnpm install
|
||||
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
# KoolTab Production Deployment
|
||||
# KoolTap Production Deployment
|
||||
|
||||
## Option A: Docker (recommended)
|
||||
|
||||
@@ -60,15 +60,15 @@ api.yourdomain.com {
|
||||
|
||||
Create database and user:
|
||||
```sql
|
||||
CREATE DATABASE kooltab;
|
||||
CREATE USER kooltab WITH PASSWORD 'your-password';
|
||||
GRANT ALL PRIVILEGES ON DATABASE kooltab TO kooltab;
|
||||
CREATE DATABASE kooltap;
|
||||
CREATE USER kooltap WITH PASSWORD 'your-password';
|
||||
GRANT ALL PRIVILEGES ON DATABASE kooltap TO kooltap;
|
||||
```
|
||||
|
||||
### 2. Configure environment
|
||||
|
||||
```env
|
||||
DATABASE_URL="postgresql://kooltab:your-password@localhost:5432/kooltab"
|
||||
DATABASE_URL="postgresql://kooltap:your-password@localhost:5432/kooltap"
|
||||
JWT_SECRET="<random-64-char-string>"
|
||||
JWT_REFRESH_SECRET="<random-64-char-string>"
|
||||
PORT=3001
|
||||
|
||||
Reference in New Issue
Block a user