Skip to content

About

Friday sermons published in Croatian and auto-translated into five languages with OpenAI, read on attendees' phones. Next.js, Supabase.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Osijek khutbah translator

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

A khutbah translated into English, as a reader sees it

What it does

  • 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

How it works

  • 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

Run it locally

  1. npm install
  2. Create a Supabase project and run db/schema.sql in its SQL editor (table and RLS policies)
  3. Copy .env.example to .env.local and fill in NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY, OPENAI_API_KEY and ADMIN_PASSWORD
  4. npm run dev and 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ć.

About

Friday sermons published in Croatian and auto-translated into five languages with OpenAI, read on attendees' phones. Next.js, Supabase.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages