Part of the ODW ASSETTECH Legacy RWA / STO Reference Stack
This is the STO Web Client: a Next.js-based web application that exposes STO and RWA interactions to end-users. It handles wallet connection, role-aware views (admin / whitelisted / non-whitelisted), token issuance and redemption flows, and on-chain document and account management, integrating directly with the ERC-1400 contracts and the backend API.
Back in 2024, the ODW Team built a full Security Token Offering (STO) solution using the ERC‑1400 token standard on a private EVM chain running ConsenSys Quorum. Since then, the ecosystem has evolved: Quorum is no longer actively supported by ConsenSys (with Hyperledger Besu recommended as the successor), and STOs are now more commonly framed under the broader Real‑World Assets (RWA) narrative.
On the token side, ERC‑3643 (T‑REX) and ERC‑1155 have emerged as the most commonly used standards for regulated STO/RWA projects, with ERC‑3643 gaining prominence for its advanced, on‑chain compliance (DID, KYC/AML, transfer restrictions), and ERC‑1155 enabling efficient multi‑asset, multi‑class tokenization.
We are open‑sourcing this repository as a reference implementation to share architecture, design patterns, and integration approaches around ERC‑1400‑based STOs on permissioned EVM chains.
Important: This repository is not intended for production use. A production‑grade RWA/STO system today should:
- Migrate from Quorum → Hyperledger Besu (or another actively maintained EVM execution client), and
- Refactor token logic from ERC‑1400 → ERC‑3643 and/or ERC‑1155, with modern compliance and identity tooling.
This repository is part of the ODW ASSETTECH legacy RWA collection:
- ERC1400 Token Dashboard (Frontend Dashboard)
- STO Backend API (Express.js API with JWT, Wallet Auth)
- STO Web Client ← You are here (Next.js Web Interface)
- ERC1400 Smart Contracts (Solidity Implementation)
Each repository can be explored independently, but together they form a complete STO platform architecture.
This is the web client application for the Security Token Offering platform built with Next.js. It provides a comprehensive user interface for token issuance, redemption, transfer, document management, and account administration.
- Wallet Connection: Connect via Web3Modal (MetaMask, WalletConnect, etc.)
- Role-Based Access: Different views for Admin, Whitelisted, and Non-Whitelisted users
- Token Operations: Issue, redeem, and transfer tokens
- Document Management: Store and retrieve documents on-chain
- Account Management: Admin tools for whitelisting/removing accounts
- Responsive Design: Works on desktop and mobile devices
- Framework: Next.js 13.1.2
- Frontend: React 18
- Web3: Wagmi v0.11.2, Ethers.js v5.7.2
- Wallet Integration: Web3Modal v2.0.0
- Language: TypeScript
- Styling: CSS
sto-web-client/
├── src/
│ ├── components/ # React components
│ │ ├── documents/ # Document management components
│ │ ├── requests/ # User sign-in/sign-up components
│ │ └── token/ # Token operation components
│ ├── config/ # Configuration files
│ │ └── customChains.tsx # Custom blockchain configuration
│ ├── data/ # Contract ABIs and definitions
│ ├── interfaces/ # TypeScript interfaces
│ ├── lib/ # Utility libraries
│ │ ├── abi/ # Contract ABIs
│ │ ├── hooks/ # Custom React hooks
│ │ ├── utils/ # Utility functions
│ │ └── constants.ts # Application constants
│ ├── pages/ # Next.js pages
│ │ ├── admin/ # Admin pages
│ │ └── *.tsx # Route pages
│ └── styles.css # Global styles
├── public/ # Static assets
├── .eslintrc.js # ESLint configuration
├── .prettierrc.js # Prettier configuration
├── next.config.js # Next.js configuration
├── package.json # Dependencies and scripts
└── tsconfig.json # TypeScript configuration
-
Web3Provider Setup (
src/pages/_app.tsx)- Configures Wagmi client and Web3Modal
- Handles network switching
- Provides Web3 context to all pages
-
Custom Hooks (
src/lib/hooks/)useContractTransaction: Unified transaction handling- Provides consistent loading states and error handling
-
Utility Functions (
src/lib/utils/)errorHandler.ts: Centralized error logging and formattingvalidation.ts: Input validation utilities
-
Constants (
src/lib/constants.ts)- Contract addresses
- Default gas limits
- Environment variable validation
- Node.js: Version 14.0.9 or higher (16.x or 18.x recommended)
- Package Manager: Yarn or npm
- Blockchain: Access to a Quorum network or compatible Ethereum network
- Wallet: MetaMask or compatible Web3 wallet
-
Clone the repository
git clone https://github.com/OnDemandWorld/sto-web-client.git cd sto-web-client -
Install dependencies
yarn install # or npm install -
Set up environment variables
Copy
.env.exampleto.env.localand fill in the required values:cp .env.example .env.local
See Environment Variables for details.
-
Start the development server
yarn dev # or npm run dev -
Open your browser
Navigate to
http://localhost:3000(or the port shown in the terminal)
The application is configured in next.config.js:
- Transpilation: Web3Modal packages are transpiled for compatibility
- TypeScript: Build errors are ignored (should be fixed in production)
- ESLint: Build-time linting is disabled (should be enabled in production)
TypeScript is configured in tsconfig.json:
- Strict Mode: Currently disabled (should be enabled for production)
- JSX: Preserved for Next.js
- Module Resolution: Node.js style
Custom chain configuration is in src/config/customChains.tsx:
- Configured for Quorum networks
- Supports custom RPC URLs and chain IDs
- Environment-based configuration
Create a .env.local file in the root directory with the following variables:
# WalletConnect Project ID
# Get your project ID at https://cloud.walletconnect.com
NEXT_PUBLIC_PROJECT_ID=your_walletconnect_project_id
# Blockchain Configuration
NEXT_PUBLIC_CHAIN_ID=1337
NEXT_PUBLIC_RPC_URL=http://localhost:8545
NEXT_PUBLIC_BLOCK_EXPLORER=http://localhost:26000
NEXT_PUBLIC_QUORUM_CHAIN=Quorum Dev
# Contract Addresses
# These should be set after deploying your contracts
NEXT_PUBLIC_TOKENS_CONTRACT_ADDRESS=0x0000000000000000000000000000000000000000
NEXT_PUBLIC_TOKENS_VALIDATOR_CONTRACT_ADDRESS=0x0000000000000000000000000000000000000000| Variable | Description | Example |
|---|---|---|
NEXT_PUBLIC_PROJECT_ID |
WalletConnect Cloud project ID | abc123def456... |
NEXT_PUBLIC_CHAIN_ID |
Network chain ID | 1337 (local), 1 (mainnet) |
NEXT_PUBLIC_RPC_URL |
RPC endpoint URL | http://localhost:8545 |
NEXT_PUBLIC_BLOCK_EXPLORER |
Block explorer URL | http://localhost:26000 |
NEXT_PUBLIC_QUORUM_CHAIN |
Chain display name | Quorum Dev |
NEXT_PUBLIC_TOKENS_CONTRACT_ADDRESS |
ERC1400 token contract address | 0x... |
NEXT_PUBLIC_TOKENS_VALIDATOR_CONTRACT_ADDRESS |
Validator contract address | 0x... |
# Start development server
yarn dev
# or
npm run dev# Build for production
yarn build
# or
npm run build
# Start production server (runs on port 5000)
yarn start
# or
npm start# Run ESLint
yarn lint
# or
npm run lint
# Format code with Prettier
yarn format
# or
npm run format# Link contracts (if using symlinks)
yarn link-contracts-
Set environment variables in your deployment platform
-
Build the application:
yarn build
-
Start the production server:
yarn start
- Connect your repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push to main branch
Create a Dockerfile:
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN yarn install
COPY . .
RUN yarn build
EXPOSE 5000
CMD ["yarn", "start"]- Build the application:
yarn build - Copy the
.nextfolder andpackage.jsonto the server - Install production dependencies:
yarn install --production - Start with PM2 or similar:
yarn start
- Development: Use
.env.localfor local development - Staging: Set environment variables in your staging platform
- Production: Use secure environment variable management
Problem: Wallet not connected or network mismatch
Solution:
- Ensure MetaMask or another wallet is installed
- Check that you're on the correct network
- Verify
NEXT_PUBLIC_CHAIN_IDmatches your network
Problem: Invalid Ethereum address format
Solution:
- Ensure addresses start with
0xand are 42 characters long - Use checksummed addresses when possible
Problem: Transactions failing to execute
Solution:
- Check wallet has sufficient balance for gas
- Verify contract addresses are correct
- Ensure user has required permissions (admin, whitelisted, etc.)
- Check network connectivity
Problem: TypeScript or ESLint errors during build
Solution:
- Run
yarn lintto see specific errors - Fix TypeScript errors or temporarily disable strict mode
- Ensure all environment variables are set
Problem: App doesn't switch to required network
Solution:
- Ensure
NEXT_PUBLIC_CHAIN_IDis correct - Check RPC URL is accessible
- Verify network is added to wallet
Enable debug logging by setting:
NODE_ENV=development-
Fork the repository
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
-
Run linting and formatting
yarn lint yarn format
-
Test your changes
- Test in development mode
- Verify all functionality works
- Check for console errors
-
Commit your changes
git commit -m "feat: add your feature description" -
Push and create a Pull Request
- TypeScript: Use TypeScript for all new code
- Formatting: Use Prettier (configured in
.prettierrc.js) - Linting: Follow ESLint rules (configured in
.eslintrc.js) - Naming: Use camelCase for variables, PascalCase for components
- Comments: Add JSDoc comments for functions and components
Follow conventional commits:
feat:New featurefix:Bug fixdocs:Documentation changesstyle:Code style changesrefactor:Code refactoringtest:Test additions/changeschore:Maintenance tasks
MIT
If this repository is useful to you as a reference for STO/RWA design, please consider:
- Giving the project a ⭐ star on GitHub
- Watching the repo to follow updates
- Opening issues for questions, ideas, or problems you hit
- Submitting pull requests with improvements or fixes
Your feedback and contributions help us decide how much more to invest in evolving these open‑source building blocks.
ODW ASSETTECH specializes in:
- RWA / STO architecture & solution design
- Web development - User interfaces for blockchain applications
- Smart contract engineering (ERC‑3643, ERC‑1155, custom compliance modules)
- Migration of legacy ERC‑1400 / Quorum stacks to Hyperledger Besu and modern standards
- Backend & frontend integration (wallet flows, KYC/AML, dashboards, ops tooling)
- Regulated environments: focusing on compliance‑aware tokenization flows
If you are:
- A financial institution or issuer exploring tokenization,
- A startup building an RWA platform, or
- An engineering team looking to modernize an existing STO stack,
we'd be happy to discuss how we can help.
- Email: office@odw.ai
- Contact Page: https://ondemandworld.com/contact-us/
- GitHub Issues: Report bugs and request features
- GitHub Discussions: Ask questions and share ideas
- ERC1400 Token Dashboard – Next.js dashboard UI for managing ERC‑1400 tokens
- STO Backend API – TypeScript/Express backend for auth, users, and wallet integration
- STO Web Client – Next.js web client for end‑user STO workflows
- ERC1400 Smart Contracts – Solidity implementation of ERC‑1400 and related extensions
This repository is one component of a 4‑repo reference stack. For a fuller picture, explore the other repos in the ODW ASSETTECH organization.
Made by the ODW Team – sharing our 2024 STO stack as a reference for today's RWA builders.