Create User Handler.prompt
# Artifact Prompt: create_user_handler
Implement the `create_user_handler` artifact.
## Role
http_handler
## Module
user
## Responsibilities
- Translate HTTP input into application input
- Call the create_user usecase
- Translate application output into HTTP response data
## Must not
- Contain direct persistence logic
- Embed business rules that belong in domain or usecase
- Write SQL directly
## Allowed dependencies
- crates/application
- crates/adapters/http
## Forbidden dependencies
- crates/adapters/db
## Inputs
- CreateUserHttpRequest
## Outputs
- CreateUserHttpResponse
## Completion criteria
- The handler cleanly translates transport models into application requests.
- It invokes the application layer but embeds zero core business rules locally.when to use it
Community prompt sourced from the open-source GitHub repo Arcflect/batonel (Apache-2.0). A "Create User Handler.prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
codingcommunitydeveloper
source
Arcflect/batonel · Apache-2.0
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions