Skip to content

E1eng/IP-Scope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

103 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

IPScope - IP Asset Analytics Platform

πŸ“‹ Overview

IPScope is a comprehensive analytics platform for tracking and analyzing Intellectual Property (IP) assets on the Story Protocol blockchain. The platform provides detailed insights into royalty income, asset performance, derivative works, and licensing information with a clean, minimalist design and optimized performance.

πŸ—οΈ Architecture

Frontend (React + Vite)

  • Framework: React 18 with Vite
  • Styling: Tailwind CSS with custom design system
  • State Management: React Context API
  • Routing: React Router
  • Icons: Lucide React
  • Accessibility: WCAG 2.1 AA compliant
  • Port: 5173/5174

Backend (Node.js + Express)

  • Runtime: Node.js
  • Framework: Express.js
  • Port: 3001
  • API Integration: Story Protocol API + StoryScan API
  • Performance: Optimized with connection pooling and rate limiting
  • Caching: Intelligent data caching for improved performance

πŸ”Œ API Integrations

Story Protocol API

  • Base URL: https://api.storyapis.com/api/v4
  • Endpoints Used:
    • /assets - Fetch IP assets by owner
    • /assets/{ipId} - Get individual asset details
    • /assets/edges - Get derivative works (parent-child relationships)
    • /transactions - Get transaction history
    • /disputes - Get dispute information
    • /licenses - Get license information
    • /royalty-policies - Get royalty policy details

StoryScan API

  • Base URL: https://www.storyscan.io/api/v2
  • Endpoints Used:
    • /transactions - Get detailed transaction data
    • /tokens - Get token information
    • /prices - Get price data for currency conversion

πŸ“ Project Structure

IPScope/
β”œβ”€β”€ client/                 # Frontend React application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # Reusable UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ AssetTable.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ LicenseCard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ RemixDetailModal.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ChildrenList.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ StatCard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ QuickStats.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ OnChainAnalytics.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SkeletonComponents.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ EmptyState.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ErrorState.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ OptimisticUpdates.jsx
β”‚   β”‚   β”‚   └── DetailRow.jsx
β”‚   β”‚   β”œβ”€β”€ pages/          # Main application pages
β”‚   β”‚   β”‚   β”œβ”€β”€ ExplorerPage.jsx
β”‚   β”‚   β”‚   └── AssetDetailPage.jsx
β”‚   β”‚   β”œβ”€β”€ utils/          # Utility functions
β”‚   β”‚   β”‚   └── accessibility.js
β”‚   β”‚   β”œβ”€β”€ SearchContext.jsx
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   └── main.jsx
β”‚   β”œβ”€β”€ package.json
β”‚   └── vite.config.js
β”œβ”€β”€ server/                 # Backend Node.js application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ controllers/    # API route handlers
β”‚   β”‚   β”‚   └── asset.controller.js
β”‚   β”‚   β”œβ”€β”€ services/       # Business logic and API integration
β”‚   β”‚   β”‚   └── storyProtocol.service.js
β”‚   β”‚   β”œβ”€β”€ routes/         # API route definitions
β”‚   β”‚   β”‚   └── index.js
β”‚   β”‚   └── index.js
β”‚   └── package.json
└── README.md

πŸ› οΈ Installation & Setup

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Story Protocol API key
  • StoryScan API key(s)

Environment Variables

Create .env file in the server directory:

PORT
STORY_PROTOCOL_API_KEY=your_story_protocol_api_key
STORYSCAN_API_KEY=your_storyscan_api_key

Note: Multiple StoryScan API keys are supported for improved performance and rate limiting.

Installation Steps

  1. Clone the repository
git clone <repository-url>
cd IPScope
  1. Install backend dependencies
cd server
npm install
  1. Install frontend dependencies
cd ../client
npm install
  1. Start the backend server
cd ../server
npm start
  1. Start the frontend development server
cd ../client
npm run dev
  1. Access the application

πŸ”§ API Endpoints

Asset Management

  • GET /api/assets?owner={address} - Get assets by owner
  • GET /api/assets/{ipId} - Get asset details
  • GET /api/assets/{ipId}/children - Get derivative works
  • GET /api/assets/{ipId}/royalty-transactions - Get royalty transactions

Analytics

  • GET /api/analytics/royalty - Get royalty analytics
  • GET /api/analytics/portfolio - Get portfolio statistics
  • GET /api/analytics/disputes - Get dispute analytics

πŸ’‘ Key Features Explained

1. Royalty Calculation

The platform calculates royalties by:

  1. Fetching RoyaltyPaid events from Story Protocol
  2. Aggregating transaction data from StoryScan
  3. Converting currencies to WIP (Web3 IP)
  4. Providing real-time analytics and trends

2. Asset Relationship Tracking

  • Parent Assets: Original IP assets
  • Child Assets: Derivative works created from parent assets
  • Descendants: All levels of derivative works
  • Relationship Mapping: Visual representation of IP asset hierarchy

3. License Information

  • PIL Terms: Programmable IP License terms
  • Royalty Policies: Automated royalty collection rules
  • Commercial Use: Rights for commercial utilization
  • Derivatives: Permission for creating derivative works
  • Transferability: Asset ownership transfer rights

4. Performance Optimization

  • Batch Processing: Parallel API calls for faster data retrieval
  • Rate Limiting: Client-side and server-side rate limiting
  • Caching: Intelligent data caching for improved performance
  • Pagination: Efficient handling of large datasets

πŸ§ͺ Testing

Backend Testing

cd server
npm test

Frontend Testing

cd client
npm test

🀝 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 - see the LICENSE file for details.

πŸ“ž Support

For support and questions:

  • Create an issue in the repository
  • Contact the development team
  • Check the documentation

πŸ™ Acknowledgments

  • Story Protocol for the blockchain infrastructure
  • StoryScan for transaction data
  • React and Vite communities
  • Open source contributors
  • Tailwind CSS for the design system
  • Lucide React for the icon library

IPScope - Empowering creators with comprehensive IP asset analytics and royalty tracking on the Story Protocol blockchain.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages