Building a bilingual, RTL-first education centre platform with React, TypeScript and Supabase

2026-12-02来源 dev.toEnglish

Private tutoring and training centres run on information that changes every week: which courses open, what they cost, who teaches them, how many places are left, and which notice nobody can miss. In most centres we talked to, that information lives in three places at once: a spreadsheet, a WhatsApp group and somebody’s notebook. The website, if there is one, is the last to know.

We built EduCentre to make the website and the office work from the same data. This post walks through the architecture and the decisions that mattered.

The shape of the product

EduCentre has three faces, one database:

  • A public website: course catalogue, announcements and a blog, readable on any phone.
  • An admin dashboard: courses, teachers, announcements and posts, plus the numbers a director checks every morning.
  • A teacher portal: each teacher keeps their own profile current and posts to their students.

Because all three read the same tables, publishing a course in the admin is publishing it on the website. There is no second copy to forget.

Stack

  • React 18 + TypeScript, built with Vite
  • Tailwind CSS and shadcn/ui for the interface
  • Supabase for PostgreSQL, file storage and row-level security
  • React Router for the public, admin and teacher areas

We chose a single-page app over a server-rendered one because the heavy users are the staff, who sit in the admin all day, and the public pages are small and fast enough to render client-side.

A data model that mirrors the office

The core tables are deliberately boring:

  • courses: title, category, level, price, duration, schedule, room, teacher, status, max_students and enrolled_students
  • teachers: profile, specialisation, experience and status
  • announcements: title, content, category, priority and target audience
  • blog_posts: content, category, reading time and engagement counters

Two of those fields carry most of the product value.

Capacity on the course itself. Storing max_students and enrolled_students on each course means the dashboard can compute occupancy per course and for the whole centre with a single query, and the public site can show “places left” without a second source of truth.

Priority and audience on announcements. A notice has one of four priorities (low, medium, high, urgent) and an audience (everyone, students, parents, teachers). The public page colours each notice by priority, so “exam moved to Saturday” stands out from “new blog post”.

Arabic first, not Arabic as a translation

The interface is Arabic first and right to left, with English as a second language. Two rules kept that honest:

  1. Right to left is the default, not the exception. Screens are designed and checked in Arabic first, then in English, so direction problems show up during design rather than after launch.
  2. Strings live in one translation layer. Labels go through a shared language context, which makes a half-translated screen easy to spot.

The app also ships a dark theme alongside the light one.

Security: let the database say no

Every table sits behind Supabase row-level security. The public site can read published courses, announcements and posts; writing is restricted. Putting the rule in the database rather than in the UI means a hidden button is never the only thing standing between a visitor and an edit.

What we’d tell another team

  • Model the numbers the director asks for. Occupancy, revenue and enrolment shaped the course table from day one, and the dashboard stayed simple because of it.
  • One source of truth beats sync. The moment the website and the office read the same rows, “the site is out of date” stops being a category of problem.
  • Do RTL from the first component. Retrofitting right-to-left is far more expensive than starting there.

Want it for your centre?

EduCentre is built by THODZ SOLUTIONS. If you run a school, a tutoring centre or a training institute and want a demo, reach us at thodz.com or support@thodz.com.

原文:https://www.a8q9.cn/en/article/building-a-bilingual-rtl-first-education-centre-platform-with-react-typescript-a-910282.html

相关文章