This guide is the onboarding reference for contributors, with focused notes for the SignUp flow and shared contributor workflow.
Recorded decisions for stack selection:
- API gateway / HTTP boundary —
docs/adr/001-api-gateway-stack.md(Issue #201) - App routing (React Router, guards, basename) —
docs/adr/002-app-routing-stack.md(Issue #202)
# 1. Clone
git clone https://github.com/FolushoJoseph/Tradazone.git
cd Tradazone
# 2. Install dependencies
npm install
# 3. Run locally
npm run devOptional validation before opening a PR:
npm run lint
npm run buildWe use GitHub Actions to ensure code quality and automate our deployment process.
Every pull request and push to the main branch triggers our CI pipeline, which performs the following steps:
- Environment Setup: Sets up the Node.js environment (v20).
- Dependency Installation: Runs
npm cifor a clean, reproducible installation. - Linting: Runs
npm run lintto enforce code style and catch potential errors. This step must pass for the build to proceed. - Building: Runs
npm run buildto verify the project builds correctly. - Deployment: If the push is to the
mainbranch, the project is automatically deployed to GitHub Pages.
Before submitting a pull request, please ensure your changes pass the same checks locally:
# Run linting
npm run lint
# Verify build
npm run buildPrimary file: src/components/ui/ConnectWalletModal.jsx
This modal is the shared UI for connecting Stellar, Starknet, EVM, and Solana-related wallets. Changes here affect Sign-in, Sign-up, Payments, and mail checkout flows.
Dependencies to know before editing
useAuth()fromsrc/context/AuthContext.jsx— exposescompleteWalletLogin,installed(includes EIP-6963discoveredproviders),availableWallets, and related session APIs the modal lists and connects through.useLobstr()fromsrc/hooks/useLobstr.js— LOBSTR (Stellar) connect flow used inside the modal.- EIP-6963 discovery lives in
src/utils/wallet-discovery.jsand is wired throughAuthContext(not imported directly in the modal). - Optional props:
isOpen,onClose,onConnect(success callback),connectWalletFn(defaults touseAuth().connectWalletwhen passed from pages; tests may inject a stub).
Conventions
- Keep provider-specific logic inside the modal or small hooks; pages should only pass callbacks and open/close state.
- New wallet types: extend connection in
AuthContext/ discovery helpers as needed, surface a clear error state in the modal, and avoid logging secrets or full addresses in production builds. - For EVM, prefer EIP-6963 provider selection (
installed.discovered/rdns) over assuming a singlewindow.ethereum.
Manual test checklist
- Open/close from Sign-in and Sign-up without console errors.
- Connect with at least one installed wallet path (e.g. LOBSTR or an injected EVM wallet) and confirm
onConnectruns and navigation/session match the host page’s expectations. - Payment settings and mail checkout: modal still receives the correct
connectWalletFnwhen the page overrides it.
Primary file: src/pages/auth/SignUp.jsx
Related dependencies:
useAuth()fromsrc/context/AuthContext.jsxfor auth state and wallet connectionConnectWalletModalfromsrc/components/ui/ConnectWalletModal- Route handling via
useNavigateanduseSearchParams
Current flow summary:
- If
user.isAuthenticatedis true, user is redirected immediately. - Clicking "Connect Wallet" opens the modal.
- On successful wallet connect,
tradazone_onboardedis set tofalse. - User is redirected to the computed
redirectpath (or/).
When modifying SignUp:
- Keep redirect behavior backward compatible with query param
redirect. - Preserve
tradazone_onboardedinitialization unless onboarding flow is intentionally redesigned. - Avoid coupling modal internals into page logic; keep the page orchestrating state and navigation only.
- Ensure the layout remains usable on small screens (left panel is scrollable by design).
Manual test checklist for SignUp:
- Visiting
/signupwhile authenticated redirects correctly. - Visiting
/signup?redirect=/settings/profileredirects to the expected route after connect. - Modal opens, closes, and triggers success callback without console errors.
localStorage.getItem("tradazone_onboarded")is"false"right after successful connect.
- Fork this repository.
- Create a feature branch:
git checkout -b feature/your-feature-name
- Commit your changes with a clear message:
git commit -m "feat: add your feature description" - Push to your branch:
git push origin feature/your-feature-name
- Open a Pull Request — describe what you changed and why.
We follow a simple convention for commit messages to keep our history clean and readable:
| Prefix | When to use |
|---|---|
feat: |
A new feature |
fix: |
A bug fix |
style: |
UI/CSS changes with no logic change |
refactor: |
Code restructuring without behavior change |
docs: |
Documentation updates |
chore: |
Dependency updates, build configs |
Found a bug or have a suggestion? Open an issue and include:
- A clear description of the problem.
- Steps to reproduce.
- Expected vs actual behavior.
- Screenshots if applicable.
- Keep components focused and single-purpose.
- Co-locate styles with components where possible.
- Follow existing naming conventions (
PascalCasefor components,camelCasefor hooks/utils). - Avoid hardcoded values — use the data/context layer.