Hi, thanks for your interest in ACM's backend development team! Your task is to write a design doc for a "quest system" that integrates into the membership portal and then schedule an interview that'll be some mix of design review, technical, and behavioral.
First you'll need to understand how the portal works at the API and database layers—the portal doesn't currently have a service layer—and then design appropriate API and database changes for the required functionality. Your priority should be a working design, not a clever one; bonus points if you explain why yours is definitively the best or if you consider multiple designs and explain the tradeoffs of each. There's no right answer and this is an exercise intended to see how you approach some functionality you'd reasonably be expected to implement as a backend developer for ACM—there's no limit to how deep your changes to the portal can go. The portal's being completely rewritten so don't worry about any current constraints (e.g. what you can do with the models in the portal currently, duplicating logic that should be abstracted away in the service layer that the portal doesn't yet have) and don't worry about syntax.
Feel free to DM Sumeet (shmet#9694) on Discord with questions about the quest system. Your design doc should bear a passing resemblance to the sample and include
- any modified/added API routes, including permission level (
PUBLIC
,USER
,ADMIN
), HTTP method, and REST route. I used Express syntax where:uuid?
meansuuid
is an route parameter (denoted by the preceding colon) and the question mark means it's optional. - request/response types for all routes (see
CreateOrderRequest
for an example). I used a TypeScript-ish syntax. - basic database models (including column names, data types, additional modifiers e.g. default values or nullable).
- any database indexes for optimization and justifications for each.
- any further database migrations.
- any other relevant implementation details (e.g. using in-memory data structures or any database logic more complex than a simple
SELECT
). - some feedback on this exercise! I promise anything you say here won't be factored into our decision. Some guiding questions (but any comments are appreciated): How long did it take you (understanding the portal, writing the design doc)? What did you struggle with? Was this unreasonably hard? Do you think this is a fair assessment of your backend abilities?
- a quest is a set of events
- if a user attends all the events in a quest, they automatically complete the quest (e.g. all Hack School events in a quarter)
- if a user completes a quest, they are awarded some bonus points and a badge
- badges can be awarded for things besides quests (don't worry about creating API routes for badges, just add them to the database for the quest system)