<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vinay Somawat on Medium]]></title>
        <description><![CDATA[Stories by Vinay Somawat on Medium]]></description>
        <link>https://medium.com/@vinaysomawat?source=rss-f850c4a0cecf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-Gpwfg1jFyZieLhMm3t4qw.png</url>
            <title>Stories by Vinay Somawat on Medium</title>
            <link>https://medium.com/@vinaysomawat?source=rss-f850c4a0cecf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 07:44:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vinaysomawat/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Designing an Agentic Hub: A System Design Walkthrough for Enterprise AI Assistants]]></title>
            <link>https://vinaysomawat.medium.com/designing-an-agentic-hub-a-system-design-walkthrough-for-enterprise-ai-assistants-fdf301dd02cf?source=rss-f850c4a0cecf------2</link>
            <guid isPermaLink="false">https://medium.com/p/fdf301dd02cf</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[agentic-rag]]></category>
            <category><![CDATA[vector-database]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <dc:creator><![CDATA[Vinay Somawat]]></dc:creator>
            <pubDate>Sun, 25 Oct 2026 12:37:20 GMT</pubDate>
            <atom:updated>2026-10-25T12:37:20.691Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I’d design an AI assistant that answers from company documents and safely takes actions in an ERP, using Angular, Spring Boot, AWS and RAG</h3><p>“Design an AI assistant that answers questions from company documents and can take actions in the ERP” is becoming a standard senior system design question. This walkthrough covers the requirements, architecture, RAG pipeline, agent loop, security, operations, and a five-minute script for presenting it.</p><h3>1. Problem and requirements</h3><p><strong>The question:</strong> Enterprise users chat with an AI assistant that answers questions from company documents and takes actions in the ERP (create a purchase order, check inventory). Design it, covering the Angular frontend, the backend, how the LLM, RAG and tools fit together, and security for actions that change ERP data.</p><p><strong>Open with scope (about 30 seconds).</strong> Restate the problem and confirm assumptions before drawing anything. It signals seniority and buys thinking time.</p><p><strong>Functional requirements</strong></p><ul><li>Chat interface embedded in enterprise products, with conversation history.</li><li>Q&amp;A over company documents (policies, manuals, contracts), with citations back to the source.</li><li>Read actions on ERP data: check inventory, look up an order, get a supplier’s status.</li><li>Write actions on ERP data: create a PO, update an order. These need user approval.</li><li>Document upload, indexed for search.</li><li>A way for other product teams to add their own tools and agents.</li></ul><p><strong>Non-functional requirements</strong></p><ul><li><strong>Multi-tenancy:</strong> strict isolation. Tenant A never sees tenant B’s documents or data.</li><li><strong>Authorisation:</strong> the assistant can never do more than the signed-in user can.</li><li><strong>Latency:</strong> first token in under ~2 seconds, streamed; tool calls in a few seconds.</li><li><strong>Auditability:</strong> every tool call and approval is logged: who, what, when, result.</li><li><strong>Availability:</strong> degrade gracefully if an LLM provider is down (fallback model).</li><li><strong>Cost:</strong> per-tenant token metering and quotas.</li></ul><p><strong>Assumptions to say aloud:</strong> the ERP exposes REST APIs that already enforce user permissions; we run on AWS; we use a managed LLM (for example Amazon Bedrock) rather than training models.</p><h3>2. High-level architecture</h3><p>The orchestrator is the only component that talks to the LLM, the search index and the ERP, so security and logging live in one place.</p><p>[DIAGRAM 1: architecture]</p><p>The Angular UI sends the user’s message through the API Gateway, which checks the JWT, stamps the tenant and enforces rate limits. The Spring Boot orchestrator runs the agent loop. It asks the LLM gateway (Bedrock, with a fallback model) what to do, fetches document context from the retrieval service, and calls ERP tools through the tool registry using the user’s own permissions. Tokens stream back to the UI over SSE. Every turn and tool call is written to the chat and audit store. Separately, uploaded documents flow through an async ingestion pipeline into the OpenSearch index.</p><h3>3. Angular frontend</h3><p>Ship the chat as a shared Angular library so every product embeds the same hub instead of building its own.</p><p><strong>Components</strong></p><ul><li><strong>Chat shell:</strong> conversation list, message thread, input box, file upload, a stop-generating button.</li><li><strong>Streaming message component:</strong> appends tokens as they arrive, renders markdown, and shows citations as chips that open the source document.</li><li><strong>Action approval card:</strong> when the agent wants to write to the ERP, show exactly what will happen (“Create PO for 500 units of SKU-123 from Acme, $5,000”) with Approve, Edit and Cancel.</li><li><strong>Tool progress indicators:</strong> “Searching documents…”, “Checking inventory…”, so the user sees what the agent is doing.</li></ul><p><strong>Streaming: SSE vs WebSocket</strong></p><ul><li><strong>SSE (recommended):</strong> one-way token streaming from server to browser. Plain HTTP, works through proxies and load balancers, reconnects automatically. Cancel and approve go as normal POSTs.</li><li><strong>WebSocket:</strong> for truly two-way, high-frequency traffic (live collaboration, voice). Needs sticky connections and is harder to scale and secure behind gateways.</li></ul><p><strong>State and performance</strong></p><ul><li>Signals for conversation state; RxJS for the stream (switchMap to cancel a stream when the user sends a new message or presses stop).</li><li>OnPush everywhere; batch token updates (for example every animation frame) so you don&#39;t re-render on every token.</li><li>Virtual scrolling for long conversations.</li><li>Sanitise rendered markdown, because model output is untrusted and could contain script.</li></ul><p><strong>Reusable library:</strong> publish the chat shell, approval card and citation chip from an Nx workspace as standalone components with a config object (tenant, product, available tools). Version it with semver and a changelog so product teams upgrade on their own schedule.</p><h3>4. Backend services (Spring Boot on AWS)</h3><p>Split by responsibility, not by technology: one orchestrator owns the conversation, and smaller services own search, models and tools.</p><ul><li><strong>API Gateway:</strong> validates JWTs (OAuth2 / OIDC), attaches tenant and user ids, rate limits per tenant and user. Amazon API Gateway, or an ALB with Spring Cloud Gateway.</li><li><strong>Agent orchestrator:</strong> runs the agent loop, builds prompts, applies policy (which tools this user may use), streams the response. Spring Boot on ECS Fargate or EKS, using SseEmitter or WebFlux.</li><li><strong>Retrieval service:</strong> hybrid search, reranking, permission filters. Amazon OpenSearch (k-NN + BM25), or Aurora PostgreSQL with pgvector.</li><li><strong>LLM gateway:</strong> one interface to all models, with retries, fallback, token counting and cost metering. Amazon Bedrock, with Resilience4j circuit breakers.</li><li><strong>Tool registry:</strong> a catalogue of tools with JSON schemas, owners and a read/write flag; executes calls to ERP APIs.</li><li><strong>Ingestion workers:</strong> parse, chunk, embed and index uploaded documents asynchronously. An S3 event goes to SQS, then ECS or Lambda workers; Textract for scanned PDFs.</li><li><strong>Stores:</strong> conversations, approvals and an append-only audit log in Aurora PostgreSQL or DynamoDB, exported to S3.</li></ul><p><strong>Points worth saying</strong></p><ul><li><strong>Stateless orchestrator:</strong> conversation state lives in the store, so any instance can serve the next message and you can scale horizontally.</li><li><strong>Async where it is slow:</strong> ingestion and long-running ERP jobs go through SQS, never inside the chat request.</li><li><strong>Resilience:</strong> timeouts on every LLM and ERP call, circuit breakers, retries with backoff only for idempotent calls.</li><li><strong>Infrastructure as code</strong> (CDK or Terraform) and a CI/CD pipeline: build, unit tests, eval suite, security scan, deploy to staging, canary to production.</li></ul><h3>5. RAG pipeline</h3><p>Retrieval quality decides answer quality, so the interesting parts are hybrid search, reranking and permission filters, not just “put chunks in a vector DB”.</p><p><strong>Ingestion (offline, asynchronous)</strong></p><ol><li><strong>Upload:</strong> the file lands in S3 under a tenant prefix; an S3 event puts a message on SQS.</li><li><strong>Parse:</strong> extract text, tables and headings (Textract or Unstructured for PDFs and scans; Apache Tika for Office files). Keep tables as markdown so rows stay together.</li><li><strong>Chunk:</strong> about 300–800 tokens with 10–15% overlap, split on structure (headings, paragraphs) first.</li><li><strong>Enrich:</strong> attach metadata to every chunk: tenant id, document id, title, section, page, date, and the access list (which roles or users may read it).</li><li><strong>Embed:</strong> call an embedding model (for example Titan Embeddings or Cohere Embed on Bedrock).</li><li><strong>Index:</strong> store vector, text and metadata in OpenSearch, which supports both vector (k-NN) and keyword (BM25) search.</li></ol><p><strong>Chunking strategies</strong></p><ul><li><strong>Fixed size:</strong> split every N tokens. A quick baseline only.</li><li><strong>Recursive:</strong> split by paragraph, then sentence, then words until the chunk fits. A good default.</li><li><strong>Structure-aware:</strong> split on headings, sections and table boundaries. Best for manuals, policies and contracts.</li><li><strong>Semantic:</strong> split where embedding similarity between sentences drops. Good for long unstructured prose.</li><li><strong>Agentic / LLM-based:</strong> an LLM decides the boundaries and writes a summary per chunk. For high-value documents; costly at scale.</li></ul><p><strong>Retrieval (online, per question)</strong></p><ol><li><strong>Rewrite the query</strong> (optional): an LLM turns “what about last year’s?” into a standalone question using the chat history.</li><li><strong>Embed the query.</strong> The question is embedded, not chunked.</li><li><strong>Hybrid search:</strong> vector search (meaning) plus BM25 keyword search (exact terms such as part numbers, PO codes, SKUs), merged with reciprocal rank fusion. Take the top ~50.</li><li><strong>Permission filter inside the query:</strong> tenant id and access list are filters in the search itself. Filtering after retrieval leaks data.</li><li><strong>Rerank:</strong> a cross-encoder reranker scores the 50 against the question; keep the top 5–8.</li><li><strong>Generate:</strong> the prompt holds system rules, the chunks marked as untrusted reference data, and the question. The model cites chunk ids, and the UI turns those into links.</li></ol><p>The vector database finds nearest neighbours with an approximate nearest neighbour index (such as HNSW) using cosine similarity between embeddings. Frameworks like LangChain only wrap that call.</p><h3>6. Agent loop and tool calling</h3><p>The LLM never touches the ERP directly: it only proposes a tool call, and the orchestrator decides whether and how to run it.</p><p>[DIAGRAM 2: agent loop]</p><p><strong>Example: “How many units of SKU-123 do we have, and order 500 more from Acme”</strong></p><ol><li>The orchestrator sends the LLM the conversation, a system prompt, and the tool definitions this user is allowed to use (name, description, JSON schema of arguments).</li><li>The LLM replies with a tool call: check_inventory({&quot;sku&quot;: &quot;SKU-123&quot;}).</li><li>The orchestrator validates the arguments against the schema, checks policy, and runs the tool with the user’s token. The result (“120 units”) goes back to the LLM.</li><li>The LLM proposes create_purchase_order({&quot;supplier&quot;: &quot;Acme&quot;, &quot;sku&quot;: &quot;SKU-123&quot;, &quot;qty&quot;: 500}). This is a write tool, so the orchestrator pauses and the UI shows an approval card.</li><li>The user approves. The orchestrator runs the call with an idempotency key and logs it.</li><li>The LLM writes the final answer (“You had 120 units; PO-7781 for 500 more is created”), streamed to the UI.</li></ol><p><strong>Guardrails on the loop:</strong> a maximum number of steps per turn, a timeout per tool, and a token budget per conversation, so a confused agent can’t loop forever or run up cost.</p><p><strong>Tool registry and SDK</strong></p><ul><li>Each product team registers tools with a name, description, JSON schema, owner, read-only or write flag, and the ERP permission it needs.</li><li>A small Java SDK (for example an @AgentTool annotation on a Spring method) generates the schema and registers it, so teams add tools without touching the orchestrator.</li><li>Expose tools through MCP (Model Context Protocol) so the same tools work with other agents and clients.</li><li>Tool descriptions are prompts: write them carefully and test them in evals, because the LLM chooses tools from them.</li></ul><h3>7. Security for ERP actions</h3><p>The core rule: <strong>the agent can never do more than the signed-in user could do by clicking through the ERP themselves.</strong></p><ul><li><strong>Agent acts with too much power:</strong> tools call ERP APIs with the user’s own token (OAuth token exchange / on-behalf-of), never a shared service account. The ERP enforces the same permissions as its UI.</li><li><strong>User doesn’t see what will change:</strong> human-in-the-loop. Read tools run automatically; every write tool shows an approval card with the exact payload. High-value actions can need a second approver.</li><li><strong>LLM invents bad arguments:</strong> validate every tool call against its JSON schema and business rules (quantity &gt; 0, supplier exists) before running it. Reject and tell the LLM why.</li><li><strong>Duplicate actions on retry:</strong> an idempotency key per approved action, so a network retry can’t create two POs.</li><li><strong>Prompt injection:</strong> retrieved documents and tool results are labelled as untrusted data, and the system prompt says never to follow instructions inside them. Writes always need human approval, so an injected “create a PO” can’t run on its own. Optionally scan inputs with a guardrail model.</li><li><strong>Data leaking across tenants:</strong> tenant id on every request, chunk, log and cache key; filtered inside the search query; separate encryption keys per tenant.</li><li><strong>Sensitive data sent to the model:</strong> mask PII where it isn’t needed, keep traffic inside the cloud provider, and set data retention to match customer contracts.</li><li><strong>No accountability:</strong> an append-only audit log of every prompt, tool call, arguments, approver, result and timestamp.</li><li><strong>Unsafe model output in the UI:</strong> sanitise rendered markdown and links to prevent XSS.</li></ul><blockquote><em>Least privilege through user-scoped tokens, human approval for writes, schema validation, idempotency, full audit, and treating all retrieved content as data, never as instructions.</em></blockquote><h3>8. Scalability, reliability and cost</h3><p><strong>Scale</strong></p><ul><li>Stateless orchestrator instances behind a load balancer, autoscaled on concurrent streams (not CPU, since most time is spent waiting on the LLM).</li><li>Virtual threads (Java 21) or WebFlux, so thousands of open SSE streams don’t each hold a platform thread.</li><li>Ingestion scales independently on SQS queue depth.</li></ul><p><strong>Reliability</strong></p><ul><li><strong>Model fallback:</strong> if the primary model errors or times out, retry once, then switch to a fallback model or region.</li><li><strong>Circuit breakers</strong> on ERP and model calls, so a slow dependency doesn’t exhaust threads.</li><li><strong>Graceful degradation:</strong> if the search index is down, say “I can’t reach the documents right now” instead of inventing an answer.</li></ul><p><strong>Cost control</strong></p><ul><li><strong>Rate limits and token quotas</strong> per tenant and user stop one customer or a runaway loop from blowing the budget.</li><li><strong>Model routing:</strong> a small, cheap model for query rewriting and classification; the large model only for tool planning and the final answer.</li><li><strong>Prompt caching:</strong> reuse the long, fixed system prompt and tool definitions across requests.</li><li><strong>Semantic cache:</strong> return a stored answer for near-identical questions (per tenant, invalidated when documents change).</li><li><strong>Trim context:</strong> send the top 5–8 reranked chunks, not 50; summarise old conversation turns.</li><li><strong>Token metering</strong> per tenant for dashboards, alerts and billing.</li></ul><h3>9. Evals and observability</h3><p>An LLM feature without evals can’t be changed safely, so treat the eval suite like unit tests: it runs in CI on every prompt, model or retrieval change.</p><p><strong>Offline evals (before release)</strong></p><ul><li><strong>Golden set:</strong> a few hundred real questions per domain with expected answers, source documents and tool calls.</li><li><strong>Retrieval metrics:</strong> did the right chunk appear in the top k (recall@k, MRR)?</li><li><strong>Answer metrics:</strong> faithfulness, correctness and citation accuracy, scored by an LLM judge and spot-checked by people.</li><li><strong>Agent metrics:</strong> right tool chosen, valid arguments, number of steps, task completion rate.</li><li><strong>Safety set:</strong> prompt-injection attempts, cross-tenant questions and unauthorised actions, which must all be refused.</li><li>A change ships only if scores don’t regress.</li></ul><p><strong>Online monitoring (in production)</strong></p><ul><li><strong>Tracing:</strong> one trace per turn showing retrieval results, prompt, model call, tool calls, latency and tokens.</li><li><strong>Dashboards and alerts:</strong> time to first token, error and fallback rates, tool failure rates, cost per tenant.</li><li><strong>User feedback:</strong> thumbs up/down, with bad cases fed back into the golden set.</li><li><strong>Approval analytics:</strong> how often users reject or edit a proposed action. A high rejection rate means a tool or prompt needs work.</li></ul><h3>10. Trade-offs and likely follow-up questions</h3><ul><li><strong>Why not let the LLM call ERP APIs directly?</strong> Then a prompt injection or hallucination becomes a real transaction. The orchestrator is the single place to validate, authorise, require approval and audit.</li><li><strong>SSE or WebSocket?</strong> SSE: a one-way token stream over plain HTTP, easy behind gateways. Cancel and approve are normal POSTs. WebSocket only for real two-way traffic.</li><li><strong>Why hybrid search?</strong> Vectors capture meaning but miss exact codes like “PO-4471”. BM25 catches exact terms. Fusing both plus a reranker gives the best recall and precision.</li><li><strong>OpenSearch or pgvector?</strong> OpenSearch for large corpora and built-in hybrid search; pgvector when data is modest and you want one Postgres for everything.</li><li><strong>Why RAG instead of fine-tuning?</strong> Documents change daily and need per-user permissions and citations. Fine-tuning can’t do access control and goes stale.</li><li><strong>How do you stop hallucinations?</strong> Ground on retrieved chunks, require citations, let the model say “I don’t know”, measure faithfulness in evals, and show sources in the UI.</li><li><strong>What if the user approves, then the ERP call fails?</strong> Show the error, let the LLM explain it, and allow a retry with the same idempotency key so it can never double-create.</li><li><strong>What if a user loses access to a document?</strong> ACLs are stored on each chunk and checked at query time; a permission-change event re-indexes that document’s metadata.</li><li><strong>Microservices or a modular monolith?</strong> Start the orchestrator as a modular monolith, but keep ingestion separate from day one because it scales differently.</li><li><strong>How would other teams add agents?</strong> Through the tool registry SDK and MCP: they register tools with schemas and permissions, and the hub discovers them.</li><li><strong>How do you roll out a new model safely?</strong> Run the eval suite, canary it behind a feature flag, compare quality, latency and cost, then ramp up.</li></ul><h3>11. A five-minute spoken script</h3><ol><li><strong>Scope (30 s):</strong> “Users ask questions over company documents and trigger ERP actions like creating a PO. It’s multi-tenant, so the key constraints are: the assistant never exceeds the user’s own permissions, writes need approval and an audit trail, and answers stream. I’ll assume the ERP has REST APIs and we’re on AWS with Bedrock.”</li><li><strong>Architecture (60 s):</strong> “An Angular chat library talks over SSE to an API Gateway that handles OAuth and rate limits. A Spring Boot orchestrator runs the agent loop, using retrieval over OpenSearch, an LLM gateway in front of Bedrock, and a tool registry that calls ERP APIs. Conversations and audit go to a database. Ingestion runs async: S3, SQS, workers.”</li><li><strong>RAG (60 s):</strong> “Ingestion parses, chunks by structure with overlap, attaches tenant and ACL metadata, embeds and indexes. At query time I embed the question and run hybrid vector plus keyword search, filter by tenant and permissions inside the query, rerank, and answer with citations.”</li><li><strong>Agent loop and security (90 s):</strong> “The LLM only proposes tool calls. The orchestrator validates arguments and runs tools with the user’s own token. Reads run automatically; writes show an approval card, then execute with an idempotency key and get logged. Retrieved text is treated as data, never instructions. Loops are capped by steps, time and tokens.”</li><li><strong>Operations (40 s):</strong> “Stateless services scale on concurrent streams. Circuit breakers and model fallback handle outages. Cost is controlled with quotas, model routing, prompt caching and metering. Quality is protected by evals in CI and tracing plus feedback in production.”</li><li><strong>Platform angle (20 s):</strong> “Product teams register tools through an SDK and MCP and embed the shared Angular chat component, so they get agents without rebuilding the plumbing.”</li></ol><p>Then stop and ask: <em>“Which part would you like me to go deeper on?”</em> Interviewers reward candidates who invite the deep dive rather than monologue.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fdf301dd02cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Personal OS: A Personal AI Operating System for My Life]]></title>
            <link>https://vinaysomawat.medium.com/building-vinay-ai-os-a-personal-ai-operating-system-for-my-life-1824a438361f?source=rss-f850c4a0cecf------2</link>
            <guid isPermaLink="false">https://medium.com/p/1824a438361f</guid>
            <category><![CDATA[anthropics]]></category>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Vinay Somawat]]></dc:creator>
            <pubDate>Mon, 13 Jul 2026 15:57:10 GMT</pubDate>
            <atom:updated>2026-07-14T06:09:45.215Z</atom:updated>
            <content:encoded><![CDATA[<p>I just open-sourced Personal OS — a single, personal Next.js app that tracks my tasks, career, finances, health, learning, and coding practice, with Claude generating insight in every module and a per-module Telegram bot so I can log everything hands-free by text, voice, or photo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SLSkPMFDM_Kp3SJvO-YK3A.png" /><figcaption>Dashboard View</figcaption></figure><p>The idea started from a simple frustration: my life was scattered across a to-do app, a budgeting spreadsheet, a fitness tracker, a notes app, and a dozen browser tabs, and none of them talked to each other. So I built one place that does.</p><p>A few things that make it different from a typical dashboard:</p><ul><li>A daily “Life Score” (0–100) that rolls up health, finance, career, learning, and coding into one number, computed fresh on every page load.</li><li>Deterministic logic wherever possible — streaks, nudges, and rankings are plain math, not AI, so they’re predictable and free. Claude is reserved for the parts that actually need judgment: a career mentor, a finance advisor, daily study plans, document Q&amp;A.</li><li>A Telegram bot per module — I can just text or send a voice note (“ran 5k, logged lunch”) and it parses the action and writes it to the right table.</li><li>Two-way sync between modules — completing a coding challenge or a workout also closes the linked task in my planner, and vice versa.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1nQOr4poQQ_uAO6flflbyg.png" /><figcaption>Planner View</figcaption></figure><p>It’s built with Next.js, Supabase, and the Claude API, and it’s genuinely just for me — not a multi-tenant product. I open-sourced it as a working example of an AI-assisted personal system, in case the patterns (or the “why”) are useful to someone else building their own.</p><p>Code’s here: <a href="https://github.com/vinaysomawat/personal-ai-os">https://github.com/vinaysomawat/personal-ai-os</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1824a438361f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[✏️ Building an Undo/Redo System for Text Input in JavaScript (with History Limit)]]></title>
            <link>https://vinaysomawat.medium.com/%EF%B8%8F-building-an-undo-redo-system-for-text-input-in-javascript-with-history-limit-d6280d2adbde?source=rss-f850c4a0cecf------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6280d2adbde</guid>
            <category><![CDATA[interview-experience]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[frontend-interviews]]></category>
            <dc:creator><![CDATA[Vinay Somawat]]></dc:creator>
            <pubDate>Fri, 15 Aug 2025 14:30:05 GMT</pubDate>
            <atom:updated>2025-08-15T14:30:05.015Z</atom:updated>
            <content:encoded><![CDATA[<p>Ever wondered how “Undo” and “Redo” buttons work behind the scenes in rich text editors like Google Docs? Let’s break it down and build our own simplified version from scratch!</p><p>🔍<strong> The Problem</strong></p><p>We’re tasked with creating a simple <strong>text input manager</strong> that supports:</p><ul><li>Editing text</li><li>Undoing and redoing text changes</li><li>Returning the current state</li><li>Limiting the <strong>history</strong> to the last <strong>5 entries only</strong></li></ul><p>No UI. Just clean logic using plain JavaScript.</p><p>🧠<strong> The Core API Design</strong></p><p>We’ll create a TextInput class that supports the following methods:</p><pre>class TextInput {<br>  edit(text)        // Save new version<br>  undo()            // Go back one version<br>  redo()            // Re-apply a previously undone version<br>  getCurrentState() // Return current text<br>}</pre><p><strong>But with a twist:</strong></p><ul><li>The history must <strong>only keep the last 5 entries</strong>.</li><li>The redo stack must be <strong>cleared</strong> after any new edit.</li></ul><p>🧱<strong> Let’s Build It</strong></p><p>Here’s the final version of the class:</p><pre>class TextInput {<br>  constructor() {<br>    this.text = &#39;&#39;;<br>    this.history = [&#39;&#39;];<br>    this.redoStack = [];<br>  }<br><br>  edit(text) {<br>    this.text = text;<br>    this.history.push(text);<br>    <br>    // Keep only last 5 versions<br>    if (this.history.length &gt; 5) {<br>      this.history.shift();<br>    }<br><br>    // Clear redo stack on fresh edit<br>    this.redoStack = [];<br>  }<br><br>  undo() {<br>    if (this.history.length &gt; 1) {<br>      const undone = this.history.pop();<br>      this.redoStack.push(undone);<br><br>      this.text = this.history[this.history.length - 1];<br>    }<br>  }<br><br>  redo() {<br>    if (this.redoStack.length &gt; 0) {<br>      const redone = this.redoStack.pop();<br>      this.history.push(redone);<br>      this.text = redone;<br>    }<br>  }<br><br>  getCurrentState() {<br>    return this.text;<br>  }<br>}</pre><p>🧪<strong> Let’s Try It Out</strong></p><pre>const editor = new TextInput();<br><br>editor.edit(&#39;Version 1&#39;);<br>editor.edit(&#39;Version 2&#39;);<br>editor.edit(&#39;Version 3&#39;);<br>editor.edit(&#39;Version 4&#39;);<br>editor.edit(&#39;Version 5&#39;);<br>editor.edit(&#39;Version 6&#39;); // Oldest (&#39;&#39;) is dropped<br><br>console.log(editor.getCurrentState()); // &quot;Version 6&quot;<br><br>editor.undo(); <br>console.log(editor.getCurrentState()); // &quot;Version 5&quot;<br><br>editor.undo(); <br>console.log(editor.getCurrentState()); // &quot;Version 4&quot;<br><br>editor.redo(); <br>console.log(editor.getCurrentState()); // &quot;Version 5&quot;<br><br>editor.redo(); <br>console.log(editor.getCurrentState()); // &quot;Version 6&quot;</pre><p>✅<strong> Things to Notice</strong></p><ul><li>The history acts like a stack with a max size of 5.</li><li>Undo pushes the current version to redoStack.</li><li>Redo pops from redoStack and updates the current state.</li><li>After a new edit, we clear the redo stack to avoid inconsistent states.</li></ul><p>🧠<strong> Why Slice Instead of Splice?</strong></p><p>We use slice() to trim the history because:</p><ul><li>slice() is <strong>non-mutating</strong>: it returns a shallow copy</li><li>splice() is <strong>mutating</strong> and changes the original array, which can get tricky when chaining operations</li></ul><p>But in our implementation, we just use shift() to maintain the 5-item constraint, which is safe and simple for FIFO behavior.</p><p>🧯<strong> Bonus: Handling API Sync (Optional)</strong></p><p>If we were saving edits to a server (e.g., autosave), we’d also need to:</p><ul><li>Debounce or throttle API calls</li><li>Queue pending saves</li><li>Handle race conditions (e.g., edit happens while previous save is in progress)</li></ul><p>This opens the door to <strong>optimistic UI updates</strong> and <strong>eventual consistency</strong>, but that’s a story for another blog 😊</p><p>📚<strong> Final Thoughts</strong></p><p>Undo/Redo may seem simple on the surface, but implementing it cleanly reveals deeper concepts:</p><ul><li>Stack data structures</li><li>State management</li><li>Edge cases (history limits, redo invalidation)</li><li>Mutability vs immutability</li></ul><p>Building systems like this from scratch is a great exercise in understanding <strong>how real apps work</strong> behind the scenes.</p><p>💬<strong> What’s next?</strong></p><p>Try extending this:</p><ul><li>Add timestamp to each version</li><li>Add save() method with simulated async API</li><li>Add support for <strong>batch undos</strong> (like holding Ctrl+Z)</li></ul><p>👨‍💻<strong> Happy coding!</strong></p><p>If you liked this post, follow for more hands-on system design and frontend logic breakdowns.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6280d2adbde" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[E**os Life | Interview Experience — Frontend Developer | Round 2]]></title>
            <link>https://vinaysomawat.medium.com/e-os-life-interview-experience-frontend-developer-round-2-730983f5347a?source=rss-f850c4a0cecf------2</link>
            <guid isPermaLink="false">https://medium.com/p/730983f5347a</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[interview-experience]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Vinay Somawat]]></dc:creator>
            <pubDate>Wed, 13 Aug 2025 17:04:13 GMT</pubDate>
            <atom:updated>2025-08-13T17:04:13.944Z</atom:updated>
            <content:encoded><![CDATA[<h3>E**os Life | Interview Experience — Frontend Developer | Round 2</h3><p><strong>Date:</strong> 30th July 2025<br><strong>Mode:</strong> Virtual (60 minutes)<br><strong>Level:</strong> EASY-MEDIUM</p><p><strong>Q1:</strong> Build a <strong>Job Board UI</strong> with pagination.</p><p><strong>Requirements:</strong></p><ul><li>Fetch a list of job IDs (from an API or simulated dataset).</li><li>Display <strong>only 6 jobs at a time</strong>.</li><li>Add a <strong>“Load More”</strong> button to display the next 6 jobs incrementally.</li><li>Ensure clean and responsive UI layout.</li></ul><p><strong>Bonus Expectations:</strong></p><ul><li>Handle loading and error states gracefully.</li><li>Maintain efficient pagination logic.</li><li>Keep the structure scalable for features like filters and search.</li><li>Implement performance optimizations (e.g., lazy loading).</li></ul><p>🎯 <strong>Final Thoughts</strong><br> This round focused on <strong>real-world UI development</strong>, <strong>state management</strong>, and <strong>scalability considerations</strong>. It wasn’t just about coding the feature but also about <strong>anticipating future requirements</strong> and ensuring the design could handle them.</p><p>If you’re preparing for similar rounds, focus on:</p><ul><li>State management best practices.</li><li>Pagination patterns and performance tweaks.</li><li>Writing modular components.</li><li>Thinking about extensibility while building.</li></ul><p>💡 <strong>Previous Blog Reference:</strong> You can read about <strong>Round 1 — Tic Tac Toe Game Challenge</strong> here: <a href="https://medium.com/programming-diaries/e-os-life-interview-experience-frontend-developer-round-1-ddb380c0d279">https://medium.com/programming-diaries/e-os-life-interview-experience-frontend-developer-round-1-ddb380c0d279</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=730983f5347a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[E**os Life| Interview Experience — Frontend Developer | Round 1]]></title>
            <link>https://vinaysomawat.medium.com/e-os-life-interview-experience-frontend-developer-round-1-ddb380c0d279?source=rss-f850c4a0cecf------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddb380c0d279</guid>
            <category><![CDATA[interview-experience]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Vinay Somawat]]></dc:creator>
            <pubDate>Tue, 12 Aug 2025 18:14:43 GMT</pubDate>
            <atom:updated>2025-08-12T18:14:43.809Z</atom:updated>
            <content:encoded><![CDATA[<h3>E**os Life| Interview Experience — Frontend Developer | Round 1</h3><p><strong>Date:</strong> 29th July 2025<br><strong>Mode:</strong> Virtual (60 minutes)</p><p><strong>Q1:</strong> Build a <strong>Tic Tac Toe game</strong> from scratch using HTML, CSS, and JavaScript (or React).</p><p><strong>Requirements:</strong></p><ul><li>A functional 3x3 grid.</li><li>Alternate turns between players (X and O).</li><li>Detect and display win/draw status.</li><li>Include a reset button.</li><li>Apply basic styling for a clean UI.</li></ul><p><strong>Evaluation Focus Areas:</strong></p><ul><li>Correct implementation of win/draw detection.</li><li>Clean and responsive UI rendering.</li><li>Modular and reusable code structure.</li><li>Communication of thought process while coding.</li></ul><p>🎯 <strong>Final Thoughts</strong><br> This round tested <strong>core problem-solving skills</strong>, <strong>UI rendering capability</strong>, and <strong>coding clarity under time pressure</strong>. Even though the task was simple, the focus was on <strong>writing maintainable, scalable, and easy-to-read code</strong> while explaining the logic clearly.</p><p>If you’re preparing for similar rounds, focus on:</p><ul><li>Thinking out loud while coding.</li><li>Keeping UI minimal yet functional.</li><li>Structuring code for readability and reuse.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddb380c0d279" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[E***in India | Interview Experience — Senior Angular Developer | Round 2]]></title>
            <link>https://vinaysomawat.medium.com/e-in-india-interview-experience-senior-angular-developer-round-2-d85085499eb4?source=rss-f850c4a0cecf------2</link>
            <guid isPermaLink="false">https://medium.com/p/d85085499eb4</guid>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[interview-experience]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Vinay Somawat]]></dc:creator>
            <pubDate>Wed, 30 Jul 2025 08:20:33 GMT</pubDate>
            <atom:updated>2025-07-30T10:26:38.676Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>E***in India | Interview Experience — Senior Angular Developer | Round 2</strong></h3><p><strong>Date: </strong>29th July 2025<br><strong>Mode:</strong> Virtual (60 minutes)<br><strong>Level: </strong>EASY</p><p>Q1: Tell me about your role in the current company.</p><p>Q2: What’s the last technical innovation or effort you’ve contributed to reducing tech debt in the last 6 months?</p><p>Q3: What were the major challenges you faced during the migration from AngularJS to Angular 19?</p><p>Q4: Given an array of car objects, print all the model values that belong to the year 2022.</p><pre>const cars = [<br>  { make: &quot;Toyota&quot;, model: &quot;Corolla&quot;, year: 2022 },<br>  { make: &quot;Tesla&quot;, model: &quot;Model 3&quot;, year: 2021 },<br>  { make: &quot;Toyota&quot;, model: &quot;Hilux&quot;, year: 2022 },<br>  { make: &quot;Toyota&quot;, model: &quot;RAV4&quot;, year: 2022 }<br>];<br><br>// [&quot;Corolla&quot;, &quot;Hilux&quot;, &quot;RAV4&quot;]</pre><p>Q5: Write a JavaScript program to count and print the frequency of each character in a string.</p><pre>Input: &quot;This is my line&quot;<br>Output: T1 h1 i3 s2 m1 y1 l1 n1 e1</pre><p>Q6: How do you handle data communication between Angular components? Can you explain mono-repo architecture and communication between different repositories?</p><p>Q7: What design pattern do you use for real-time communication from a service to the component?</p><p>Q8: How would you implement an Auth Guard in Angular?</p><p>Q9: Given the following code snippet, suggest improvements or issues:</p><pre>*ngFor=&quot;let employee of employees&quot;  <br>&lt;div&gt;{{ getEmplyeename(employee.id) }}&lt;/div&gt;</pre><pre>getEmplyeename(name) {<br>  ...<br>  return updatedname;<br>}</pre><p>Q10: How do you write a unit test for a function defined in a service?</p><p>Q11: Explain ViewEncapsulation in Angular. What metadata options are available, and when do you use each?</p><p>Q12: Design AutoComplete. Explaining hashing the response, debouncing, trending searches, and canceling api calls for new searches.</p><h3>🎯 Final Thoughts</h3><p>This round tested both my <strong>depth in Angular</strong>, especially performance and architecture, and my <strong>practical coding ability</strong> in JavaScript. Behavioral questions were blended into technical conversations — for example, asking how I handled disagreements during migrations or contributed to design decisions.</p><p>If you’re preparing for similar interviews, focus on:</p><ul><li><strong>Angular internals (Change Detection, ViewEncapsulation, Lazy Loading)</strong></li><li><strong>JavaScript coding fluency</strong></li><li><strong>Real-world architectural experience</strong></li><li><strong>Communication between components</strong></li><li><strong>Code optimization patterns</strong></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d85085499eb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VC**ply Interview Experience — Frontend Engineer | Round 2]]></title>
            <link>https://vinaysomawat.medium.com/vc-ply-interview-experience-frontend-engineer-round-2-ec621cb6c9c7?source=rss-f850c4a0cecf------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec621cb6c9c7</guid>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[frontend-architecture]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <dc:creator><![CDATA[Vinay Somawat]]></dc:creator>
            <pubDate>Mon, 28 Jul 2025 10:45:43 GMT</pubDate>
            <atom:updated>2025-07-28T10:45:43.817Z</atom:updated>
            <content:encoded><![CDATA[<h3>VC**ply Interview Experience — Frontend Engineer | Round 2</h3><p><strong>Role:</strong> Senior Frontend Engineer<br><strong>Round Type:</strong> Frontend System Design<br><strong>Duration:</strong> 60 minutes<br><strong>Date: </strong>23/07/2025</p><blockquote>Please find the Round 1 Experience here: <a href="https://medium.com/programming-diaries/vc-ply-interview-experience-frontend-engineer-role-ps-ds-round-a253d5a998ed"><strong>https://medium.com/programming-diaries/vc-ply-interview-experience-frontend-engineer-role-ps-ds-round-a253d5a998ed</strong></a></blockquote><p>In the second round of my interview, I was asked to design a <strong>Book Reading Application</strong> from a frontend system design perspective.</p><p>Browsing books across categories:</p><ul><li><em>Best Sellers</em></li><li><em>Popular</em></li><li><em>Recommended to You</em></li><li>A reader interface for consuming content.</li><li>Remembering the user’s last read position and resuming from that point.</li></ul><p>I was expected to cover the following in my discussion:</p><ul><li>High-level architecture</li><li>Component design</li><li>State management</li><li>API interactions</li><li>UI/UX considerations</li></ul><h3>💡 My Thought Process &amp; Approach</h3><h3>1. UI/UX Considerations</h3><p>I started with how the app would feel and look to the user:</p><p><strong>Landing Page</strong></p><ul><li>Clean layout with three main sections: Best Sellers, Popular, and Personalized Recommendations.</li><li>Book cards with cover image, title, and a short description.</li></ul><p><strong>Reader Interface</strong></p><ul><li>Full-screen reading view.</li><li>Controls for navigation (Next, Previous), font size adjustments, and dark mode.</li><li>Infinite scroll or pagination for long-form content.</li><li>Smooth resume from last read position.</li></ul><h3>2. Component Design</h3><p>Using a modular approach inspired by React/Angular component architecture:</p><pre>&lt;BookList /&gt;       // Fetch and display books by category<br>&lt;BookCard /&gt;       // Represent a single book<br>&lt;Reader /&gt;         // Full-screen reading experience<br>&lt;Navbar /&gt;         // Navigation, profile, and search<br>&lt;RecommendationEngine /&gt; // Fetch and show personalized books</pre><ul><li>The &lt;Reader /&gt; component manages reading state and communicates with the API to persist progress.</li><li>Lazy loading was considered for book content and non-critical modules to optimize performance.</li></ul><h3>3. State Management</h3><p>To handle the dynamic state of user sessions and preferences:</p><ul><li>Used <strong>Redux / Context API / Angular Services</strong> for:</li><li>User preferences (theme, font size)</li><li>Current reading progress:</li></ul><p>readingProgress = { [bookId]: { page: 12, scrollPosition: 350 } }</p><ul><li>Fetched books categorized per user context</li></ul><h3>4. API Design</h3><p>I proposed the following API endpoints for efficient frontend-backend communication:</p><ul><li>GET /books?category=best-sellers → List categorized books</li><li>GET /book/:id → Metadata of a book</li><li>GET /book/:id/content?page=5 → Paginated book content</li><li>POST /book/:id/progress → Save last-read position</li><li>GET /book/:id/progress → Fetch progress to resume</li><li>GET /books/recommended → User-specific recommendations</li></ul><p>The API responses were expected to support lazy loading, partial rendering, and fail-safe reading experiences.</p><h3>5. High-Level Architecture</h3><p><strong>Frontend:</strong></p><ul><li>Built with React or Angular</li><li>Modular routes for /books, /reader/:id, /profile</li><li>Code-splitting and lazy-loading for scalable performance</li></ul><h3>✅ Outcome &amp; Feedback</h3><p>The interviewer was pleased with my end-to-end breakdown of the system. Here’s what stood out:</p><ul><li><strong>✔️ Clear separation of concerns</strong> in component design.</li><li><strong>✔️ Good use of lazy loading</strong> and performance optimization strategies.</li><li><strong>✔️ Thoughtful UX</strong> with real-world reading considerations.</li></ul><h3>Suggested Improvements:</h3><ul><li>Consider <strong>WebSocket support</strong> for collaborative reading or real-time annotations.</li><li>Add <strong>offline reading capability</strong> using Service Workers or local storage.</li><li>Better <strong>accessibility support</strong> (e.g., ARIA roles, keyboard navigation).</li></ul><h3>🎯 Final Thoughts</h3><p>This round was a great opportunity to demonstrate how I think about building scalable, user-centric frontend applications. The key to acing system design rounds like this lies in:</p><ul><li>Prioritizing user experience</li><li>Thinking in components</li><li>Balancing API design with frontend architecture</li><li>Considering scalability and maintainability</li></ul><p>If you’re preparing for frontend system design interviews, I’d recommend practicing building mini systems around real-world use cases like this. Books, videos, dashboards, or chat — each problem hones your architectural thinking.</p><p><em>Thanks for reading! If you found this helpful or are preparing for frontend interviews, feel free to connect or drop your thoughts in the comments below.</em> ✨</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec621cb6c9c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Frontend DOMinators: Cracking Frontend Interviews in 2025]]></title>
            <link>https://medium.com/programming-diaries/frontend-dominators-cracking-frontend-interviews-in-2025-79c3173d1e0c?source=rss-f850c4a0cecf------2</link>
            <guid isPermaLink="false">https://medium.com/p/79c3173d1e0c</guid>
            <category><![CDATA[coding-interviews]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Vinay Somawat]]></dc:creator>
            <pubDate>Sun, 27 Jul 2025 11:58:49 GMT</pubDate>
            <atom:updated>2025-07-27T11:58:49.731Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Everything you need to know: from question formats to structured prep strategies</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*sZcbicSY21r1R4KG7O7P9g.png" /></figure><p>Frontend interviews are widely known for their complexity and inconsistency. Unlike full-stack or backend roles, frontend interview loops can vary drastically across companies. Some organizations treat frontend engineers like general software engineers, while others — like Google, Amazon, and Meta — have distinct frontend-focused rounds alongside standard algorithmic challenges.</p><p>Over the past few years, there’s been a positive shift: companies are moving away from abstract data structures and algorithms (DSA) and placing more weight on domain-relevant frontend tasks. This means building UI components, implementing JavaScript functions, or demonstrating hands-on knowledge of browser behavior — which better reflect the day-to-day responsibilities of frontend engineers.</p><p>However, the frontend field is still underserved when it comes to curated interview prep content. General software engineering platforms often neglect areas like frontend system design or UI coding tasks. And with the variety of possible question types, interview preparation can feel overwhelming.</p><p>That’s where <strong>Frontend DOMinators</strong> comes in.</p><p>We aim to provide a practical and focused roadmap to help frontend engineers tackle interviews with confidence. Whether you’re aiming for a Big Tech role or a fast-paced startup, our mission is to demystify the frontend interview process.</p><h3>How We Help</h3><p>On <strong>Frontend DOMinators</strong>, you can:</p><ul><li>Learn how to craft a frontend-optimized resume that gets noticed.</li><li>Understand the key types of frontend interview questions and how to approach each.</li><li>Practice real-world questions across various formats with detailed solutions.</li><li>Follow structured study plans for targeted preparation.</li></ul><h3>Resume First: Get in the Door</h3><p>Your resume is your first impression. Many candidates get rejected before interviews even start, not because of lack of skill, but due to weak resumes that fail to showcase impact.</p><p>We help you tailor your resume specifically for frontend roles. This includes:</p><ul><li>Highlighting projects with measurable UI/UX impact</li><li>Demonstrating performance optimizations, accessibility improvements, and visual polish</li><li>Avoiding backend-heavy language unless relevant</li></ul><p>Even top engineers miss out due to poorly framed resumes. Don’t let that be you.</p><h3>Understanding Interview Formats</h3><p>Frontend interviews can include a mix of the following:</p><h4>💪 Coding Questions</h4><ul><li><strong>Algorithmic problems:</strong> Still common at some firms (e.g., Amazon, Google)</li><li><strong>JavaScript problems:</strong> Functions/classes that mimic real-world browser behavior or front-end tasks</li><li><strong>UI implementation:</strong> Build components using HTML/CSS/JS (or with frameworks like React/Vue)</li></ul><blockquote><em>“Domain-relevant coding tasks are now preferred over abstract algorithm drills.”</em></blockquote><h4>📊 System Design Questions</h4><ul><li>Typically asked for senior+ roles</li><li>Expect to design front-end apps, dashboards, or UI systems (e.g., autocomplete, modals, feeds)</li><li>Focus on state management, performance, scalability, and user experience</li></ul><h4>🎮 Quiz &amp; Trivia Questions</h4><ul><li>Short knowledge checks during interviews</li><li>Test understanding of topics like event loop, reflows/repaints, z-index stacking, etc.</li></ul><h4>🤝 Behavioral Interviews</h4><ul><li>Explore your past experience, collaboration style, and problem-solving mindset</li><li>Crucial for team fit and leadership roles</li></ul><h3>Typical Hiring Process</h3><p>Here’s a common frontend interview pipeline:</p><ol><li><strong>Initial Recruiter Call</strong></li><li><strong>Online Assessment</strong> (JS or DSA-based)</li><li><strong>Technical Screen (Phone/Live Coding)</strong></li><li><strong>Take-home Assignment or Onsite Loop</strong></li></ol><ul><li>UI coding round</li><li>JS logic round</li><li>System design</li><li>Behavioral discussion</li></ul><p>Always ask recruiters what the rounds include, and confirm if the role is frontend-specialized.</p><h3>Ready to DOMinate?</h3><p>Start with our curated paths:</p><ul><li>JavaScript Essentials</li><li>Component Design Patterns</li><li>System Design for Frontend</li><li>Mock Interview Scripts</li><li>Resume Reviews from Hiring Managers</li></ul><p>Let’s make frontend interviews less of a black box. Subscribe, study, and DOMinate with confidence.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79c3173d1e0c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/programming-diaries/frontend-dominators-cracking-frontend-interviews-in-2025-79c3173d1e0c">Frontend DOMinators: Cracking Frontend Interviews in 2025</a> was originally published in <a href="https://medium.com/programming-diaries">Frontend DOMinators 👑</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pr**to Interview Experience — Frontend Engineer Role - Round 0]]></title>
            <link>https://medium.com/programming-diaries/pr-to-interview-experience-frontend-engineer-role-round-0-a2121fc0349e?source=rss-f850c4a0cecf------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2121fc0349e</guid>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[asynchronous-programming]]></category>
            <category><![CDATA[javascript-interview]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Vinay Somawat]]></dc:creator>
            <pubDate>Sat, 26 Jul 2025 19:15:52 GMT</pubDate>
            <atom:updated>2025-07-26T19:17:35.391Z</atom:updated>
            <content:encoded><![CDATA[<h3>Pr**to Interview Experience — Frontend Engineer Role - Round 0</h3><p><strong>🗓 Date:</strong> July 21, 2025<br> <strong>📍 Mode:</strong> Online Coding Interview<br> <strong>⏱ Duration:</strong> ~30 minutes<br> <strong>👨‍💻 Interviewer:</strong> Senior Frontend Engineer at Practo</p><p>Q1: Promise.all vs Promise.allSettled ?</p><p>Q2: Implement a polyfill for Promise.all() and test it using a set of asynchronous promises.</p><p>Q3: Follow-up: Run the code below with your implementation.</p><pre>let promise1 = new Promise((resolve) =&gt; setTimeout(() =&gt; resolve(&quot;Resolved-1&quot;), 1000));<br>let promise2 = new Promise((resolve) =&gt; setTimeout(() =&gt; resolve(&quot;Resolved-2&quot;), 500));<br>let promise3 = new Promise((resolve) =&gt; resolve(&quot;Resolved-3&quot;));<br><br>const promises = [promise1, promise2, promise3];</pre><pre>function customPromiseAll(promises) {<br>  return new Promise((resolve, reject) =&gt; {<br>    const results = [];<br>    let completed = 0;<br><br>    promises.forEach((p, i) =&gt; {<br>      Promise.resolve(p).then(res =&gt; {<br>        results[i] = res;<br>        completed++;<br>        if (completed === promises.length) {<br>          resolve(results);<br>        }<br>      }).catch(reject);<br>    });<br>  });<br>}</pre><blockquote>Consider this: what would happen if we replaced completed with i in the implementation?</blockquote><p>Q4: Output for the below code.</p><pre>console.log(1);<br>const p = new Promise((resolve, reject) =&gt; {<br>  console.log(2);<br><br>  setTimeout(() =&gt; {<br>    console.log(3);<br>    resolve(6);<br>  }, 10);<br><br>  setTimeout(() =&gt; {<br>    console.log(4);<br>  }, 0);<br>});<br><br>setTimeout(() =&gt; {<br>  console.log(9);<br>});<br><br>p.then((res) =&gt; {<br>  console.log(res);<br>  return res + 1;<br>}).then((res) =&gt; {<br>  console.log(res);<br>});</pre><blockquote>This was an interesting piece of code — take a moment to think it through before running it in a compiler.</blockquote><p>Q5: Output for below</p><pre>console.log([] == []);<br>console.log([] === []);</pre><h3>✅ Tips for Future Candidates</h3><ul><li>Master JavaScript async behavior — especially the <strong>event loop</strong>, <strong>microtasks vs macrotasks</strong>, and <strong>Promise chaining</strong>.</li><li>Practice writing <strong>polyfills</strong> for features like Promise.all, bind, debounce, etc.</li><li>Speak out your logic while coding — communication is as important as correctness.</li><li>Don’t ignore fundamentals like <strong>reference equality</strong>, <strong>closure</strong>, and <strong>scope</strong> — these often appear in interviews.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2121fc0349e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/programming-diaries/pr-to-interview-experience-frontend-engineer-role-round-0-a2121fc0349e">Pr**to Interview Experience — Frontend Engineer Role - Round 0</a> was originally published in <a href="https://medium.com/programming-diaries">Frontend DOMinators 👑</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[D*****ital Interview Experience — Senior Frontend Engineer | Round 1]]></title>
            <link>https://medium.com/programming-diaries/d-ital-interview-experience-senior-frontend-engineer-round-1-8ccce12043d3?source=rss-f850c4a0cecf------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ccce12043d3</guid>
            <category><![CDATA[senior-frontend-developer]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[frontend-interviews]]></category>
            <dc:creator><![CDATA[Vinay Somawat]]></dc:creator>
            <pubDate>Fri, 25 Jul 2025 09:51:37 GMT</pubDate>
            <atom:updated>2025-07-25T10:14:01.605Z</atom:updated>
            <content:encoded><![CDATA[<h3>D*****ital Interview Experience — Senior Frontend Engineer | Round 1</h3><p><strong>Frontend Interview (Virtual)<br>Date: 25th July 2025</strong></p><blockquote>The interview moved very quickly — right after a brief introduction from both sides, the interviewer jumped straight into the technical questions without any warm-up or context setting.</blockquote><ul><li>Difference between long polling and server-sent events. Which one is better and in what scenario?</li><li>What is CORS and how does it work?</li><li><strong>How can CORS issues be resolved? Why doesn’t Postman face CORS errors while browsers do?</strong></li><li>What are the benefits of using the CORS mechanism?</li><li><strong>A button click triggers a process that takes 5 minutes to compute. How would you prevent blocking the UI for the user?</strong></li><li>Explain various techniques to implement microfrontends.</li><li>Implement loading of microfrontend on scrolling.</li><li>How do you manage compatibility between microfrontend apps using different versions?</li><li><strong>What if one microfrontend is upgraded — how do you ensure compatibility with the others?</strong></li><li>What are Webpack plugins and what configurations are typically required?</li><li>How would you handle race conditions that may occur during the loading of microfrontends?</li><li>Explain prototype inheritance in JavaScript.</li><li>Are classes the default behavior in JavaScript? How are they implemented?</li><li>What are common frontend design patterns you’ve used or are familiar with?</li><li><strong>How can you reduce the bundle size of a frontend application?</strong></li></ul><p><strong>Code Snapshot:</strong></p><pre>const arr = [1, 2, 3, 4, [1, 2, 3]];<br>const arr2 = [...arr];<br>arr[3] = 10;<br>arr[4][1] = 50;<br>console.log(arr);<br>console.log(arr2);</pre><ul><li>Follow-up — How would you create a deep copy of nested objects or arrays? Can you write a polyfill for it?</li><li>Share a real-life use case where closures are useful.</li><li>What features or behaviors in JavaScript are built on closure principles?</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ccce12043d3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/programming-diaries/d-ital-interview-experience-senior-frontend-engineer-round-1-8ccce12043d3">D*****ital Interview Experience — Senior Frontend Engineer | Round 1</a> was originally published in <a href="https://medium.com/programming-diaries">Frontend DOMinators 👑</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>