Convex Components for Mini-Game Isolation (Recommended Usage?)
Hello! đź‘‹ I'm building multiple mini-games within a single Convex app (thinking 20+ games). Each game will have its own significant internal reactive state and logic.
My concern is that managing all this game-specific internal data within the main Convex app's schema and functions will become a "nightmare" of complexity and potential naming collisions.
I'm considering using Convex Components to completely isolate each mini-game:
Each mini-game = One Component.
The component would host the game's schema, internal functions, and data storage.
The main app would only interact with the component via a small, well-defined public API (e.g., StartGame, GetGameScore).
My Question:
Is using Convex Components primarily as an isolation and encapsulation tool—where 95% of the component's system is internal and only loosely accessed by the main application—considered a normal or recommended usage pattern?
I want to separate the mini-game internal complexity from the main app, and components seem like the perfect way to enforce this boundary. Just looking for validation on whether this is a common/good practice for large, distinct subsystems.
Note im aware that ill have kinda to rexport some of the functions from components to be accessed in main app but for me its a small price to pay how i see it
each mini game will have its own file.ts with all exports. it may add complexity in the future not sure.. thats why im asking what would you guys do?
1 Reply
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!