Friday sermons (khutbahs) for the Muslim community in Osijek, Croatia, published in Croatian and translated automatically into English, Arabic, Albanian, Bengali and Urdu, so attendees who do not speak Croatian can follow them on their own phones. No app to install.
Live: osijekhutba.vercel.app
- On first visit the reader picks a language; the choice is remembered on the device
- Home shows the latest khutbah, a few recent ones and a link to the archive
- Each khutbah opens in the chosen language, falling back to Croatian
- An admin page (
/admin) takes the title and text in Croatian; the API translates it into every language and saves the khutbah only when all translations succeed
- Next.js 14 (App Router, TypeScript) and Tailwind CSS on Vercel
- Supabase (Postgres) with row-level security: the public can only read, inserts go through the server with the service role key
- OpenAI (
gpt-4o-mini) translates on the server; keys never reach the browser - The admin endpoint is protected by a password from the environment
npm install- Create a Supabase project and run
db/schema.sqlin its SQL editor (table and RLS policies) - Copy
.env.exampleto.env.localand fill inNEXT_PUBLIC_SUPABASE_URL,NEXT_PUBLIC_SUPABASE_ANON_KEY,SUPABASE_SERVICE_ROLE_KEY,OPENAI_API_KEYandADMIN_PASSWORD npm run devand open http://localhost:3000
Running cost: Vercel Hobby and the Supabase free tier cover a community of this size; OpenAI is pay per call, and a khutbah costs very little to translate.
Built by Elmir Beširović.
