Skip to content

Varun-bhim/Syntax-Error-25

Repository files navigation

Walrus Data Marketplace

A decentralized data marketplace built on Walrus storage, where data providers can upload and monetize datasets while data buyers can discover, purchase, and download valuable data.

๐Ÿš€ Quick Start

Development Setup

  1. Install all dependencies:

    npm run install-all
  2. Start both frontend and backend:

    # Option 1: Cross-platform (recommended)
    npm run dev
    
    # Option 2: Clean install and start
    npm run dev:clean
    
    # Option 3: Windows batch file
    npm run dev:windows
    
    # Option 4: PowerShell (Windows)
    npm run dev:ps1
  3. Additional Development Commands:

    # Install all dependencies (frontend + backend)
    npm run install-all
    
    # Stop all running Node processes
    npm run stop
    
    # Run only backend
    npm run server
    
    # Run only frontend
    npm run client
  4. Access the application:

For detailed development instructions, see DEVELOPMENT.md.

๐Ÿš€ Features

For Data Providers

  • User Registration/Login - Secure authentication with wallet or email
  • Dataset Upload - Upload files to Walrus decentralized storage
  • Metadata Management - Add titles, descriptions, tags, pricing
  • Sales Dashboard - Track earnings and sales performance
  • Commission System - Platform takes 5% commission on sales

For Data Buyers

  • Browse & Search - Discover datasets with advanced filtering
  • Dataset Preview - View metadata and sample data
  • Secure Purchase - Crypto payments with WAL/SUI tokens
  • Download Access - Access purchased datasets from Walrus
  • Purchase History - Track all transactions

Platform Features

  • Decentralized Storage - All files stored on Walrus network
  • Blockchain Payments - Secure crypto transactions
  • Reputation System - User ratings and reviews
  • Commission Management - Automated fee collection
  • Responsive Design - Works on all devices

๐Ÿ›  Tech Stack

Frontend

  • React 19 - Modern UI framework
  • Bootstrap 5 - CSS framework
  • Axios - HTTP client
  • @mysten/sui - Sui blockchain integration

Backend

  • Node.js - Runtime environment
  • Express.js - Web framework
  • MongoDB - Database for metadata
  • Mongoose - ODM for MongoDB
  • JWT - Authentication tokens
  • Multer - File upload handling

Storage & Blockchain

  • Walrus - Decentralized file storage
  • Sui - Blockchain for payments
  • WAL/SUI Tokens - Payment currencies

๐Ÿ“ฆ Installation

Prerequisites

  • Node.js (v16 or higher)
  • MongoDB (local or cloud)
  • Git

Backend Setup

  1. Navigate to server directory:

    cd server
  2. Install dependencies:

    npm install
  3. Create environment file:

    cp env.example .env
  4. Configure environment variables:

    PORT=5000
    MONGODB_URI=mongodb://localhost:27017/walrus-marketplace
    JWT_SECRET=your-super-secret-jwt-key
    WALRUS_RPC_URL=https://rpc.walrus.network
    WALRUS_API_KEY=your-walrus-api-key
    SUI_RPC_URL=https://fullnode.mainnet.sui.io:443
  5. Start MongoDB (if running locally):

    mongod
  6. Start the server:

    npm run dev

Frontend Setup

  1. Navigate to client directory:

    cd .. # (if you're in server directory)
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm start
  4. Open your browser: Navigate to http://localhost:3000

๐Ÿ— Project Structure

walrus-client/
โ”œโ”€โ”€ public/                 # Static files
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ dashboard/      # Dashboard components
โ”‚   โ”‚   โ”œโ”€โ”€ marketplace/    # Marketplace components
โ”‚   โ”‚   โ”œโ”€โ”€ upload/         # Upload components
โ”‚   โ”‚   โ”œโ”€โ”€ common/         # Shared components
โ”‚   โ”‚   โ””โ”€โ”€ LoginRegister.js
โ”‚   โ”œโ”€โ”€ App.js             # Main app component
โ”‚   โ”œโ”€โ”€ App.css            # Global styles
โ”‚   โ””โ”€โ”€ index.js           # Entry point
โ”œโ”€โ”€ server/                # Backend API
โ”‚   โ”œโ”€โ”€ models/            # Database models
โ”‚   โ”œโ”€โ”€ routes/            # API routes
โ”‚   โ”œโ”€โ”€ middleware/        # Custom middleware
โ”‚   โ””โ”€โ”€ index.js           # Server entry point
โ””โ”€โ”€ README.md

๐Ÿ”ง API Endpoints

Authentication

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - User login
  • GET /api/auth/profile - Get user profile
  • PUT /api/auth/profile - Update profile
  • POST /api/auth/connect-wallet - Connect wallet

Datasets

  • GET /api/datasets - Browse datasets
  • GET /api/datasets/:id - Get dataset details
  • POST /api/datasets - Create dataset
  • PUT /api/datasets/:id - Update dataset
  • DELETE /api/datasets/:id - Delete dataset
  • POST /api/datasets/:id/upload - Upload files
  • POST /api/datasets/:id/purchase - Purchase dataset
  • GET /api/datasets/:id/download - Download dataset

Transactions

  • GET /api/transactions/my-transactions - User transactions
  • GET /api/transactions/:id - Transaction details
  • GET /api/transactions/stats/overview - Transaction statistics
  • POST /api/transactions/:id/refund - Request refund
  • POST /api/transactions/:id/dispute - Create dispute

๐ŸŽจ UI Features

Design System

  • Dark Theme - Modern blockchain aesthetic
  • Neon Accents - Cyan, purple, and green highlights
  • Glassmorphism - Semi-transparent elements
  • Smooth Animations - Professional transitions
  • Responsive Design - Mobile-first approach

Components

  • Login/Register - Secure authentication
  • Dashboard - User overview and stats
  • Marketplace - Dataset browsing and search
  • Upload - Multi-step dataset creation
  • Navigation - Intuitive app navigation

๐Ÿ” Security Features

  • JWT Authentication - Secure token-based auth
  • Password Hashing - bcrypt encryption
  • File Validation - Type and size restrictions
  • CORS Protection - Cross-origin security
  • Input Sanitization - XSS prevention

๐Ÿš€ Deployment

Backend Deployment

  1. Set up MongoDB Atlas or local MongoDB
  2. Configure environment variables
  3. Deploy to Heroku, Vercel, or AWS
  4. Set up Walrus and Sui network access

Frontend Deployment

  1. Build the React app: npm run build
  2. Deploy to Netlify, Vercel, or AWS S3
  3. Configure API endpoints

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

๐Ÿ“„ License

This project is licensed under the MIT License.

๐Ÿ†˜ Support

For support and questions:

  • Create an issue on GitHub
  • Check the documentation
  • Contact the development team

๐Ÿ”ฎ Roadmap

  • Smart contract integration
  • Advanced search filters
  • Data visualization tools
  • API rate limiting
  • Email notifications
  • Mobile app
  • Multi-language support
  • Advanced analytics

Built with โค๏ธ for the decentralized data economy"# Syntax-Error-25"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors