📝 [DOCS] Document the StarknetProvider.tsx configuration file for Starknet React integration#153
Merged
jimenezz22 merged 3 commits intoAkatsukiLabs:mainfrom Jul 1, 2025
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR delivers a full guide for the StarknetProvider.tsx configuration in Dojo on-chain games, detailing imports, environment setup, code examples, and best practices.
- Added comprehensive documentation covering file purpose, React context setup, and gaming-centric wallet integration
- Introduced code snippets for environment-based RPC/provider configuration, multi-chain support, and debugging
- Expanded production considerations with security, performance, and monitoring recommendations
Comments suppressed due to low confidence (3)
client/pages/integrations/react/starknet-provider.md:220
- Clarify that in Vite projects
NODE_ENVisn’t exposed viaprocess.env; suggest usingimport.meta.env.MODEor ensuring compatibility with your bundler’s environment variable handling.
: getRpcUrl()
client/pages/integrations/react/starknet-provider.md:509
- This snippet references
analytics.trackwithout an import or context. Consider adding a note or code sample showing how to import/configure your analytics library.
analytics.track('rpc_connection', { network: VITE_PUBLIC_DEPLOY_TYPE });
client/pages/integrations/react/starknet-provider.md:530
- [nitpick] The link text 'Controller Connector' may conflict with earlier references to 'Cartridge Connector' or 'Cartridge Controller'. For consistency, align naming across the document and link.
*Ready to integrate wallet connections? Check out [Controller Connector](/integrations/react/controller-connector) to set up gaming-optimized wallet functionality.*
jimenezz22
requested changes
Jun 30, 2025
Contributor
There was a problem hiding this comment.
Really good job with the grammar, tone and laguage you are using to express the ideas. Just let's include this approach to go straight to the point.
providerSuggestion.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Overview
📝 Summary
This PR includes the full description of a
starknet-provider.tsxstructure file to guide developers with the correct integration with their Dojo on-chain games.Related Issues
Type of Change
Mark with an
xall the checkboxes that apply (like[x]).🔄 Changes Made
What's Changed
Created comprehensive documentation for the
StarknetProvider.tsxconfiguration file to address issue #146. This documentation provides a complete guide for setting up Starknet React integration in Dojo games, covering environment-based network switching, RPC provider configuration, and gaming-optimized wallet connections.Implementation Details
VITE_PUBLIC_DEPLOY_TYPEusage for mainnet/sepolia switchingThe documentation follows the established DojoByExample format and serves as the definitive guide for Starknet provider configuration in gaming applications.