How geen-19/nautilus-interface works
Project type and purpose
• This is a Single-Page Application (SPA) front-end built with React and TypeScript, bundled by Vite.
• It serves as the user interface for the Nautilus NFT Marketplace on the Voi Network, letting users browse collections, list/buy NFTs, stake tokens, interact with smart contracts, and manage their wallet.
File structure
• Top level:
• src/ → all application code
• components/ → small, reusable UI pieces and modals
• pages/ → page-level components mapped by the router
• clients/ → network layer classes (e.g. VNSRegistrarClient) handling JSON-RPC calls to the Voi blockchain
• hooks/ → custom React hooks encapsulating data-fetching & business logic
• store/ → Redux Toolkit slices & Context providers for global state (marketplace, cart, user, theme, etc.)
• config/ + constants/ → API endpoints, contract addresses, feature flags
• utils/ + lib/ → shared helper functions
• router/ → React Router setup
• theme/ + style.css + tailwind.config.js → styling configuration
• index.tsx & App.tsx → React entry point and root component
README
• Confirms this is the open-source front-end for Nautilus NFT Marketplace on Voi Network.
• No back-end code here—interactions go directly from the client to smart contracts.
• Browser/Client – hosts the SPA
• UI Layer – React Pages & Components
• State Management – Redux slices & Context providers
• Network Layer – client classes (AirdropClient, VNSRegistryClient, etc.) + custom hooks
• Wallet Provider – Metamask/WalletConnect injected web3 provider
• Voi Network – Voi RPC nodes & smart contracts
• Static Asset Host or CDN – serves public/ and built static files
• Build/Deployment – Vite → bundler, Tailwind/PostCSS → styles
b. Relationships and data flows:
1. User interacts with UI → dispatches actions to State
2. UI/Hooks read from State to render data
3. UI/Hooks call Network Layer (Clients) for on-chain queries or transactions
4. Clients send JSON-RPC over HTTP/WebSocket to Voi RPC node
5. RPC node executes smart contract call & returns data/tx receipts
6. Responses pass back to State → UI re-renders
7. UI fetches NFT metadata/images from public/ or IPFS/CDN URLs
8. Wallet Provider signs transactions initiated by Clients
c. Architectural patterns & principles:
• Layered Architecture – UI → State → Network → Blockchain
• Flux pattern – unidirectional data flow (React + Redux)
• Directory-per-feature & atomic component organization
d. Key technologies and libraries:
• React + TypeScript + JSX/TSX
• Redux Toolkit (store/slices)
• React Router
• Vite + PostCSS + Tailwind CSS
• JSON-RPC clients for Voi smart contracts
• Custom React Hooks