Skip to content

Jayesh-Kr/Vrypto-ICP-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

VR Marketplace on Internet Computer

A decentralized VR asset marketplace built on the Internet Computer blockchain, featuring React frontend and Rust backend canisters.

๐Ÿš€ Features

  • Decentralized Asset Trading: Buy and sell VR assets with smart contracts
  • Immersive VR Viewing: WebXR-powered 3D asset preview using A-Frame
  • Blockchain Authentication: Internet Identity and Plug Wallet integration
  • Asset Management: Upload, manage, and showcase your VR creations
  • Smart Contract Logic: All transactions handled by Rust canisters on ICP

๐Ÿ—๏ธ Architecture

Frontend (React + TailwindCSS)

  • Authentication: Internet Identity & Plug Wallet support
  • VR Viewer: A-Frame integration for immersive 3D experiences
  • Responsive Design: Mobile-first approach with TailwindCSS
  • State Management: React Context for authentication and data

Backend (Rust Canisters)

  • Auth Canister: User registration and identity management
  • Asset Canister: Asset storage, metadata, and ownership tracking
  • Marketplace Canister: Listing management, transactions, and marketplace logic

๐Ÿ“‹ Prerequisites

๐Ÿ› ๏ธ Installation & Setup

1. Clone the Repository

git clone <repository-url>
cd vr-marketplace

2. Install Frontend Dependencies

cd frontend
npm install
cd ..

3. Start DFX

# Start the local Internet Computer replica
dfx start --background

4. Deploy Canisters

# Deploy all canisters to local network
dfx deploy

5. Update Frontend Configuration

After deployment, update the canister IDs in the frontend:

  1. Copy the canister IDs from the deployment output
  2. Create a .env file in the frontend directory:
REACT_APP_AUTH_CANISTER_ID=your_auth_canister_id
REACT_APP_ASSET_CANISTER_ID=your_asset_canister_id
REACT_APP_MARKETPLACE_CANISTER_ID=your_marketplace_canister_id
REACT_APP_INTERNET_IDENTITY_CANISTER_ID=rdmx6-jaaaa-aaaah-qdrpq-cai

6. Start Frontend Development Server

cd frontend
npm start

The application will be available at http://localhost:3000

๐Ÿ”ง Development Commands

Backend Development

# Build all canisters
dfx build

# Deploy specific canister
dfx deploy auth_canister
dfx deploy asset_canister
dfx deploy marketplace_canister

# Check canister status
dfx canister status --all

# View canister logs
dfx canister logs auth_canister

Frontend Development

cd frontend

# Start development server
npm start

# Build for production
npm run build

# Run linting
npm run lint

๐Ÿ“ Project Structure

vr-marketplace/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ auth_canister/          # User authentication & profiles
โ”‚   โ”‚   โ”œโ”€โ”€ src/lib.rs
โ”‚   โ”‚   โ”œโ”€โ”€ Cargo.toml
โ”‚   โ”‚   โ””โ”€โ”€ auth_canister.did
โ”‚   โ”œโ”€โ”€ asset_canister/         # Asset storage & management
โ”‚   โ”‚   โ”œโ”€โ”€ src/lib.rs
โ”‚   โ”‚   โ”œโ”€โ”€ Cargo.toml
โ”‚   โ”‚   โ””โ”€โ”€ asset_canister.did
โ”‚   โ””โ”€โ”€ marketplace_canister/   # Marketplace logic & transactions
โ”‚       โ”œโ”€โ”€ src/lib.rs
โ”‚       โ”œโ”€โ”€ Cargo.toml
โ”‚       โ””โ”€โ”€ marketplace_canister.did
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/         # Reusable React components
โ”‚   โ”‚   โ”œโ”€โ”€ pages/             # Page components
โ”‚   โ”‚   โ”œโ”€โ”€ services/          # API & authentication services
โ”‚   โ”‚   โ””โ”€โ”€ utils/             # Helper functions
โ”‚   โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ””โ”€โ”€ tailwind.config.js
โ”œโ”€โ”€ dfx.json                   # DFX configuration
โ”œโ”€โ”€ Cargo.toml                 # Workspace configuration
โ””โ”€โ”€ README.md

๐ŸŽฎ Usage Guide

For Asset Creators

  1. Connect Wallet: Use Internet Identity or Plug Wallet to authenticate
  2. Upload Assets: Navigate to Upload page and submit your VR models (.glb, .gltf, .obj, .fbx)
  3. Set Pricing: Define your asset price in ICP tokens
  4. List for Sale: Make your assets available in the marketplace

For Asset Buyers

  1. Browse Marketplace: Explore available VR assets by category
  2. Preview in VR: Use the immersive VR viewer to experience assets
  3. Purchase Assets: Buy assets using ICP tokens
  4. Manage Collection: View and manage your owned assets

Supported VR File Formats

  • GLB (recommended): Binary glTF format
  • GLTF: Text-based glTF format
  • OBJ: Wavefront OBJ format
  • FBX: Autodesk FBX format

๐Ÿ” Security Features

  • Decentralized Authentication: No central authentication server
  • Smart Contract Ownership: Asset ownership verified on-chain
  • Secure Transactions: All payments handled by Internet Computer
  • Principal-based Identity: Each user identified by their IC principal

๐ŸŒ Deployment to IC Mainnet

1. Configure for Mainnet

# Add cycles to your wallet (requires real ICP)
dfx wallet --network ic balance

# Deploy to mainnet
dfx deploy --network ic

2. Update Frontend for Production

Update the frontend environment variables to use mainnet canister IDs and set production URLs.

๐Ÿค Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ†˜ Support

For support and questions:

๐Ÿ™ Acknowledgments


Built with โค๏ธ on the Internet Computer

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages