Real Quaiz application interface
1

Quaiz

A document-centred learning product that turns AI output into persistent, inspectable quiz practice.

Role
Independent front-end product engineer
Outcome
I delivered a public Next.js learning application with a public repository and a real product screen to inspect.
Status
Public product and source

Collaboration details and quantitative outcomes are not claimed. The visual gallery is intentionally limited to one registered real screen.

Project access

Outcome

Context and why it mattered

If generation and persistence disagree about shape or ownership, the learner sees broken practice and the database keeps ambiguous state.

Outcome

Problem

Connect study documents, AI-assisted generation, quiz structure, and learner history without treating generated output as trusted data.

Delivery detail

Constraints

The API had to reject malformed AI-generated quiz data before saving it as related records.

  • The API had to reject malformed AI-generated quiz data before saving it as related records.

Delivery detail

Role and scope

Authorship and delivery are supported by the résumé, live URL, and public repository. Team and client details are intentionally not inferred.

Responsibilities

  • Product routes and learning interface
  • Document-centred relational model
  • Structured quiz API validation and persistence
  • Public repository and deployable application

Included in scope

  • Product routes and learning interface
  • Document-centred relational model
  • Structured quiz API validation and persistence
  • Public repository and deployable application

Outside scope

  • Public evidence does not establish team composition or a client engagement.
  • No retention, learning-effectiveness, or production-scale metric is published.
  • Only one product screenshot is currently registered as visual proof.

Delivery detail

Model the learning domain

Documents became the shared context for chats, flashcards, quizzes, questions, options, and results.

  1. 1

    Model the learning domain

    Documents became the shared context for chats, flashcards, quizzes, questions, options, and results.

    • quaiz-schema
    • quaiz-repository

Step outputs

  • quaiz-schema
  • quaiz-repository

Delivery detail

Define the generation boundary

The quiz route checks the incoming structured shape before it reaches persistence.

  1. 1

    Define the generation boundary

    The quiz route checks the incoming structured shape before it reaches persistence.

    • quaiz-quiz-route

Step outputs

  • quaiz-quiz-route

Delivery detail

Persist a complete quiz graph

Quiz, questions, options, and result relationships are written as one nested relational operation instead of disconnected records.

  1. 1

    Persist a complete quiz graph

    Quiz, questions, options, and result relationships are written as one nested relational operation instead of disconnected records.

    • quaiz-schema
    • quaiz-quiz-route

Step outputs

  • quaiz-schema
  • quaiz-quiz-route

Delivery detail

Expose an inspectable product

The live application, repository, and registered screen make the delivered scope inspectable without substituting a mockup.

  1. 1

    Expose an inspectable product

    The live application, repository, and registered screen make the delivered scope inspectable without substituting a mockup.

    • quaiz-screen
    • quaiz-repository

Step outputs

  • quaiz-screen
  • quaiz-repository

Delivery detail

Real Quaiz interface

Confirms that the case refers to a real product surface, not a generated portfolio illustration.

Real Quaiz interface

Confirms that the case refers to a real product surface, not a generated portfolio illustration.

Quaiz application screen
Contains visual content

Delivery detail

Public source repository

Lets a technical reviewer inspect the actual application structure and dependencies.

Public source repository

Lets a technical reviewer inspect the actual application structure and dependencies.

Contains visual content

Delivery detail

Relational learning schema

Shows the ownership and relationship boundaries between documents, chats, quizzes, questions, options, and results.

Relational learning schema

Shows the ownership and relationship boundaries between documents, chats, quizzes, questions, options, and results.

Contains visual content

Delivery detail

Validated quiz write path

Makes the contract between generated content and persisted records explicit.

Validated quiz write path

Makes the contract between generated content and persisted records explicit.

Contains visual content

Engineering detail

Architecture

A Next.js product coordinates authenticated learning routes, structured AI output, API validation, and a Prisma/PostgreSQL learning graph.

Learner UI

other

Documents and practice

Next.js server

other

Auth, routes, validation

Structured AI output

other

Quiz-shaped payload

Prisma + PostgreSQL

other

Persistent learning graph

  • learnerserver · request
  • serverai · generate
  • aidata · validate + write

Engineering detail

Use the document as the learning context boundary

Situation
Chats, flashcards, quizzes, and results needed a shared context without becoming global user state.
Decision
Relate chat, flashcard, quiz, question, option, and result records through the document and user model.
Reasoning
The data model keeps learning context and ownership explicit and queryable.
Cost / trade-off
More relations and cascade behavior increase schema and migration complexity.

Alternatives considered

  • Store independent feature records with loose string references
  • Treat all learning activity as one global user history
  • Relate activity to a document-centred domain model

Engineering detail

Validate generated structure before persistence

Situation
Generated or client-provided JSON can be syntactically valid while still missing the questions and options required by the product.
Decision
Use a structured Zod schema before the Prisma mutation.
Reasoning
Invalid quiz shape fails close to the boundary instead of creating partial learning data.
Cost / trade-off
The validation contract must evolve with both generation prompts and the database model.

Alternatives considered

  • Trust the incoming payload
  • Persist free-form JSON and validate while rendering
  • Parse a named Zod contract at the API boundary

Engineering detail

Persist the quiz as one related graph

Situation
A quiz is only useful when its questions, options, ownership, and result relationships agree.
Decision
Create the quiz and its nested questions and options through the server data layer.
Reasoning
One server-owned write path keeps the generated structure and persisted graph aligned.
Cost / trade-off
The mutation is larger and more tightly coupled to the relational schema.

Alternatives considered

  • Create each record in separate client requests
  • Keep generated quizzes ephemeral
  • Use a nested relational write

Outcome

Result

I delivered a public Next.js learning application with a public repository and a real product screen to inspect.

Engineering detail

Reflection

Inspectable code and a live link are necessary proof, but they do not replace a concise account of ownership, trade-offs, and evidence limits.

Lessons

  • AI output belongs behind a product-owned contract, not directly in persistence.
  • A public repository proves implementation, but a decision narrative is still needed for fast evaluation.

Next steps

  • Share validation schemas between generation and API layers where ownership permits.
  • Add integration coverage around malformed generated quiz payloads and nested writes.
  • Capture more real screens across the document-to-practice journey.

Published content

Claim boundary

Collaboration details and quantitative outcomes are not claimed. The visual gallery is intentionally limited to one registered real screen.

Mohsen
Mohsen
[email protected]

Tehran, Iran

نسخهٔ فارسی

© 2026 Mohsen.