§ DOCUMENTATION

Documentation

Technical reference for CircuitQuEEst — architecture, content model, build instructions, and the full topic list.

Overview

CircuitQuEEst is a single-activity Android application built entirely with Kotlin and Jetpack Compose. It teaches Electrical Engineering fundamentals through 42 sequential topics, each consisting of a scrollable lesson and a 7-question quiz.

Architecture

Layer overview

┌─ UI Layer (Jetpack Compose) ──────────────────────────────────┐ │ HomeScreen · LessonScreen · QuizScreen · ResultScreen │ │ Components: TopicCard · CategoryHeader · XpBar · StreakRow │ ├─ ViewModel Layer (@HiltViewModel) ────────────────────────────┤ │ HomeViewModel · LessonViewModel · QuizViewModel │ │ StateFlow → collectAsStateWithLifecycle() → recompose UI │ ├─ Repository Layer ────────────────────────────────────────────┤ │ ProgressRepository (single source of truth) │ │ DAOs: ProgressDao · QuizResultDao · MissedQuestionDao │ │ StudyDayDao │ ├─ Data Layer ──────────────────────────────────────────────────┤ │ Room DB (AppDatabase, provided by Hilt) │ │ Entities: TopicProgress · QuizResult · MissedQuestion │ │ StudyDay (streaks) │ ├─ Content Layer (compile-time) ────────────────────────────────┤ │ Kotlin singleton objects — one file per topic │ │ TopicCategories — maps topicId → category (UI-only) │ └───────────────────────────────────────────────────────────────┘

A single NavGraph.kt defines all routes using Jetpack Navigation Compose. ViewModels are @HiltViewModels obtained with hiltViewModel(); Hilt provides the database and ProgressRepository.

RouteScreen
homeHomeScreen — category list + search
lesson/{topicId}LessonScreen — scrollable lesson sections
quiz/{topicId}QuizScreen — 7 questions drawn from the topic's pool
review/{topicId}QuizScreen in review mode — missed questions for one topic, or all
result/{topicId}/{score}/{total}/{xp}ResultScreen — score + XP actually awarded

Content model

All 42 topics are defined as Kotlin singleton objects in data/content/. Each file exposes a single Topic object:

data class Topic(
    val id: String,        // e.g. "ohms_law"
    val title: String,
    val subtitle: String,
    val icon: String,      // emoji
    val order: Int,        // quest number and unlock order (0–41)
    val lesson: Lesson,
    val quiz: Quiz
)

data class Lesson(val title: String, val sections: List<LessonSection>)
data class LessonSection(val heading: String, val content: String,
                         val formula: String? = null, val keyPoint: String? = null)

// A pool of 10–11 per topic; each attempt draws 7 in random order, options shuffled
data class Quiz(val title: String, val questions: List<Question>,
                val generators: List<QuestionGenerator> = emptyList()) {
    fun drawAttempt(random: Random = Random.Default): List<Question>
    fun find(id: String, random: Random = Random.Default): Question?  // for review
}
// Numeric questions with fresh values on every draw; the id stays fixed so a miss can be reviewed
class QuestionGenerator(val id: String, private val make: (Random) -> Question)
sealed class Question {
    data class MultipleChoice(val options: List<String>, val correctIndex: Int, ...) : Question()
    data class NumericInput(val correctAnswer: Double, val tolerance: Double, ...) : Question()
}

Categories are a pure UI concern defined in TopicCategories.kt. No Topic data class field was needed — the mapping is a separate object that the ViewModel joins at runtime.

Progress system

XP is awarded as follows:

Wrong answers are queued for review mode (no XP; a correct answer clears them). Finishing a lesson, submitting a quiz or answering a question marks the day as studied; the quest map shows your study streak (days in a row) and your best (no XP; see util/Streaks). A quiz passes at 60%. Only a passing attempt sets TopicProgress.quizCompleted = true, which unlocks the next topic. Unlock order follows the categories on the quest map, top to bottom; each topic's order equals its position in that sequence. Any topic you've already started stays unlocked. The rules live in QuizScoring; the lock logic is in HomeViewModel.

Build Instructions

Requirements

Build steps

# Clone the repository
git clone https://github.com/HighviewOne/CircuitQueest.git
cd CircuitQueest

# Build debug APK
./gradlew assembleDebug

# Output location
# app/build/outputs/apk/debug/app-debug.apk

If your environment variables aren't set:

JAVA_HOME=/path/to/jdk-17 \
ANDROID_HOME=/path/to/android-sdk \
./gradlew assembleDebug

Install directly to a connected device:

./gradlew installDebug

All 42 Topics

Topics are organized into 9 categories on the HomeScreen. The numbers are the quest numbers shown in the app (00–41); topics unlock in that order, following the categories top to bottom.

Circuit Fundamentals

(6 topics)
#TopicKey concepts
00Ohm's LawV=IR, power calculations, basic circuit analysis
01Series & Parallel CircuitsResistance combinations, voltage/current division
02Kirchhoff's LawsKCL, KVL, node and loop analysis
03Capacitors & InductorsC=Q/V, V=LdI/dt, RC/RL time constants
04AC CircuitsRMS values, reactance, impedance, RLC resonance
05Thevenin & NortonEquivalent circuits, source transformation, max power

Semiconductor Devices

(4 topics)
#TopicKey concepts
06Diodes & RectifiersPN junctions, Zener, half/full-wave, LEDs
07Transistors (BJTs)NPN/PNP, beta, operating regions, switching
08MOSFETsNMOS/PMOS, threshold voltage, triode/saturation, CMOS
09Semiconductor PhysicsBand theory, doping, drift/diffusion, carrier transport

Analog Design

(4 topics)
#TopicKey concepts
10Op-AmpsInverting/non-inverting gain, voltage follower, summing amp
11FiltersLow/high/band-pass, cutoff frequency, roll-off, active filters
12Analog Circuit DesignCurrent mirrors, diff pairs, feedback, bandgap, cascode
13Audio ElectronicsAmplifier classes, DACs, speakers, headphone amp design

Digital Systems

(4 topics)
#TopicKey concepts
14Digital Logic GatesAND/OR/NOT/NAND/NOR/XOR, Boolean algebra, Karnaugh maps
15Digital SystemsFlip-flops, counters, finite state machines, memory
16VLSI DesignCMOS fabrication, RTL-to-GDSII, DRC/LVS, timing, power
17Machine Learning HardwareGPUs, TPUs, quantization, inference engines, edge AI

Signals & Control

(3 topics)
#TopicKey concepts
18Signals & SystemsFourier/Laplace transforms, transfer functions, Bode plots
19Control SystemsFeedback loops, PID controllers, stability, gain/phase margins
20Digital Signal ProcessingSampling theorem, FFT, FIR/IIR filters, quantization noise

Power & Energy

(6 topics)
#TopicKey concepts
21TransformersTurns ratio, impedance matching, efficiency, losses
22Power ElectronicsLinear regulators, LDOs, buck/boost converters, PWM
23Power SystemsThree-phase power, transmission, power factor, protection
24Renewable EnergySolar cells, MPPT, wind turbines, grid-tie inverters
25Electric VehiclesPowertrains, inverters, regenerative braking, charging
26Battery & Energy StorageLi-ion chemistry, C-rate, CC-CV charging, BMS, supercaps

RF & Communications

(7 topics)
#TopicKey concepts
27ElectromagneticsE/B fields, Faraday's law, Maxwell's equations, EM waves
28Transmission LinesCharacteristic impedance, reflections, VSWR, Smith chart
29Communication SystemsAM/FM modulation, SNR, Nyquist theorem, QAM
30Antenna DesignRadiation patterns, gain, dipole/patch/dish, link budgets
31RF Circuit DesignS-parameters, LNA design, oscillators, mixers, matching
32Fiber Optics & PhotonicsOptical fiber, lasers, photodetectors, WDM systems
33Radar SystemsPulse radar, Doppler effect, phased arrays, automotive radar

Hardware & Embedded

(5 topics)
#TopicKey concepts
34PCB DesignLayer stackup, trace routing, decoupling, ground planes, Gerbers
35Embedded SystemsMCU peripherals, GPIO, ADC/DAC, UART/SPI/I2C protocols
36Sensors & MeasurementTemperature sensors, Wheatstone bridge, instrumentation amps
37Signal Integrity & EMCCrosstalk, ground bounce, EMI shielding, differential signaling
38IoT & WirelessWi-Fi/BLE/LoRa/Zigbee, mesh networking, low-power design

Specialized Applications

(3 topics)
#TopicKey concepts
39Electric MachinesDC/AC/stepper motors, torque-speed curves, drives
40MEMSAccelerometers, gyroscopes, pressure sensors, microfabrication
41Biomedical ElectronicsECG/EEG signal acquisition, pacemakers, patient safety