-
Notifications
You must be signed in to change notification settings - Fork 0
feat(#5): Event images — poster library + custom upload #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b5fc1cd
docs(#5): event images research + implementation plan
KalebCole 70ad689
feat(#5): add posters list/search/get commands
KalebCole 0b10faa
feat(#5): add --poster and --poster-search to events create
KalebCole abb40e1
feat(#5): add --image custom upload to events create
KalebCole 474e025
feat(#5): add --poster/--image to events update
KalebCole 66618ea
docs(#5): update schema with poster and image commands
KalebCole 91a3a0d
chore(#5): validate limit, rename test suite, add code block langs
KalebCole ea56e5b
fix(#5): fix poster-search wrapper, path handling, blob mime type, fe…
KalebCole 7863121
fix(#5): handle floats in array values for toFirestoreMap
KalebCole 29a9b2b
feat(#5): support URL input for --image flag
KalebCole 04b5aa0
fix(#5): upload timeout, response validation, download size check, po…
KalebCole File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1,033 changes: 1,033 additions & 0 deletions
1,033
docs/plans/2026-03-24-event-images-implementation.md
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| # Partiful Event Image — API Research | ||
|
|
||
| **Date:** 2026-03-24 | ||
| **Method:** Browser interception on partiful.com/create with poster selection | ||
|
|
||
| --- | ||
|
|
||
| ## Image Field in createEvent Payload | ||
|
|
||
| The `event.image` object is passed inside the `createEvent` request body alongside title, date, displaySettings, etc. | ||
|
|
||
| ### Poster (Built-in Library) | ||
|
|
||
| ```json | ||
| { | ||
| "image": { | ||
| "source": "partiful_posters", | ||
| "poster": { | ||
| "id": "piscesairbrush.png", | ||
| "name": "piscesairbrush.png", | ||
| "contentType": "image/png", | ||
| "createdAt": "2026-02-20T23:00:36.000Z", | ||
| "version": 1771628441, | ||
| "tags": [], | ||
| "size": 5170580, | ||
| "width": 1600, | ||
| "height": 1600, | ||
| "categories": ["Trending", "Birthday"], | ||
| "url": "https://assets.getpartiful.com/posters/piscesairbrush.png", | ||
| "ordersMap": { "default": 99, "us": 99 }, | ||
| "cardOrdersMap": { "default": 99, "us": 99 }, | ||
| "bgColor": "#635ba3", | ||
| "blurHash": "eQIr2qaeC6kUgOM#W-ocsEt6LNj]y1WBnfohn+afWUWA6?j?=zahsE" | ||
| }, | ||
| "url": "https://assets.getpartiful.com/posters/piscesairbrush.png", | ||
| "blurHash": "eQIr2qaeC6kUgOM#W-ocsEt6LNj]y1WBnfohn+afWUWA6?j?=zahsE", | ||
| "contentType": "image/png", | ||
| "name": "piscesairbrush.png", | ||
| "height": 1600, | ||
| "width": 1600 | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ### Key Observations | ||
|
|
||
| 1. **`image.source`** — `"partiful_posters"` for built-in. Likely `"upload"` or `"custom"` for user uploads. | ||
| 2. **`image.poster`** — Full poster object when using built-in. Contains metadata (tags, categories, dimensions, bgColor). | ||
| 3. **`image.url`** — Duplicated at top level and inside `poster` object. CDN URL format: `https://assets.getpartiful.com/posters/<id>` | ||
| 4. **`image.blurHash`** — Used for placeholder rendering. Duplicated at top level. | ||
| 5. **Poster IDs** — filename-style: `piscesairbrush.png`, `oscars.png`, `st-pat-day`, `movie-awards-spotlight` | ||
| 6. **Posters hosted at** `https://partiful-posters.imgix.net/<id>?fit=max&w=<width>` (thumbnails) and `https://assets.getpartiful.com/posters/<id>` (full res) | ||
|
|
||
| ## Poster Library Structure | ||
|
|
||
| Posters are fetched client-side and have these fields: | ||
|
|
||
| ```typescript | ||
| interface Poster { | ||
| id: string; // e.g. "piscesairbrush.png" | ||
| name: string; // same as id | ||
| contentType: string; // "image/png" | ||
| createdAt: string; // ISO timestamp | ||
| version: number; // unix timestamp | ||
| tags: string[]; // search tags: ["academy awards", "oscar awards", ...] | ||
| size: number; // bytes | ||
| width: number; // pixels (usually 1600 or 2160) | ||
| height: number; // pixels | ||
| categories: string[]; // ["Trending", "Birthday", "Watch Party", "Holiday", ...] | ||
| url: string; // full-res CDN URL | ||
| ordersMap: { default: number; us: number }; // sort order | ||
| cardOrdersMap: { default: number; us: number }; // card sort order | ||
| bgColor: string; // hex color for loading state | ||
| blurHash: string; // blurhash string | ||
| } | ||
| ``` | ||
|
|
||
| ### Categories (from web UI) | ||
|
|
||
| - Trending, Birthday, Elegant, Minimal, Dinner Party, Themed, Community Made, Chill, Not Chill, Holiday, College | ||
|
|
||
| ### Tabs | ||
|
|
||
| - **Posters** — static images (PNG) | ||
| - **GIFs** — animated (likely same structure but contentType: image/gif) | ||
| - **Photos** — stock photos (unknown source, possibly Unsplash integration) | ||
|
|
||
| ## Custom Image Upload (TODO — needs interception) | ||
|
|
||
| The web UI has an "Upload" button and "Upload image" at bottom of picker. | ||
| Custom uploads likely: | ||
| 1. Upload file to Firebase Storage or Partiful's upload endpoint | ||
| 2. Get back a URL | ||
| 3. Set `image.source` to something like `"upload"` or `"custom"` | ||
| 4. Include `image.url`, dimensions, contentType | ||
|
|
||
| ## Poster Library Source | ||
|
|
||
| Posters are likely fetched from Firestore directly (the web app uses Firebase). The collection is probably `posters` in the `getpartiful` Firestore database. This means we could query it via the Firestore REST API with the same auth token. | ||
|
|
||
| Alternatively, we could hardcode a poster list endpoint or scrape the gallery. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.