Building QuizApp: A Full-Stack Timed Quiz Platform
I recently built and shipped QuizApp, a full-stack quiz application designed for educators and learners who want a clean, competitive quiz experience. Here's a look at what it does and how it's built. What It Does QuizApp lets admins create timed quizzes — both multiple-choice (up to 6 options) and true/false — with configurable time limits. Users browse published quizzes, take them under a live countdown, and get instant, per-question feedback the moment they submit. Scoring follows a simple negative-marking scheme: +1 for a correct answer, -1 for an incorrect one, and 0 for anything skipped. Results feed into a global leaderboard, a per-quiz leaderboard, and a personal score history on each user's profile. The Stack Backend: Laravel 12, Sanctum for cookie-based SPA authentication, MySQL Frontend: React 19, Vite, React Router v7, Tailwind CSS Testing: Pest/PHPUnit, covering auth, role enforcement, quiz CRUD, and scoring logic A Few Details I Cared About Trustworthy timers. The countdown is driven by an expiresAt timestamp from the server, not Date.now() on the client. Refreshing the page or messing with local state doesn't buy extra time — the quiz still auto-submits the moment the server-side deadline passes. Server-side authority. Roles are never trusted from the client; they're always assigned on the backend. The is_correct flag on quiz options is stripped from every API response sent to non-admin users, so there's no way to peek at answers through the network tab. Layered access control. Admin routes are protected twice — once by Sanctum's auth middleware, and again by a dedicated AdminMiddleware — and the whole session model avoids storing any tokens in localStorage. Real test coverage. The scoring logic is tested against all-correct, all-incorrect, all-skipped, and mixed-answer scenarios, alongside leaderboard ranking and role-based access.
Project Specifications
Related Projects
Full-Stack Invoicing and Quotation SaaS App
Invoice SaaS App is a web application that lets freelancers and small business owners create, send, and track professional invoices and quotes without the friction of spreadsheets or generic templates. It covers the full lifecycle of a client transaction, from drafting a quote, to emailing it as a PDF, to converting it into an invoice with a single click once the client approves. The project was built as a complete SaaS product, including its own billing layer: a Stripe-powered credit system that gates paid actions while keeping core utilities like PDF downloads free. Key Features Professional Invoices. Invoices are generated as polished, PDF-ready documents in seconds, with fully customisable line items, taxes, and notes. Once created, they can be emailed straight to a client or downloaded as a PDF at any time. PDF downloads are always free, no credits required. Smart Quotations. Quotes follow the same polish as invoices, complete with PDF attachments sent by email and dynamic status tracking (draft, sent, approved, and so on). The standout feature here is one-click conversion: an approved quote becomes a full invoice with no re-entry of data. Instant Email Delivery. Both invoices and quotes can be emailed directly from the app with the PDF attached, keeping every client communication professional, consistent, and trackable in one place. Client Management. Every invoice and quote is linked to a client record, so the app always has full context, including contact details, history, and status, without needing to look anything up elsewhere. Dashboard Analytics. A central dashboard surfaces the metrics that matter at a glance: total invoices, quotations sent, and remaining credits, plus a feed of recent activity. Credit-Based Billing (Stripe). Rather than a flat subscription, the app uses a lightweight credit system. Creating an invoice, creating a quotation, sending an email, and converting a quote to an invoice each cost 1 credit. Downloading a PDF is always free. Every user starts with 10 free credits per month, no card required, which reset on the 1st. Users can top up anytime with one-time credit packs, and purchased credits never expire, a model designed to keep the barrier to entry low while still supporting monetisation. Authentication & Profiles. Secure registration, login, and password recovery, plus profile settings including preferred currency, so the app adapts to how each user actually invoices. Tech Stack Backend: Laravel 12 for the application framework, routing, auth, and business logic. MySQL or SQLite for the relational data layer. mPDF for server-side PDF generation. Stripe PHP for payment processing and credit-pack purchases. Frontend: React 18 for a component-driven UI. Inertia.js to glue Laravel and React together as a single-page app, without hand-building a separate REST or JSON API. Tailwind CSS for utility-first styling. Vite for a fast dev server and asset bundling. Why This Stack The Laravel, Inertia, and React combination made it possible to build a genuinely SPA-like experience, with instant navigation and no full page reloads, while keeping all business logic, validation, and PDF or email generation on the backend where it belongs. It avoided the overhead of maintaining a separate API layer just to talk to the frontend, which kept development fast without sacrificing the interactivity users expect from a modern dashboard. The credit system was the most interesting piece to design: it needed to feel generous, with free PDF downloads and a monthly free tier, while still creating a clear, fair path to revenue through Stripe-backed top-ups.
Kavi - AI Shopping Agent
Overview Kavi is a conversational AI shopping assistant built for the Kapruka Agent Challenge, an open competition where 700+ developers submitted over 200 live, working AI agents. Kavi helps users discover products, get gift recommendations, and complete checkout entirely through natural language — in English, Sinhala, or Tamil. The goal of the challenge was simple to state and hard to execute: build a real, live agent on top of Kapruka's Model Context Protocol (MCP) server, not a prototype or mockup. Kavi is the result — a full end-to-end shopping experience powered by conversational AI. The Problem Traditional e-commerce search relies on filters, dropdowns, and category trees that assume the shopper already knows what they're looking for. Gift shopping in particular often starts with a vague idea ("something for my mom's birthday") rather than a specific product. Kavi was designed to close that gap — letting users describe what they want in plain language and have the agent handle search, recommendation, and checkout from there. What It Does Conversational shopping assistant Powered by Google Gemini, Kavi understands natural-language requests, recommends gifts based on context, searches the product catalog, and walks users through checkout — all through chat. Multi-lingual by design Full UI and conversational support in English, Sinhala (සිංහල), and Tamil (தமிழ்). Language context is dynamically mapped into both the Gemini system instructions and the frontend, so the experience is consistent regardless of language. Live, real-time commerce Product search by keyword, category, price range, and availability, rendered through custom cards, detail drawers, and carousels. Cart management updates totals in real time and enforces sensible limits. Checkout can be completed conversationally or through a guided form, capturing sender, recipient, and delivery details. Orders can be tracked by order number after purchase. Personalization that persists User accounts are backed by Supabase Auth (magic link and Google OAuth), with saved delivery details, a persistent list of frequent recipients that auto-syncs during gifting checkouts, and reminders for birthdays and anniversaries that surface tailored gift suggestions before the date arrives. Grounded in real data Every product, category, and location shown to users is pulled live from the Kapruka Model Context Protocol (MCP) server — not cached or mocked data. Tech Stack AI / LLM: Google Gemini Data layer: Kapruka Model Context Protocol (MCP) server Auth & backend: Supabase (magic link + Google OAuth) Frontend: Custom UI with multi-lingual support (English, Sinhala, Tamil) Outcome Kavi was one of 200+ live agents evaluated by judges in the Kapruka Agent Challenge, out of 700+ developers who entered. It didn't place in the Top 20, but it stands as a fully working, deployed product — handling real product search, multi-lingual conversation, checkout, and personalization end to end. What I Learned Building Kavi meant designing a conversational interface that had to work reliably in three languages, wiring a live MCP integration for real-time data rather than static content, and thinking through the full shopping journey — discovery, recommendation, cart, checkout, and post-purchase tracking — rather than a single isolated feature. It was as much a lesson in product thinking as it was in AI engineering.