A WebAssembly-powered financial transaction processing system with a layered architecture designed for secure, extensible asset management.
Finternet implements a three-tier "burger" architecture:
-
Process Layer: User interaction layer for executing workflows (WebAssembly modules). Users interact with assets through the Virtual Asset Layer (VAL), which provides access to driver layer functions.
-
Driver Layer: Intermediary between platform and process layers. Gives data meaning and handles user context with permissioned access. Drivers are dynamically loaded/unloaded at runtime.
-
Platform Layer: Base layer providing low-level component abstractions exposed to the driver runtime. Handles storage, networking, and runtime services.
- Dynamic WebAssembly module loading for drivers and user processes
- GRPC API with web interface support
- Redis-backed storage system
- Comprehensive permission and context management
- Support for custom asset types through driver system
For detailed UI documentation and setup instructions, see UI Documentation.
The Finternet system includes a modern web interface built with Next.js and Tailwind CSS, providing:
- WebAssembly Module Management: Interface for loading and managing token handlers
- Account Management: User onboarding and account binding workflows
- Transaction Execution: Visual interface for executing WebAssembly programs
- Real-time Status Updates: Live monitoring of transaction and system status
- Built on Next.js App Router architecture
- Responsive design using Tailwind CSS and shadcn/ui components
- Type-safe gRPC-web communication with the backend
- Dark/light theme support with consistent design system
- Component hierarchy:
- UI primitives (buttons, inputs, dialogs)
- Feature components (module loader, transaction forms)
- Layout components (navigation, dashboard)
- Connects to core services via gRPC:
- Driver Service: Token handler management
- Bind Service: User onboarding
- Execution Service: WebAssembly program execution
- Real-time updates using server-sent events
- Secure authentication and session management
- Rust toolchain
- Redis server
- Protocol Buffers compiler
- WebAssembly target support (
wasm32-unknown-unknown)
- Add WebAssembly target:
rustup target add wasm32-unknown-unknown- Build the project:
cargo build --releasecargo run --bin server -- config/development.tomlcd modules/driver
make build
./load-driver.sh./bind1.sh # Bind first account
./bind2.sh # Bind second accountcd modules/user-module
make build
./exec.sh-
src/: Core server implementationruntime/: Main runtime implementationservice/: GRPC service definitionstypes/: Core type definitions
-
modules/: WebAssembly modulesdriver/: Example driver implementationuser-module/: Example user workflow
-
proto/: Protocol buffer definitionsservice.proto: Main service definitionshealth_check.proto: Health check service
-
config/: Configuration filesdevelopment.toml: Development configuration
Configuration is handled through TOML files with the following sections:
server: HTTP server settingsruntime: Runtime name and versiondriver: Driver limits and timeoutsprocess: Process-related settingsplatform: Platform-specific settings
Drivers and user modules are built with:
RUSTFLAGS="-C target-feature=+multivalue" cargo build --target wasm32-unknown-unknown --release-
Implement the required driver interface functions:
intenddonetransferview
-
Compile to WebAssembly
-
Load using the Driver service API
Run the test suite with:
cargo test