Bitmax
June 2024 โ Present
Frontend Developer
Bitmax.ir, an Iranian cryptocurrency exchange
- Redux Saga to TanStack React Query migration. Independently designed and executed the migration of server-state management across more than 25 routes of a production Next.js application, covering trading, wallets, deposits and withdrawals, authentication, KYC, auto-investment and enterprise payments. Migrated one feature area at a time, each with a written plan and a reviewable commit, and removed Redux and Redux Saga entirely.
- Data-access conventions. Defined and documented the structure the migrated code follows: endpoint constants, stateless API calls, query-key factories, service hooks and pure helpers. TanStack Query owns server state, and each mutation invalidates only the keys it affects.
- Private cache scoping. Scoped private query data, such as wallet and history, by user and account in the query key, separate from public catalog data, so private caches can be cleared on logout or account switch without discarding public data. Fixed an account-switch cache race and added a regression test.
- Token refresh. Worked on the shared Axios session layer: concurrent 401 responses share one refresh request, retries are guarded against loops, and the session ends only when the refresh token is rejected, not on network or server errors. Covered by Vitest unit tests.
- Non-blocking login and account switching. Removed a wait on slow profile and account requests after login and fixed a stale-token bug in the profile refresh. Account switching now refreshes in the background, with a guard so a slow response cannot overwrite a newer switch, and loading states use a shared Skeleton component.
- Enterprise onboarding and payments. Built enterprise registration, signatory and group-payment flows: status polling while awaiting admin review, Excel payment upload and recap, draft recovery after idempotency conflicts, and OTP retry on a stale challenge.
- Shared UI system. Moved the app's pages and flows to a shared Button component and the legacy icon registry to SVGR icon exports, fixing SVG id collisions between icons. Redesigned the crypto withdraw flow, splitting its form logic into tested units.
- Plan-first, agent-assisted workflow. Used AI coding agents against written plans for large refactors such as the Saga migration, and reviewed the output before merging.




