Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Triggers the download pipeline via the active provider. Requires a download prov
### POST /api/clips/share
Authenticated via `?token=` query parameter (iOS Shortcut token). Allows sharing clips without a session cookie.
```
Request: { "url": "https://tiktok.com/...", "phones": ["+1234567890"] }
Request: { "url": "https://tiktok.com/...", "phone": "+1234567890" }
Response: { "ok": true, "clipId": "...", "status": "downloading" } (201 Created)
```

Expand Down
5 changes: 4 additions & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,15 @@ scrolly/
│ │ │ ├── ProgressBar.svelte
│ │ │ ├── InlineError.svelte
│ │ │ ├── FilterBar.svelte # Feed filter tabs
│ │ │ ├── ShortcutGuideSheet.svelte # iOS Shortcut setup guide
│ │ │ └── settings/
│ │ │ ├── GroupNameEdit.svelte
│ │ │ ├── InviteLink.svelte
│ │ │ ├── MemberList.svelte
│ │ │ ├── RetentionPicker.svelte
│ │ │ └── ClipsManager.svelte
│ │ │ ├── ClipsManager.svelte
│ │ │ ├── GettingStartedChecklist.svelte
│ │ │ └── SetupDoneState.svelte
│ │ ├── stores/
│ │ │ ├── notifications.ts # Notification polling + unread count
│ │ │ ├── mute.ts # Global mute state
Expand Down
16 changes: 16 additions & 0 deletions docs/notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ Real-time push notifications via the Web Push Protocol (VAPID).

**Timing rationale:** New clip notifications are deferred until the download pipeline finishes successfully. This avoids notifying users about clips that may fail to download. If a download fails, no notification is sent. Reactions and comments notify immediately since the action is already complete.

### Push Notification Payload

All push notifications include these fields:

| Field | Type | Description |
|-------|------|-------------|
| title | string | Notification title |
| body | string | Notification body text |
| icon | string? | Icon URL |
| url | string? | Deep link target (defaults to '/') |
| tag | string? | Notification grouping tag |
| image | string? | Image URL for rich notifications |
| badgeCount | number? | Unwatched clip count for app badge |

The `badgeCount` is computed server-side per user/group and used by the service worker to call `navigator.setAppBadge()` on supported platforms.

### Customization

Users can toggle each notification type on/off in Settings. Preferences are stored in the `notification_preferences` table (created automatically on onboarding).
Expand Down
1 change: 1 addition & 0 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** Extract the filename from a file path. */
export function basename(filepath: string): string {
return filepath.split('/').pop() || filepath;
}
Expand Down
Loading