Back to Prompts
Coding Assistant

Design Module Interfaces

For designing clean module boundaries From the Modular Architecture AI Coding Building Block.

Prompt
Design clean interfaces between my modules. I want to minimize coupling so each module can evolve independently.

My modules: [list your modules, e.g., auth, billing, notifications, users]

For each module boundary:
1. Define the contract (function signatures, types, what's promised)
2. Use dependency injection where appropriate
3. Create interfaces/protocols rather than concrete implementations
4. Document what can and cannot cross module boundaries
5. Suggest a pattern for inter-module communication (events, direct calls, message queue)

Goal: If I ask AI to "change how billing works," it should only need to understand the billing module, not touch auth, users, or notifications.

My stack: [your language/framework]

I'm learning, so explain each part simply.
2 views 1 copies