AGENT CALL · Mokabla · get_question
request ag_6fc8f3c76b09

Decision

Allowed   R6 · Within policy

input
{"company":"elmenus","question":"drone-dispatch-api-task"}

Result

{
  "slug": "drone-dispatch-api-task",
  "title": "Drone Dispatch API Task",
  "difficulty": "medium",
  "tags": [
    "system-design",
    "sql",
    "backend",
    "take-home"
  ],
  "is_free": true,
  "locked": false,
  "frequency": 1,
  "last_reported_at": "2024-04-27T20:37:48.462698Z",
  "url": "https://www.mokabla.com/en/c/elmenus/drone-dispatch-api-task",
  "agent": {
    "page": "https://www.mokabla.com/agent/en/c/elmenus/drone-dispatch-api-task",
    "question": "https://www.mokabla.com/agent/_call/get_question?company=elmenus&question=drone-dispatch-api-task"
  },
  "company": {
    "slug": "elmenus",
    "name_en": "Elmenus"
  },
  "body_md": "## What they ask\nThe backend take-home that candidates received from late 2023 into 2024 is a dispatch controller for a fleet of delivery drones that carry medications. The brief:\n\nA **drone** has a serial number (up to 100 characters), a model (Lightweight, Middleweight, Cruiserweight, Heavyweight), a weight limit (500 g max), a battery percentage and a state (IDLE, LOADING, LOADED, DELIVERING, DELIVERED, RETURNING). A **medication** has a name (letters, numbers, hyphen and underscore only), a weight, a code (upper case letters, numbers and underscore only) and an image.\n\nBuild a REST service that lets a client:\n- register a drone;\n- load a drone with medication items;\n- check the items loaded on a given drone;\n- list the drones available for loading;\n- check a drone's battery level.\n\nRules: never load a drone beyond its weight limit; a drone with battery under 25 percent cannot enter LOADING; a periodic task checks every drone's battery and writes an audit log of the readings. JSON in and out, no UI, a fleet of 10 drones preloaded, a database that runs locally (in-memory or a container), and a README with build, run and test steps. Unit tests are optional but advised, and the brief says plainly that they will read your commit history.\n\nMost candidates used Java 17 with Spring Boot and MySQL or H2; one used Node with TypeScript. Swagger or a Postman collection is common.\n\nWhere it sits in the loop, per a backend candidate from the same period: an HR call, a one-hour technical interview, then this task with a week to deliver, then a final interview, then the offer, about two weeks end to end.\n\n## What they look for\n- Validation that matches the spec exactly (the regexes on name and code, the 500 g cap, the 25 percent rule) with clear 4xx responses when it fails.\n- A state machine enforced in the service layer, not in the controller.\n- The periodic battery check done with the framework scheduler and an audit table, not a log line.\n- Loading as one transaction: either all items fit and the state moves, or nothing changes.\n- Small, well-named commits that show how you worked, since they ask for it.",
  "follow_ups_md": "- Two clients try to load the same drone at the same moment. Where is the race, and how do you close it?\n- Expose the audit log so an operator can see battery history per drone. Design the endpoint.",
  "access": "Question bodies are paid content: a person buys 30 days of access per company (200 EGP or 200 points) in the human app. Agents get titles, tags and difficulty; bodies only for free questions."
}

Navigate (pre-filled links you can follow)