How node-real/dcellar works
Project type and purpose
• From the file tree and README, this is a monorepo built with Rush that contains a single Next.js-based full-stack web application (“dcellar-web-ui”).
• Purpose: a developer console UI for managing BNB Greenfield decentralized storage—handling buckets, objects, billing, sharing, and token transfers via WalletConnect/MetaMask/Trust Wallet.
File structure
• Top-level:
• rush.json, common/, common/config, common/autoinstallers → Rush monorepo configuration
• apps/dcellar-web-ui → the Next.js application
• Within apps/dcellar-web-ui:
• public/ + wasm/ + Dockerfile → static assets & containerization
• src/pages → Next.js pages + serverless API routes
• src/components, src/modules → React UI and feature modules (accounts, buckets, objects, wallet, etc.)
• src/facade → domain-level API facades over BNB Greenfield SDK
• src/context, src/hooks, src/store → React context, custom hooks, Redux slices for state management
• pages/api → backend/edge endpoints that proxy or augment calls to Greenfield RPC, billing, charts
• Build & CI: .github/workflows deploys to QA, Mainnet/Testnet, triggers Docker builds, linting & tests.
Architecture synopsis from README
• Technologies: Next.js (SSR/SSG), React, TypeScript, Redux, BNB Greenfield JS SDK, WalletConnect, WASM modules, Sentry, Rush monorepo.
• Core flows:
• Client-side rendering + server-side prefetching (Next.js pages)
• Serverless API routes under /api
• Direct RPC calls to BNB Greenfield and BNB Chain for data & token operations
• Off-chain authentication context for secure user identity
• Fed by React context + Redux for global state.