Uma forma simples de gerar o seu próprio lema da bandeira e compartilhar por aí! Acesse aqui
É possível interagir via twitter com o robô @lemadobrasil mandando a sua sugestão seguindo os gatilhos e explicados aqui
- site feito apenas com html e o poder da Canvas API
- apis feito com Node.js
- CloudFlare Pages Worker
- Crie um bucket R2 e deixe-o público via domínio próprio ou URL pública da Cloudflare.
- No projeto Pages, adicione um binding R2 chamado
BANDEIRASapontando para esse bucket. - Defina a variável
PUBLIC_R2_BASE_URL(ex.:https://cdn.seu-dominio.com) no ambiente do Pages e, para desenvolvimento local, copie.env.examplepara.dev.varscom o mesmo valor. - Para desenvolver localmente com
wrangler pages dev, ajustewrangler.tomlcom o nome do seu bucket embucket_namee tenha o bindingBANDEIRAS. - A função edge está em
functions/api/upload-image.jse é chamada pelo front em/api/upload-image. - O botão “Compartilhar” do
index.htmlrasteriza o SVG e copia a imagem (PNG) diretamente para a área de transferência; se o navegador não suportar copiar imagens, ele baixa o arquivo.
A simple way to generate your own brazilian flag motto and share it. Try it here
You can also interact on Twitter with the bot @lemadobrasil by sending your suggestion following the triggers explained here.
- site built only with HTML and the Canvas API
- APIs built with Node.js
- CloudFlare Pages Worker
- Create an R2 bucket and make it public via your own domain or a public Cloudflare URL.
- In the Pages project, add an R2 binding named
BANDEIRASpointing to that bucket. - Set the
PUBLIC_R2_BASE_URLvariable (e.g.,https://cdn.your-domain.com) in the Pages environment, and for local development copy.env.exampleto.dev.varswith the same value. - For local development with
wrangler pages dev, setbucket_nameinwrangler.tomlto your bucket name and ensure theBANDEIRASbinding exists. - The edge function lives at
functions/api/upload-image.jsand is called by the front end at/api/upload-image. - The “Compartilhar” button in
index.htmlrasterizes the SVG and copies the image (PNG) directly to the clipboard; if the browser cannot copy images, it downloads the file instead.

