Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
999 changes: 999 additions & 0 deletions my-app/bun.lock

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions my-app/components/mdx/mermaid.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
'use client';

import { use, useEffect, useId, useState } from 'react';
import { useTheme } from 'next-themes';

export function Mermaid({ chart }: { chart: string }) {
const [mounted, setMounted] = useState(false);

useEffect(() => {
setMounted(true);
}, []);

if (!mounted) return;
return <MermaidContent chart={chart} />;
}

const cache = new Map<string, Promise<unknown>>();

function cachePromise<T>(
key: string,
setPromise: () => Promise<T>,
): Promise<T> {
const cached = cache.get(key);
if (cached) return cached as Promise<T>;

const promise = setPromise();
cache.set(key, promise);
return promise;
}

function MermaidContent({ chart }: { chart: string }) {
const id = useId();
const { resolvedTheme } = useTheme();
const { default: mermaid } = use(
cachePromise('mermaid', () => import('mermaid')),
);

mermaid.initialize({
startOnLoad: false,
securityLevel: 'loose',
fontFamily: 'inherit',
themeCSS: 'margin: 1.5rem auto 0;',
theme: resolvedTheme === 'dark' ? 'dark' : 'default',
});

const { svg, bindFunctions } = use(
cachePromise(`${chart}-${resolvedTheme}`, () => {
return mermaid.render(id, chart.replaceAll('\\n', '\n'));
}),
);

return (
<div
ref={(container) => {
if (container) bindFunctions?.(container);
}}
dangerouslySetInnerHTML={{ __html: svg }}
/>
);
}
18 changes: 16 additions & 2 deletions my-app/content/docs/meta.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
{
"pages": [ "---Introduction---","index", "profile", "---Develop---","works","integrate","architecture","iota-snap","resource", "---Other---","contant"]
}
"pages": [
"---Introduction---",
"index",
"profile",
"---Develop---",
"architecture",
"integrate",
"works",
"iota-snap",
"resource",
"---Future---",
"v2-objective",
"---Other---",
"contant"
]
}
56 changes: 56 additions & 0 deletions my-app/content/docs/v2-objective.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
title: LiquidLink v2 Objectives
---

### Overview

Architecture goals for LiquidLink v2: deliver a flexible, verifiable scoring system that lets multiple parties award points concurrently, convert points into consumable assets that only circulate within the LiquidLink protocol, and keep the data model simple, extensible, and easy to integrate.

### Functional Requirements

- Scoring modes: support simple add/subtract and time-weighted accumulation; allow multiple updates to the same account.
- Scoring actors: scoring rights can be granted to multiple parties; triggers may come from project owners or LiquidLink itself.
- Verification: any party can verify any account’s points; provide an SDK for automation and third-party checks.
- Point trading: points can be redeemed into consumable objects that are tradable only within the LiquidLink protocol.

### Non-Functional Requirements

- Easy integration: clear APIs and examples so projects can onboard with low effort.
- Minimal data model: keep objects lean to avoid heavy migrations during upgrades.
- Scalable: architecture should scale horizontally with scoring events and trading volume.

### Summary

This version separates scoring and trading into composable modules, assumes multi-party scoring by default, and exposes public verification flows. Redeemed assets stay inside the LiquidLink protocol to keep risk bounded. A minimal data model plus SDK and examples lowers integration cost and leaves room for future feature growth.

### Architecture Diagrams

**Technical flow**

<Mermaid
chart={`flowchart LR
A[Other Protocols / Custom Packages] -->|send_add_point_req| B[LiquidLink On-Chain]
B -->|events| C[Indexer]
C -->|API / SDK| D[Verification & Apps]
D -->|read dashboard| E[Points Store]
D -->|redeem| F[Protocol-Scoped Assets]
F -->|trade / swap| G[Marketplace]
A -->|admin / multi-party scoring| B
D -->|verify any account| B
`}
/>

**User-side view**

<Mermaid
chart={`flowchart LR
P[Project Owner / Admin] -->|configure scoring rules| Q[LiquidLink Console]
P -->|issue points| R[Scoring Module + Dashboard]
U[Users] -->|earn points| R
U -->|redeem| S[Protocol Asset]
V[Verifiers / Partners] -->|SDK verify| T[Public Verification API]
Q --> R
R -->|dashboard view| U
S -->|trade| U
`}
/>
2 changes: 2 additions & 0 deletions my-app/mdx-components.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import defaultMdxComponents from 'fumadocs-ui/mdx';
import type { MDXComponents } from 'mdx/types';
import { Mermaid } from './components/mdx/mermaid';

// use this function to get MDX components, you will need it for rendering MDX
export function getMDXComponents(components?: MDXComponents): MDXComponents {
return {
...defaultMdxComponents,
Mermaid,
...components,
};
}
12 changes: 7 additions & 5 deletions my-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
"postinstall": "fumadocs-mdx"
},
"dependencies": {
"next": "15.5.2",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"fumadocs-ui": "15.7.11",
"fumadocs-core": "15.7.11",
"fumadocs-mdx": "11.9.0"
"fumadocs-mdx": "11.9.0",
"fumadocs-ui": "15.7.11",
"mermaid": "^11.12.2",
"next": "15.5.7",
"next-themes": "^0.4.6",
"react": "^19.1.1",
"react-dom": "^19.1.1"
},
"devDependencies": {
"@types/node": "24.3.1",
Expand Down
1 change: 1 addition & 0 deletions my-app/source.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
frontmatterSchema,
metaSchema,
} from 'fumadocs-mdx/config';
import { remarkMdxMermaid } from 'fumadocs-core/mdx-plugins';

// You can customise Zod schemas for frontmatter and `meta.json` here
// see https://fumadocs.dev/docs/mdx/collections#define-docs
Expand Down