{"slug": "structure-a-local-first-interview-ide-powered-by-gemma-4", "title": "Structure: A Local-First Interview IDE Powered by Gemma 4", "summary": "A developer built Structure, a local-first macOS desktop IDE for technical interview practice powered by Gemma 4. The app, built with Qt 6 and C++, runs Gemma 4 locally through Ollama and stores all code, attempts, and session history in SQLite on the user's machine. Structure defaults to the small `gemma4:e2b` model for responsiveness and privacy, with modes for Learn, Interview, Debug, Speedrun, and Review that adjust the AI's tutoring behavior.", "body_md": "*This is a submission for the Gemma 4 Challenge: Build with Gemma 4*\n\nStructure is a local-first macOS desktop IDE for technical interview practice. It is built with Qt 6 and C++, and it is designed around a simple idea: AI should help you become capable, not just hand you answers.\n\nThe app gives you a four-panel practice loop:\n\nStructure has modes for Learn, Interview, Debug, Speedrun, and Review. The model behavior changes with the mode: in Learn mode it can ask Socratic questions and offer progressive hints; in Interview mode it is stricter and concise; in Debug mode it focuses on the first concrete failure; in Review mode it helps turn attempts into durable recall.\n\nThe app is intentionally local-first. Code, attempts, review cards, settings, and session history are stored in SQLite on the user's machine. Code execution happens locally through `clang++`\n\nor `python3`\n\n. Gemma 4 runs locally through Ollama, so interview practice can happen without sending code or learning history to a hosted inference API.\n\nRepository:\n\n[https://github.com/intelliot/structure-ide](https://github.com/intelliot/structure-ide)\n\nLocal demo path:\n\n```\ngit clone https://github.com/intelliot/structure-ide.git\ncd structure-ide\n\ncmake -S . -B build -DCMAKE_PREFIX_PATH=\"$(brew --prefix qt)\"\ncmake --build build\n\nscripts/setup-gemma4-local.sh\nopen build/Structure.app\n```\n\nIn the app, the loop is:\n\nI verified the current build with:\n\n```\ncmake --build build\nctest --test-dir build --output-on-failure\n```\n\nResult:\n\n```\n[100%] Built target StructureSmokeTests\n1/1 Test #1: smoke ............................   Passed   21.36 sec\n100% tests passed, 0 tests failed out of 1\n```\n\nThe code is here:\n\n[https://github.com/intelliot/structure-ide](https://github.com/intelliot/structure-ide)\n\nSome implementation pieces worth calling out:\n\n`src/ai/LocalLLMClient.cpp`\n\nis the local model client. It supports OpenAI-compatible chat endpoints, but when it detects Ollama on port `11434`\n\n, it switches to Ollama's native `/api/chat`\n\nendpoint so Structure can use streaming, `think=false`\n\n, `keep_alive`\n\n, response budgets, and a warm local model.`src/ai/PromptBuilder.cpp`\n\nbuilds mode-specific tutoring context and feedback context. It includes the problem statement, local stdin/stdout examples, constraints, expected complexity, visible tests, submitted code, run results, and a response contract.`src/ai/TutorEngine.cpp`\n\nconnects the model to the learning workflow. It streams chat and submit feedback, limits long code context safely, and falls back to deterministic local feedback if the model endpoint is unavailable.`scripts/setup-gemma4-local.sh`\n\ninstalls or starts Ollama, selects a Gemma 4 model profile, pulls the model, warms it, benchmarks it, and updates existing Structure settings.`src/storage/Database.cpp`\n\nkeeps the default local model settings stable: endpoint, model name, temperature, token budget, timeout, keep-alive, and startup warmup.The project is licensed under MIT.\n\nGemma 4 is the tutor and interviewer at the heart of Structure. It is not used as an autocomplete model. It is used after the app has collected the learning context that matters: the problem, the user's code, the local test results, the expected and actual outputs, the selected practice mode, and the user's claimed Big O.\n\nStructure defaults to the small local Gemma 4 path, `gemma4:e2b`\n\n, because the most important UX requirement is responsiveness. In an interview-practice tool, the user asks short questions, requests hints, debugs one failure at a time, and expects feedback while their mental stack is still warm. E2B is the right default because it can stay resident, stream quickly, and preserve the privacy benefits of local inference.\n\nThere is also a quality path for larger local hardware. Users can override the model manually, and the setup script can select a larger Gemma 4 model when the machine has enough memory. That makes the model choice intentional instead of one-size-fits-all:\n\n`gemma4:e2b`\n\nfor fast local tutoringThe prompt design is deliberately constrained so the model does real, focused work. For submit feedback, Structure tells Gemma 4 to ground every correctness claim in the run summary, compare expected versus actual output when a test fails, echo and judge the submitted complexity, avoid inventing bugs when tests pass, and give concrete C++ craft notes only when useful.\n\nThat model use maps directly to the app's goals:\n\nThe result is a small desktop practice environment where Gemma 4 helps a developer become faster and more precise at C++ interviews while keeping the code and learning history on their own machine.", "url": "https://wpnews.pro/news/structure-a-local-first-interview-ide-powered-by-gemma-4", "canonical_source": "https://dev.to/intelliot/structure-a-local-first-interview-ide-powered-by-gemma-4-43bh", "published_at": "2026-05-30 19:39:20+00:00", "updated_at": "2026-05-30 19:41:48.682573+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "artificial-intelligence"], "entities": ["Gemma 4", "Ollama", "SQLite", "Qt", "C++", "macOS", "clang++", "python3"], "alternates": {"html": "https://wpnews.pro/news/structure-a-local-first-interview-ide-powered-by-gemma-4", "markdown": "https://wpnews.pro/news/structure-a-local-first-interview-ide-powered-by-gemma-4.md", "text": "https://wpnews.pro/news/structure-a-local-first-interview-ide-powered-by-gemma-4.txt", "jsonld": "https://wpnews.pro/news/structure-a-local-first-interview-ide-powered-by-gemma-4.jsonld"}}