Skip to content
Deepanshu Kr Chaurasia

P-Buddy

Personal practice and performance companion

A certification practice platform that turns Markdown question banks into targeted drills, timed mock exams, explanation-led review and progress insights, with a reusable engine for adding new learning tracks.

Period
Status
Live private app; Phase 17 redesign awaiting review
Role
Software engineer and architect: product architecture, content pipeline, practice and exam engines, analytics, identity and frontend
Team
Client project, built around owner-authored question sets
Stack
  • Next.js
  • React
  • TypeScript
  • Tailwind CSS
  • Drizzle ORM
  • Turso/libSQL
  • SQLite FTS5
  • Auth.js
  • Microsoft Entra External ID
  • Vercel
  • Playwright
  • Vitest

The problem

Certification and interview preparation often starts in static question files or personal notes. They may contain good questions and explanations, but they do not preserve sessions, adapt practice to weak areas, or show whether preparation is improving. P-Buddy turns that material into a repeatable practice and feedback loop. SC-300 is its main certification track today; the project also includes private, resume-based Interview Preparation and is designed to add DP-300, SC-200, HashiCorp Certified: Terraform Associate (004), AWS Certified Solutions Architect – Associate (SAA-C03), AWS Certified AI Practitioner (AIF-C01), and many more through new content packs.

The engineering challenge

  • Keep the engine reusable. Resume-based interview prep and new certifications should come from new content and taxonomy, not a new application. Planned track examples include DP-300, SC-200, Terraform Associate (004), AWS SAA-C03, and AWS AI Practitioner (AIF-C01).
  • Serve both learning and exam conditions. Practice should explain an answer immediately; a mock exam must keep answers hidden until submission and use a server-owned clock.
  • Make the question bank trustworthy. Authored and community sets need validation, provenance, duplicate handling, and a way to prioritize official material.
  • Make progress honest and useful. Recommendations and readiness need enough evidence behind them to avoid overclaiming from a small sample.
  • Keep long sessions comfortable. The same interface needs to stay readable, accessible, responsive, and fast while a learner is focused.

Architecture

Identity provider

  • Entra External ID, OIDC sign-in

Vercel application · modular monolith

  • P-Buddy application, Next.js 16 · Vercel
  • Practice services, Selection, sessions, scoring, analytics
  • Content pipeline, Parse, validate, preview, publish

Authoring source

  • Question packs, Version-controlled Markdown

Runtime data

  • Turso / libSQL, Question bank, sessions, FTS5, progress
Sign in and account access
  1. Authenticate. Learner to Entra External ID (Sign in (OIDC)); Entra External ID to P-Buddy application (OIDC callback). The browser signs in through Microsoft Entra External ID using OIDC. Auth.js validates the callback and establishes a database-backed app session; the app does not retain OIDC tokens for later API calls.
  2. Authorize in the app. Permitted. Learner to P-Buddy application (Practice or exam request); P-Buddy application to Turso / libSQL (Users and database sessions). Authentication and authorization are separate: P-Buddy checks the account status and role on the server, then scopes learning data to that user.
  3. Keep private tracks private. Refused. Learner to P-Buddy application (Practice or exam request); Practice services to Turso / libSQL (Questions, answers, progress). Interview-100 is private to admins. The catalogue hides it from learners, and the session and study-plan services enforce the same restriction.
Practise and review
  1. Choose a session. Learner to P-Buddy application (Practice or exam request); P-Buddy application to Practice services (Create or resume session). The learner starts a quick, topic, difficulty, incorrect-answer, or bookmarked-question session. The server selects questions from the chosen track and user history.
  2. Select and record questions. Practice services to Turso / libSQL (Questions, answers, progress). For SC-300, selection is designed to blend source trust tiers and account for exam-domain weights. The service stores session state and selected answers in Turso.
  3. Reveal feedback. Permitted. P-Buddy application to Learner (Question and result UI); Practice services to Turso / libSQL (Questions, answers, progress). In practice mode, an answer reveals its correctness and explanation. Before reveal, the browser receives a client-safe question payload without the answer key.
  4. Use the result to choose what is next. P-Buddy application to Learner (Question and result UI); Practice services to Turso / libSQL (Questions, answers, progress). Results and answer history feed progress views and recommendations. The suggested next step is based on observed performance, with minimum evidence thresholds.
Take a timed mock exam
  1. Start the exam. Learner to P-Buddy application (Practice or exam request); P-Buddy application to Practice services (Create or resume session); Practice services to Turso / libSQL (Questions, answers, progress). The server creates the session and its expiry time. The browser displays the countdown, but the server owns the exam clock.
  2. Answer without hints. P-Buddy application to Learner (Question and result UI); Practice services to Turso / libSQL (Questions, answers, progress). During the exam, answers and explanations stay hidden. Session progress is saved so the learner can resume after a refresh.
  3. Submit or expire. Permitted. Learner to P-Buddy application (Practice or exam request); Practice services to Turso / libSQL (Questions, answers, progress); P-Buddy application to Learner (Question and result UI). On submission or expiry, the server settles the session and calculates the result. The learner can then review answers and explanations.
Import and maintain question content
  1. Select and preview. Content maintainer to P-Buddy application (Admin actions); P-Buddy application to Content pipeline (Preview and commit); Question packs to Content pipeline (Markdown packs). A maintainer selects a Markdown file from the controlled content root. The parser validates its structure and identifiers, then previews inserts, updates, and issues before commit.
  2. Publish safely. Permitted. Content pipeline to Turso / libSQL (Validated, versioned content). Validated content is imported idempotently. Unsupported or malformed questions are reported instead of entering the selectable bank; edits retain version and audit history.
View diagram
Identity providerVercel application · modular monolithAuthoring sourceRuntime dataLearnerBrowser · practice workspaceContent maintainerBrowser · admin toolsEntra External IDOIDC sign-inP-Buddy applicationNext.js 16 · VercelPractice servicesSelection, sessions, scoring, analyticsContent pipelineParse, validate, preview, publishQuestion packsVersion-controlled MarkdownTurso / libSQLQuestion bank, sessions, FTS5, progress

P-Buddy is a personal practice and performance companion. Its loop is simple: practise, track progress, evaluate performance, improve, and repeat. SC-300 is its main certification track today. The product also includes private, resume-based Interview Preparation and is designed to grow across certifications and skills without a separate application for each subject.

The problem

The project began with an architecture specification and owner-authored SC-300 mock exams in Markdown. Static files are a useful source for questions, but they make repeated practice hard to manage: a learner has to track answers and weak areas themselves, compare results manually, and decide what to study next without much evidence.

P-Buddy makes those files the authoring source for a structured question bank. The application can then select questions, preserve session state, explain answers, and build a history from which progress and next steps can be derived. The practice engine is designed to stay stable as new tracks are added.

The learner's loop

  • Targeted practice. Start a short session by track, domain, topic, difficulty, missed questions, or bookmarks.
  • Realistic exams. Take a fixed-format mock exam with a server-owned timer and no answer reveal before submission.
  • Useful review. See the selected answer, correct answer, and reasoning, then revisit saved and incorrect questions.
  • Visible progress. Review scores, domain accuracy and trends, consistency, personal bests, and readiness with its evidence.
  • One next step. The dashboard can recommend a weak domain when there is enough answered-question history to support it.

Practice and mock exams share the question workspace but use different reveal policies. Practice shows correctness and explanation after an answer. An exam keeps them hidden until submission or expiry. Questions do not auto-advance, so the learner controls the pace of review.

Beyond SC-300

SC-300 is the current certification focus, and the project also includes a private Resume-Based Interview Preparation track, Interview-100, built from the owner's resume. The wider track model is intended to cover preparation for DP-300, SC-200, HashiCorp Certified: Terraform Associate (004), AWS Certified Solutions Architect – Associate (SAA-C03), AWS Certified AI Practitioner (AIF-C01), and many more.

These are expansion targets for the shared platform, not a claim that every question bank is already imported. A new track should arrive as validated, versioned content—its exam or interview structure, domains or rounds, topics, questions, answers, explanations, and sources—while using the same session, review, scoring, and progress engine. The interview track keeps its own visibility rules because it contains resume-derived material.

Architecture

The diagram above shows the intended architecture: one Next.js application with server-side modules for practice and content import, a Markdown authoring source, and a Turso runtime database. The application is a modular monolith rather than a set of services. Its boundaries are in code: question selection, scoring, sessions, analytics, and importing have separate responsibilities but ship together.

The content pipeline parses and validates Markdown, previews changes, and imports records into the database. The database is the runtime format; Markdown remains the source that maintainers edit and review. Questions retain their certification, version, domain, difficulty, source set, and provenance so that content can be filtered and evaluated without embedding track-specific rules in the UI.

The practice service selects questions, creates or resumes sessions, records answers, and calculates results. A deliberate domain core keeps selection and scoring independent of React and the database layer. Next.js server components, actions, and route handlers connect those services to the browser. The deployed application uses Vercel and Turso/libSQL; development and tests can use a local file database.

Key decisions

Content is replaceable; the practice engine is reusable

Options considered: build a separate application for each certification, or model tracks and questions as data.

Why: the product needs to expand beyond one exam without accumulating certification-specific UI and business logic. Tracks, versions, domains, topics, sources, questions, and answer options are database content; import adapters handle differences in Markdown format.

Trade-off accepted: authoring formats still need explicit adapters and validation. A new dataset is not automatically trustworthy just because it parses.

Practice and exams reveal answers at different times

Options considered: use one feedback policy for every session, or make the session mode determine when answers are revealed.

Why: immediate explanation supports learning through repetition; a mock exam only simulates the real assessment if the learner cannot see correctness while answering.

Trade-off accepted: the shared question workspace receives a reveal policy, and answer data must remain server-side until that policy permits a reveal.

The server owns exam expiry and session progress

Why: a browser timer is only a display. The session expiry is stored and evaluated by the server, which also makes refresh-and-resume possible without trusting client time or losing work.

Trade-off accepted: expiry is settled when the server reads or submits the session; the client countdown never decides whether an answer is on time.

Question sources carry different levels of trust

Why: SC-300 content includes owner-authored and community sets as well as Microsoft's official practice assessment. The official set serves as an anchor for checking answers, reasoning, and duplicates. Selection blends source tiers and accounts for exam-domain weights instead of treating every item as equally authoritative.

Trade-off accepted: imported questions need provenance, review records, and retirement handling. The official-content phase still requires production review and import follow-through in the project plan.

Turso/libSQL fits the deployment and local workflow

Options considered: keep the PostgreSQL-based architecture proposal, or use a SQLite-compatible database with a local file for development and tests.

Why: the implementation plan chose Turso/libSQL with Drizzle for a low-latency hosted database and the ability to run most development and integration work locally. SQLite-specific constraints, indexes, and FTS5 are handled deliberately in the schema and migrations.

Trade-off accepted: migrations require careful review, especially table rebuilds. They are checked in and applied explicitly, with status checks to catch a deployed schema that lags behind the application.

Security and identity

Authentication and authorization have separate jobs. The account plan uses Microsoft Entra External ID for hosted sign-up, sign-in, and password reset, with Auth.js database sessions. P-Buddy applies roles and account status inside the application. The project notes describe the Entra integration as implemented, but disagree about whether production cutover is complete; the result section preserves that distinction.

User-owned sessions, answers, bookmarks, goals, and progress are scoped by user ID. Private tracks are filtered from learner catalogues and also checked in the session and study-plan services, so hiding a link is not the only access control. Admin content changes are versioned and written to an audit log.

The browser receives an explicit question payload that omits the answer key before reveal. Mock-exam results are withheld until submission or expiry. Content import accepts identifiers for files in the controlled content root, rather than arbitrary server paths.

Content quality

The initial project data included 800 SC-300 questions across four authored exams. A later phase imported Microsoft's 77-question official assessment and reviewed seven community sets against it. The plan records answer and reasoning corrections, corroboration links, duplicate retirement, and trust-tier selection. Because the official-source production import is still listed for owner review, those later changes should not be presented as fully deployed content. The same import and review discipline is intended for additional certification banks, rather than treating each new exam as an unverified question dump.

Import is designed to be repeatable: adapters parse each supported dialect, validation reports malformed or unsupported questions, and idempotent writes avoid duplicating the bank. Admin tools include content editing, domain classification, certification metadata, version history, and audit entries.

Design and delivery

The P-Buddy brand makes the same loop visible in the interface. Practice uses a quiet Focus mode; the dashboard, results, and progress pages use more energy to make improvement legible. The Ember-on-ink palette, light and dark themes, Sora display type, server-rendered icons, and restrained CSS motion support that distinction without adding unnecessary client JavaScript.

The redesign keeps the existing route and interaction contracts while updating the landing page, dashboard, question workspace, results, progress, catalogue, account pages, and admin surfaces. The project notes report a 740 KB client bundle against a 750 KB budget, accessibility and best-practice Lighthouse scores of 100 on checked pages, and mobile layout checks at 390 px. They also record a parallel E2E timing race that passes when the affected tests run serially.

Result

The core private practice application is reported live, with the main product phases through Phase 14 complete. The project plan reports 800 initial SC-300 questions practicable and a working cycle from import through practice, review, and progress analytics. The broader product scope includes the private Resume-Based Interview Preparation track and a reusable foundation for DP-300, SC-200, Terraform Associate (004), AWS SAA-C03, AWS AI Practitioner (AIF-C01), and additional tracks as their content is prepared.

The later work is at different stages: the official SC-300 source changes and full Phase 17 redesign are reported built and verified locally, pending owner review and production follow-through. Entra status is inconsistent across the status board and the detailed phase plan, so this case study describes the identity architecture without claiming that every cutover step is complete.

Demo

Open P-Buddy (opens in new tab). The project documents describe it as a private live app; sign-in may be required.