Skip to content

dev ideas for Dimo #275

@mooncitydev

Description

@mooncitydev

gm this is mooncity, kinda verified & cracked web2,3 engineer
i got some of strong dev ideas that could add real value to the roadmap
if it aligns with what you're building, I’d be excited to contribute and potentially join the team
let me share what i have in mind
right now you're using multiple react contexts (authcontext, devcredentialscontext, uimanagercontext, oraclescontext) and switching views with a uistate enum instead of proper routing
this works fine for the initial 2-3 views but as you scale to more flows - vehicle onboarding, advanced transactions, oracle management
it's gonna get messy fast. the prop drilling problem you're solving with componentdata in uimanagercontext is a band-aid
would help to migrate to zustand or jotai for global state (lighter than redux, plays nice with react 18) and add react-router even if just for cleaner url-based navigation. makes deep linking work properly too - right now if someone shares a link to a specific flow state it just dumps them at the entry point. also the way you're receiving data via postmessage vs query params and handling backToThirdParty closure/redirects could be abstracted into a single hook instead of scattered across devcredentialscontext
looking at the troubleshooting docs, there's a ton of common issues devs hit - err_unsupported_dir_import for nodejs users, 500 errors from stale cookies, github oauth redirects failing, old vs new console license confusion. these should be caught and handled gracefully in the app itself with actionable error messages instead of requiring docs lookup. would be huge to add proper error boundaries with recovery actions, maybe a dev mode toggle that shows detailed logs and lets you mock different sdk entry states without needing the actual sdk. the url param testing you mentioned in the readme is hacky - build a proper dev sandbox page that lets you configure entrystate, permissions, clientid etc through a form and see the resulting ui. also add e2e tests with playwright covering the main flows (popup auth, redirect auth, vehicle sharing) since you're dealing with postmessage and window interactions that are brittle

hope to hear your feedback about my ideas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions