Mobile and web front end for AptoTrade, a derivatives exchange on the Aptos blockchain. One Expo codebase runs on Android, iOS and the browser.
Most DEX front ends are web only and feel nothing like the exchange apps people already use. AptoTrade wants a CEX-style experience (spot, futures, wallet) on a decentralized backend. This repo is the client half of that: a tabbed trading UI built with Expo Router and Tailwind classes (NativeWind), so one TypeScript codebase ships to phone and browser. The Move contracts live in the sibling repo linked above.
Current state: the screens are a working UI prototype. All prices, order book rows and balances are hardcoded in the screen files. Nothing talks to Aptos yet (see Limitations).
Bundled app assets (wired in app.json):
| File | Used as |
|---|---|
assets/icon.png |
App icon |
assets/adaptive-icon.png |
Android adaptive icon foreground |
assets/splash.png |
Splash screen (resizeMode: contain, white background) |
assets/favicon.png |
Web favicon |
Needs Node.js with npm (the project was scaffolded with npm 10.8.2, see cesconfig.json). For a phone, install Expo Go, or have an Android emulator / iOS simulator running.
git clone https://github.com/DeepakSilaych/aptrade_mobile.git
cd aptrade_mobile
npm installRun on one target (each is a script in package.json):
npm run web # expo start --web
npm run android # expo start --android
npm run ios # expo start --iosOr start the dev server once and pick a target from the Expo menu:
npm start # expo startVerify: the app opens on a dark tab bar with five tabs (Home, Markets, Trades, Futures, Wallet). Tap Trades, change the amount, and the USDT total updates.
package.json "main": expo-router/entry
|
v
app/_layout.tsx root <Stack>: "(tabs)" + "modal"
|
v
app/(tabs)/_layout.tsx <Tabs>, Ionicons, dark theme (#1E293B, gold active)
| | | | |
index market trade futures wallet
Home Markets Trades Futures Wallet
(stub) (stub) buy/sell long/short balances +
form + form + favorites +
order book chart stub refresh
| | |
v v v
hardcoded arrays inside each screen file
(no network calls, no chain calls)
Styling: global.css -> metro.config.js (withNativeWind) -> babel nativewind preset
-> Tailwind classes on React Native components via className
- Expo Router maps files under
app/to routes.app/_layout.tsxis a native stack with the tab group and amodalroute. app/(tabs)/_layout.tsxdeclares the five tabs and their icons.app/(tabs)/trade.tsxis the spot screen: a Buy/Sell toggle animated with Reanimated, price and amount inputs, a computed USDT total, a static bid/ask list, and areact-native-modalizebottom sheet to switch between BTC, ETH, SOL and BNB. Pressing Buy/Sell only writes toconsole.log.app/(tabs)/futures.tsxmirrors that with a Long/Short toggle and a Show Chart button that reveals a grey placeholder box. Its order book is commented out.app/(tabs)/wallet.tsxlists six tokens with logos from cryptologos.cc, an All/Favorites filter, and a refresh button that fills balances with random numbers.app/+html.tsxis the web-only HTML shell (viewport scaling disabled, body scroll reset, dark-mode background).components/holds small shared pieces (Button,Container,HeaderButton,TabBarIcon,ScreenContent) from the create-expo-stack template.
There is no on-chain code in this repo yet. @web3auth/react-native-sdk is listed in package.json but is not imported anywhere, and no Aptos SDK is a dependency. Contract interfaces, order matching and settlement are defined in DeepakSilaych/AptoTrade (Move). This client will need an Aptos client and a wallet/auth layer wired into the Trade, Futures and Wallet screens to go live.
| Screen | What works today | Source |
|---|---|---|
| Trades | Buy/Sell toggle, price and amount inputs, live USDT total, token picker sheet, static order book | app/(tabs)/trade.tsx |
| Futures | Long/Short toggle, same inputs and total, chart placeholder toggle | app/(tabs)/futures.tsx |
| Wallet | Token list with logos, favorite star per token, All/Favorites filter, mock refresh | app/(tabs)/wallet.tsx |
| Home, Markets | Template placeholder text only | app/(tabs)/index.tsx, market.tsx |
| Not found | Fallback route with a link home | app/+not-found.tsx |
No environment variables. Behaviour is set in app.json and tsconfig.json:
| Key | Value | Purpose |
|---|---|---|
expo.scheme |
aptrade |
Deep link scheme (aptrade://) |
expo.web.output |
static |
Web export is static HTML per route |
expo.experiments.typedRoutes |
true |
Type-checked href values for Expo Router |
expo.experiments.tsconfigPaths |
true |
Enables the ~/* import alias from tsconfig.json |
expo.userInterfaceStyle |
light |
Native UI style; screens still paint their own dark backgrounds |
expo.orientation |
portrait |
Locks orientation |
- File-based routing over a hand-written navigator. Expo Router with typed routes means adding a tab is one file plus one
Tabs.Screenentry. - Tailwind classes (NativeWind v4) over
StyleSheet. Screens style withclassName; the Babel preset setsjsxImportSource: "nativewind". A few template files still useStyleSheet, so both styles coexist. - Mock data inline in screens. Fast for prototyping the UI, but every screen owns its own copy of the token list. Move this to a shared module when the chain client lands.
- Three icon libraries. Tabs use
react-native-vector-icons/Ionicons, shared components use@expo/vector-icons, and the Wallet screen usesreact-icons/fa, which renders SVG for the DOM and is not a React Native component. Expect the Wallet icons to work on web only until they are swapped. - Two lockfiles are committed (
package-lock.json,pnpm-lock.yaml). The scaffold config says npm; use npm to match the README. react-native-safe-area-contextis pinned at 4.10.1 and excluded fromexpo installversion checks inpackage.json.
app/ Expo Router routes
_layout.tsx root stack
(tabs)/ five tab screens + tab bar layout
+html.tsx web HTML shell
+not-found.tsx 404 route
modal.tsx registered modal route (currently empty)
components/ shared UI pieces
assets/ icon, adaptive icon, splash, favicon
app.json Expo app config
babel.config.js Expo + NativeWind presets
metro.config.js Metro with NativeWind and global.css
tailwind.config.js Tailwind content paths + NativeWind preset
cesconfig.json create-expo-stack scaffold record
npm run lint # eslint (universe/native) + prettier --check
npm run format # eslint --fix + prettier --write
npm run prebuild # expo prebuild: generates ios/ and android/ (gitignored)There are no tests and no CI workflow yet.
- No Aptos or wallet integration; trade and futures actions only log to the console.
- Home and Markets tabs still show the create-expo-stack placeholder.
app/modal.tsxis registered in the root stack but the file is empty.- The Futures chart is a placeholder
View; there is no charting dependency. - Wallet icons come from
react-icons, which does not render on native.
Open an issue or PR on GitHub. Run npm run lint before pushing.
No license file yet.