How namay10/driftprotocol-ui works
Project type and purpose
• From the file‐tree and README we see this is a Next.js (React + TypeScript) frontend application bootstrapped via create-next-app.
• It does not contain any in-repo “backend” or API routes, but instead integrates with external services (Drift protocol via driftclient/driftWalletWrapper, and a Web3 wallet provider).
File structure
• Top-level:
• package.json, tsconfig.json, next.config.ts, eslint.config.mjs – Next.js + TypeScript + linting/build config
• public/ – static assets
• src/app/ – new Next.js “app” directory hosting UI, layout, page.tsx
• Under src/app:
• components/ – presentational and container React components (DepositWithdraw.tsx, PerpOrderPanel.tsx, SubaccountSidebar.tsx, WalletConnectButton.tsx, etc.)
• lib/ – wrappers for business logic & SDK integrations (driftclient.ts, driftWalletWrapper.ts, perporder.ts)
• store/ – global state store using React Context or a state library (userdriftstore.ts)
• layout.tsx, globals.css – app shell + global styling
README for additional insights
• Confirms standard Next.js frontend, no mention of custom server or database.
• Deployment target is Vercel or any static-hosting plus serverless.