Closed ArendPeter closed 2 weeks ago
For public beta, just give it a generic ballot based on the voting method, and optionally investigate next steps for server side rendering and figure out how hard it is.
Maybe investigate next.js for SSR? or see if the latest version of react / express can handle it
After seeing the links in social media posts this does feel needed
Sounds like there's 3 paths
Minimum & Medium will likely only apply to STAR ballots, but the full solution will be more flexible.
There is a service that can overlay text onto template images, we could make an API call when the election is finalized to create the image and get the url which would be the simplest. https://imagekit.io/docs/add-overlays-on-images
The other issue to consider is how to dynamically change the meta tags so that it is visible on the frontend. The simplest would be to put in template text into the index.html and fill in when the page is requested. This would include title, description, and image. This is a sort of mini SSR approach. https://blog.logrocket.com/adding-dynamic-meta-tags-react-app-without-ssr/
Alternatively we can use Puppeteer or Playwright to convert HTML to an image and store it locally. https://blog.logrocket.com/create-open-graph-image-generator-node-js/
Step 1: Add placeholder for entire website Step 2: Add ability to specify other meta tags based on what page we're on Step 3: Figure out how to automatically generate image and update meta tags
Questions: Do we still want image to be a ballot? Or just election title?
Need to figure out where to store generated images Volume in K8s or azure blob storage?
(I'm adding it to a early milestone in order to start the investigation, if it's a high effort item I may push it back)
When someone shares elections on social media, there should be an image showing exactly what the poll will look like