Take-home: build a full-fledged wallet system with CRUD for wallet and transactions, transfer logic with validations (sufficient balance, atomicity), and role-based access for admins and users (Node.js, Express, MongoDB, Redis optional).
Asked in the Round 2: Take-home assignment stage. Followed by a walkthrough round. Reported follow-ups: How did you handle transaction consistency and failure rollback?; REST API structure, security, and middleware handling.
For grading, implement process_wallet_operations(operations). Each operation is a dictionary containing an actor, role, action, and action-specific fields. Return one result per operation. Support wallet CRUD, transaction creation and deletion, balance validation, atomic transfers, and admin/user authorization. Do not mutate state when an operation fails.
def process_wallet_operations(operations):