OASIS Web UI Dev Kit - Complete Implementation Guide

🎯 Overview

The OASIS Web UI Dev Kit provides 20+ pre-built components for all major web frameworks, allowing you to integrate OASIS functionality into your applications with minimal effort.

πŸ“¦ Available Kits

Framework
Status
Package
Documentation

React

βœ… Complete

@oasis/webui-devkit-react

Angular

βœ… Complete

@oasis/webui-devkit-angular

Vue 3

πŸ”„ Templates

@oasis/webui-devkit-vue

Vanilla JS

πŸ”„ Templates

@oasis/webui-devkit-vanilla

Svelte

πŸ”„ Templates

@oasis/webui-devkit-svelte

Next.js

πŸ”„ Templates

@oasis/webui-devkit-nextjs

πŸš€ Quick Start by Framework

React

npm install @oasis/webui-devkit-react
import { AvatarSSO, KarmaManagement, NFTGallery } from '@oasis/webui-devkit-react';

function App() {
  const [avatarId, setAvatarId] = useState('');
  
  return (
    <OASISProvider config={{ apiEndpoint: 'https://api.oasis.network' }}>
      <AvatarSSO onSuccess={(avatar) => setAvatarId(avatar.id)} />
      <KarmaManagement avatarId={avatarId} />
      <NFTGallery avatarId={avatarId} columns={3} />
    </OASISProvider>
  );
}

Angular

Vue 3

Vanilla JS (Web Components)

Svelte

Next.js

πŸ“‹ Component Catalog

Authentication & User Management

  • AvatarSSO - Multi-provider authentication (Holochain, Ethereum, Solana, etc.)

  • AvatarDetail - Display and edit avatar profile information

  • AvatarCard - Compact avatar display card

Karma & Gamification

  • KarmaManagement - Display and manage karma points with history

  • KarmaLeaderboard - Show top karma earners with rankings

  • AchievementsBadges - Display user achievements and progress

NFT & Digital Assets

  • NFTGallery - Display NFT collections with filtering and sorting

  • NFTManagement - Mint, transfer, and manage NFTs

  • GeoNFTMap - Interactive map for location-based NFTs

  • GeoNFTManagement - Create and manage Geo-NFTs

Communication

  • Messaging - Real-time messaging component

  • ChatWidget - Embeddable chat widget (floating or inline)

  • Notifications - Toast and notification system

Data & Storage

  • DataManagement - CRUD operations for OASIS data

  • ProviderManagement - Switch between storage providers

  • OASISSettings - Configure OASIS settings

Social & Community

  • SocialFeed - Activity feed component

  • FriendsList - Display and manage connections

  • GroupManagement - Create and manage groups

🎨 Theming & Customization

Global Theme Configuration

Component-Level Customization

πŸ”Œ API Integration

Client-Side API

Server-Side API (Next.js)

πŸ› οΈ Building Custom Components

Following the Pattern

Each component follows a consistent pattern:

  1. Props/Attributes - Accept configuration

  2. State Management - Handle loading, data, errors

  3. API Integration - Fetch/update data from OASIS

  4. Events/Callbacks - Emit events for parent components

  5. Theming - Support light/dark modes

  6. Styling - Scoped/modular styles

Example: Custom Component

πŸ“š Resources

  • Full Documentation: https://docs.oasis.network/webui-devkit

  • API Reference: https://docs.oasis.network/api

  • Component Demos: https://demos.oasis.network/webui-devkit

  • GitHub Repository: https://github.com/oasis-network/webui-devkit

  • Discord Support: https://discord.gg/oasis-network

πŸ› Troubleshooting

Common Issues

Components not rendering?

  • Ensure OASISProvider wraps your app

  • Check API endpoint configuration

  • Verify network connectivity

Styling issues?

  • Import CSS: import '@oasis/webui-devkit-react/dist/style.css'

  • Check theme prop values

  • Inspect CSS variable overrides

TypeScript errors?

  • Install type definitions: @types/...

  • Update tsconfig.json include paths

  • Check peer dependency versions

Debug Mode

🀝 Contributing

Want to add more components or improve existing ones?

  1. Fork the repository

  2. Create a feature branch

  3. Follow the component pattern guide

  4. Add tests and documentation

  5. Submit a pull request

πŸ“„ License

MIT License - Use freely in your projects!

Last updated