Skip to Main Content
← All Case Studies
EdTech · Kazakhstan · Full-Stack Development

TestGov.kz — government exam preparation platform

Open Website ↗

A bilingual education platform covering everything from course selection and payment to testing, results and business management.

Next.js 15React 19PostgreSQL 16PrismaApiPayRU / KK
22data models
4testing modes
2language versions
20unit tests
TestGov.kz homepage: preparation areas and registration
Public Home Page · Russian
01 / Challenge

Bring the entire student journey and training centre operations into one product

Users need a clear journey: choose a program, purchase access, study the materials, practice and view their results. Owners need tools to independently manage courses, tests, pricing, students and orders.

The solution is a unified full-stack application in which the public website, learning environment, personal account, administration panel and server-side business logic operate as one system.

Product
Online Learning Platform
Audience
Candidates and Course Participants
Geography
Kazakhstan
Interfaces
Website, Account, Learning, Admin Panel
02 / Client Pain Point → Solution

The training centre needed a unified, manageable business process rather than a course catalogue

Problems arose where the public website, learning, payments and administration met. We connected these areas through a shared data model and server logic, giving users a continuous journey and owners control of the product without constant code changes.

01

The Learning Journey Is Fragmented

The catalogue, payments, learning materials, tests and results are spread across different services.

Our Solution

We combined the public website, learning environment, user account and server logic in a single Next.js application.

02

Content Depends on the Developer

Every new course, pricing plan or question requires a code change, slowing programme launches.

Our Solution

We created an administration panel for programmes, modules, tests, pricing plans, news and website settings.

03

Tests Are Difficult to Adapt

Different assessment methods require their own completion rules, limits and feedback.

Our Solution

We implemented four modes, random selection, a timer, attempt limits, a passing threshold and server-side result storage.

04

Payment Is Not Linked to Access

Manual order verification delays students and creates a risk of duplicate access being granted.

Our Solution

We integrated the ApiPay webhook, HMAC-SHA256, the transactional PENDING → PAID transition and access provisioning.

03 / User Journey

From an area of study to a specific program

Courses are grouped by category. Each program page shows its description, curriculum, access conditions and pricing. A program can belong to several study areas.

TestGov.kz Area Catalog
Area CatalogProgram Descriptions and Course Links
TestGov.kz Course Plan Selection
Course PagePlans, Access Periods, and Program Content
TestGov.kz Plans on Mobile
Mobile SelectionThe Same Flow on a Narrow Screen
04 / Localization

Two languages extending beyond basic interface translation

The Russian and Kazakh versions have separate learning content and question banks. Editors can create independent content for each language while preserving the product's shared structure.

RUKK

Routes /ru and /kk
powered by next-intl

Russian Version of TestGov.kz
Russian Version
Kazakh Version of TestGov.kz
Kazakh Version
05 / Learning Environment

Materials and Tests Within a Single Program

The side navigation displays the course structure and helps users move between topics. Learning materials support formatted text, images and embedded YouTube videos.

  • Learning materials, test collections and mock exams
  • Reusing modules across different courses
  • Grouping and controlled learning sequence
  • Free Demo Programs
Learning Environment and Course Navigation
Course Content
Learning Material Within TestGov.kz
Learning Material
06 / Testing Engine

Four modes for different preparation methods

01

Classic

Step-by-Step Question Flow.

02

Returnable

Navigate Back to Previously Viewed Questions.

03

Instant feedback

The correct answer and explanation appear immediately after selection.

04

All Questions

A Complete Set of Questions on One Page.

Each test has configurable timing, attempt limits, passing scores, random sample size and mandatory-answer rules. The server records the questions assigned to each attempt, verifies access and timing, saves answers and calculates the result.

Test-taking flow with a question, answer options and timer
CompletionQuestion, Options, Navigation, and Timer
Instant Feedback After Each Answer
FeedbackCorrect Answer and Explanation
07 / Results

Progress is saved and the result is explained with figures

An unfinished attempt is restored when the user returns. After completion, the user sees the percentage of correct answers, mistakes, time spent and pass status.

Practice Test Result
Test Result · Demo Data
Results History in the User Account
Account History · Data Hidden
08 / Practice Exam

Random selection of questions from multiple topics

The examination flow combines questions from the programme's tests, records the selected set and applies an overall time limit. Results show the total percentage and a breakdown by topic.

This is a preparation tool with feedback. It is not positioned as a proctoring system or a secure state certification platform.

Start of the Practice Exam
Exam Settings
Practice Exam Results by Topic
Overall Result and Topics · Demo Data
09 / Admin Panel

Manage an education business without editing code

Administrators build programs from modules, publish content, configure tests and pricing, and manage users, access rights and orders. Core daily operations are consolidated in one dashboard.

TestGov.kz Admin Panel Overview
OverviewPlatform Status and SQL Backup Export
Course module sequence management
Course ContentSequence of Materials and Tests
Learning Module Library
Module LibraryMaterials, Tests, and Exams
TestGov.kz Visual Question Editor
Question BuilderText, answers, explanations, images and video
10 / Monetization and Access

Plan → Order → Confirmation → Access

Plan Selection→ApiPay Invoice→Webhook→Course Access

The price is retrieved from the server database. The ApiPay integration creates an invoice, normalises the phone number and verifies the notification's HMAC-SHA256 signature.

The order transition from PENDING to PAID and access provisioning are performed within a transaction. A conditional update prevents duplicate provisioning when successful webhooks are processed concurrently.

  • Price in Tenge and Duration in Days
  • Recommended and Published Plan
  • Automatic Access Provisioning After Confirmation
  • Manual Access Provisioning, Renewal, and Revocation
  • Order and Status History
TestGov.kz Plan Editor
Plans: Price, Duration, and Benefits
User Access Management
Access: expiry, source and status · data hidden
11 / Architecture

One TypeScript project, four interfaces and shared business logic

BrowserPublic WebsiteLearning EnvironmentUser AccountAdmin Panel
↓
Next.js App RouterReact Server Components · Server Actions · HTTP API
↓
AuthenticationAccessTestsExamsOrders
↓
PrismaPostgreSQLUploadsImagesApiPayPaymentsResendEmail
Domain Model

Category → Course → Group / Module → Language Version → Test → Question → Answer Options

12 / Technology

A technology stack designed for product development

Frontend + Backend

Next.js 15.5.19

App Router, SSR, React Server Components, Server Actions and API.

UI

React 19 + TypeScript 5.9

Tailwind CSS 3.4, Radix UI, and Lucide.

Data

PostgreSQL 16 + Prisma 5.22

22 Related Models, Indexes, and Transactions.

Access

Auth.js + bcrypt

JWT sessions, USER / ADMIN roles and password hashing.

Content

TipTap + DOMPurify

Visual editor and formatted HTML sanitization.

Integrations

ApiPay + Resend

Access payments, password recovery and reminders.

Delivery

Docker + Node.js 22

Multi-stage build, standalone deployment and non-privileged user.

Checks

Vitest 2.1.9

Testing of quizzes, exams, timers and payment functions.

13 / Data and Security

Critical Operations Are Performed on the Server

01

Access Control

Roles, validation of active programme access and server-side protection for learning routes.

02

Attempt Integrity

The question set is stored in PostgreSQL; answers, timing and final results are validated by the server.

03

Secure Payment

HMAC-SHA256 for the webhook, amount verification and idempotent transactional access provisioning.

04

User-Generated Content

DOMPurify sanitises HTML; images are limited to PNG, JPEG, WebP and GIF formats and a maximum size of 5 MB.

05

Passwords and Sessions

Passwords are hashed with bcrypt, while authentication uses Auth.js JWT sessions.

06

Operations

SQL database export, healthcheck and persistent storage for the local uploads directory.

14 / SEO and Operations

Prepared the service for launch, indexing and further development

SEO

Server-side rendering, metadata, Open Graph, canonical, hreflang, sitemap, robots and JSON-LD.

Email

Resend handles password recovery and access-expiry reminders; sending thresholds are stored in the database.

Deployment

Docker Compose and Render Blueprint: web service, PostgreSQL, persistent uploads and healthcheck.

Responsive Design

The public interface and pricing plans were tested on a desktop display and a 390 × 844 smartphone.

15 / Implementation Review

We Reviewed the Code and Core Product Flows

20 / 20existing unit tests passed
RU + KKboth public versions are available
End-to-endtest completed with answers and result saved
Admincourses, access, plans and editor verified

The review was conducted on 09.09.2026 using a separate local database copy. Screenshots contain demonstration data. The original project's production build, real payments, email delivery, load testing and backup restoration were outside the scope of this review.

16 / Result

A complete web product for education and access sales

One system brings together the programme catalogue, learning materials, four testing modes, mock examinations, student account, pricing plans, payment flow and administration panel.

The architecture can evolve into a training center platform, exam preparation service or corporate knowledge assessment tool. Content and commercial settings are managed through the interface without continuous developer involvement.

EdTechUser AccountAdmin PanelPaymentsTwo languagesTesting Engine
View the Live Platform ↗
Your Next Product

Need an education platform or a sophisticated web service?

We will analyse the processes, design the architecture and build the product around a real business need.

Discuss the Project ↗Back to Case Studies