Skip to content

cordova7/prysm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PRYSM

A full-stack token platform on the Internet Computer. Featuring an ICPSwap aggregator frontend, blockchain indexer, and token routing canister.

License: MIT Frontend: Next.js Indexer: Node.js Canister: Rust Platform: ICP

GitHub stars GitHub forks GitHub issues Last commit

Prysm screenshot


Topics

nextjs rust internet-computer defi token-swap blockchain-indexer icp cryptocurrency web3


Overview

PRYSM is a comprehensive token platform built on the Internet Computer blockchain. The platform consists of three main components:

Component Technology Description
prysm-app Next.js ICPSwap aggregator frontend for token swaps and portfolio tracking
prysm-indexer Node.js Blockchain indexer for holder data, funding sources, and trading analytics
prysm-router Rust Canister for token routing and liquidity aggregation

Architecture

┌────────────────────────────────────────────────────────────────┐
│                         PRYSM Platform                         │
├────────────────────────────────────────────────────────────────┤
│                                                                 │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐        │
│  │  prysm-app   │  │prysm-indexer │  │ prysm-router │        │
│  │   (Next.js)  │  │  (Node.js)   │  │    (Rust)    │        │
│  │              │  │              │  │              │        │
│  │  - Token UI  │  │  - Holders   │  │  - Routing   │        │
│  │  - Portfolio │  │  - Funding   │  │  - Liquidity │        │
│  │  - Analytics │  │  - Analytics │  │  - Aggregation│       │
│  └──────┬───────┘  └──────┬───────┘  └──────┬───────┘        │
│         │                  │                  │                │
│         └──────────────────┼──────────────────┘                │
│                            │                                   │
│  ┌─────────────────────────┴───────────────────────────┐      │
│  │              Internet Computer                      │      │
│  │         (ICPSwap, Canisters, Ledgers)                │      │
│  └─────────────────────────────────────────────────────┘      │
│                            │                                   │
│                   ┌────────┴────────┐                          │
│                   │   Supabase     │                          │
│                   │  (Data Store)  │                          │
│                   └────────────────┘                          │
└────────────────────────────────────────────────────────────────┘

Quick Start

Prerequisites

  • Node.js 18+ - For prysm-app and prysm-indexer
  • Rust 1.96+ - For prysm-router
  • dfx SDK - Install guide
  • Supabase project - For data storage

Installation

# Clone the repository
git clone https://github.com/cordova7/prysm.git
cd prysm

# Install frontend dependencies
cd prysm-app
npm install

# Install indexer dependencies
cd ../prysm-helpers/prysm-indexer
npm install

# Build canister
cd ../prysm-router
cargo build --release

Components

prysm-app

Next.js frontend for the PRYSM platform.

Features:

  • Token swap interface (ICPSwap aggregator)
  • Portfolio tracking dashboard
  • Promotions and analytics
  • Real-time price data
  • Wallet integration

Setup:

cd prysm-app
cp .env.example .env
# Edit .env with your Supabase credentials
npm run dev

prysm-indexer

Node.js blockchain indexer that extracts and analyzes on-chain data.

Features:

  • Holder data extraction
  • Funding source tracking
  • Trading analytics
  • Pool synchronization
  • Incremental updates

Setup:

cd prysm-helpers/prysm-indexer
cp .env.example .env
# Configure database and RPC endpoints
npm run start

prysm-router

Rust canister for token routing and liquidity aggregation on the Internet Computer.

Features:

  • Multi-hop token routing
  • Liquidity aggregation across DEXs
  • Best price optimization
  • Gas optimization

Setup:

cd prysm-helpers/prysm-router
dfx deploy prysm-router

Tech Stack

Layer Technology Purpose
Frontend Next.js 14, React 18, TypeScript User interface
Styling Tailwind CSS Modern responsive design
State React Context, SWR Client-side state management
Backend Node.js, TypeScript Indexer service
Canister Rust, Candid On-chain logic
Database Supabase Data persistence
Blockchain Internet Computer Decentralized backend

Project Structure

prysm/
├── prysm-app/                    # Next.js frontend
│   ├── app/                      # App Router pages
│   ├── components/               # React components
│   ├── contexts/                 # React contexts
│   ├── hooks/                    # Custom hooks
│   ├── lib/                      # Utilities
│   ├── data/                     # Static data
│   ├── types/                    # TypeScript types
│   └── supabase/                 # Database client
│
├── prysm-helpers/                # Backend utilities
│   ├── prysm-indexer/            # Blockchain indexer
│   │   ├── src/
│   │   │   ├── ic/              # IC data sources
│   │   │   ├── icpswap/         # DEX integration
│   │   │   ├── rosetta/         # Rosetta API
│   │   │   └── trading/         # Trading analytics
│   │   └── tests/               # Test suites
│   │
│   └── prysm-router/            # Rust canister
│       ├── src/
│       │   └── prysm_router/    # Canister logic
│       └── canister_ids.json    # Deployed canister IDs
│
├── CONTRIBUTING.md               # Contribution guidelines
├── CHANGELOG.md                  # Version history
└── LICENSE                       # MIT license

Development

# Start local ICP replica
dfx start --background

# Deploy canister
cd prysm-helpers/prysm-router
dfx deploy

# Run frontend
cd ../../prysm-app
npm run dev

# Run indexer
cd ../prysm-helpers/prysm-indexer
npm run dev

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Security

Note: This project involves financial transactions. Always:

  • Test on testnet before production
  • Never commit secrets to version control
  • Use environment variables for sensitive configuration
  • Review canister code before deployment

License

MIT - See LICENSE.


Star History

Star History Chart

About

ICPSwap aggregator frontend with real-time blockchain indexer and token routing canister

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors