diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..e4df115 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,47 @@ +# Repository Guidelines + +## Project Structure & Module Organization + +PaperDrill is a Bun/TypeScript monorepo without a root `package.json`. Each package owns its dependencies and `bun.lock`: + +- `backend/`: Express REST/WebSocket API and Prisma schema/migrations. +- `engine/`: in-memory order matching and snapshot persistence. +- `worker/`: Redis stream persistence, candles, and tickers. +- `bot/`: optional market-making clients. +- `frontend/`: React 19/Tailwind 4 SPA; static assets live in `frontend/public/`. +- `docs/`: Mintlify documentation source and site configuration. +- `tests/integration/`: black-box cross-service tests. +- `benchmarks/`: HTTP, matching, and WebSocket performance scenarios. + +Keep unit tests in `backend/tests/` or `engine/tests/`. Public documentation belongs in `docs/`. + +## Build, Test, and Development Commands + +Run `bun install` inside an individual package after changing its dependencies. Common root commands are: + +- `make up`: start dependencies, migrate/seed the database, and launch backend, engine, and worker. +- `make build`: build the main development containers. +- `make logs SERVICE=backend`: follow service logs. +- `make test-unit`: run backend and engine Bun tests with `.env.test`. +- `make test-integration`: exercise the disposable test stack. +- `make bench`: run the benchmark suite. +- `make down`: stop the development stack. + +For frontend-only work, use `cd frontend && bun run dev` or `bun run build`. +For documentation work, run `mint dev`, `mint validate`, and `mint broken-links` from `docs/`. + +## Coding Style & Naming Conventions + +Follow existing TypeScript style: tabs, double quotes, semicolons, ESM imports, and trailing commas in multiline constructs. Use `camelCase` for variables/functions, `PascalCase` for components and types, and established kebab-case filenames (for example, `decimal-input.tsx`). No repository-wide formatter or linter is configured, so match adjacent code. + +## Testing Guidelines + +Tests use `bun:test` and `.test.ts` filenames. Add unit coverage for local logic and integration coverage for cross-service behavior. There is no stated coverage threshold; regressions should include a test that fails without the fix. Run both test commands before submitting service-wide changes. + +## Commit & Pull Request Guidelines + +Use Conventional Commit prefixes: `feat:`, `fix:`, `docs:`, `ci:`, or a scope such as `fix(bot):`. Keep commits focused. Pull requests should explain the change, identify affected services, link issues, list verification commands, and include screenshots for visible frontend work. Call out migrations, environment changes, or snapshot compatibility concerns. + +## Security & Configuration + +Never commit `.env.dev`, `.env.prod`, generated Prisma clients, engine snapshots, build output, or secrets. Do not add fallback production credentials. Preserve the established API error envelope and use `bigintReplacer` for BigInt values crossing JSON or Redis boundaries. diff --git a/README.md b/README.md index d831ccb..681ce40 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

PaperDrill

-

The exchange built for developers, not spectators.

+

Competitive trading, powered by a real matching engine.

Release v1.0.0 @@ -11,22 +11,22 @@

Platform · - API documentation · + API documentation · API

-PaperDrill is a live paper-trading exchange simulator with a real matching engine and order book. Trade through the web interface or connect a bot through the API—no KYC and no real funds at risk. +PaperDrill is a competitive trading platform built around credit markets, a real matching engine, and a public leaderboard. Trade through the web interface or connect a bot through the API, build a measurable record, and compete without risking capital. ## Features - **Live matching engine** — price-time priority matching rather than mocked fills. - **Real-time market data** — order book, trades, tickers, and updating candles over WebSocket. -- **Persistent accounts** — simulated balances, open orders, order history, and trade history. -- **Public leaderboard** — compare simulated portfolio performance with other traders. +- **Persistent accounts** — credit balances, open orders, order history, and trade history. +- **Public leaderboard** — compare portfolio performance with other traders. - **Scoped API keys** — programmable account access and order management. - **Bot-friendly API** — REST trading endpoints and public WebSocket feeds. -- **Daily simulated credit** — idempotent recurring credit with an adjustable PnL baseline. +- **Daily credit** — idempotent recurring credit with an adjustable PnL baseline. ## Architecture @@ -34,7 +34,8 @@ PaperDrill is a live paper-trading exchange simulator with a real matching engin | Service | Responsibility | | ---------- | --------------------------------------------------------------------------- | -| `frontend` | React SPA for markets, trading, account management, docs, and leaderboard | +| `frontend` | React SPA for markets, trading, account management, and leaderboard | +| `docs` | Mintlify site for product guides and API documentation | | `backend` | Express REST/WebSocket API, authentication, validation, and market metadata | | `engine` | In-memory balances, order books, matching, and periodic snapshots | | `worker` | Persists orders/fills and derives candles and tickers | diff --git a/docs/.mintignore b/docs/.mintignore new file mode 100644 index 0000000..9922f06 --- /dev/null +++ b/docs/.mintignore @@ -0,0 +1,7 @@ +# Mintlify automatically ignores these files and directories: +# .git, .github, .claude, .agents, .idea, node_modules, +# README.md, LICENSE.md, CHANGELOG.md, CONTRIBUTING.md + +# Draft content +drafts/ +*.draft.mdx diff --git a/docs/AGENTS.md b/docs/AGENTS.md new file mode 100644 index 0000000..5013d7d --- /dev/null +++ b/docs/AGENTS.md @@ -0,0 +1,32 @@ +# PaperDrill documentation guidelines + +## Project scope + +- This directory is the source of truth for PaperDrill's public documentation. +- The site is built and hosted with Mintlify. +- Pages use MDX with YAML frontmatter. Site configuration lives in `docs.json`. +- Run `mint dev` from this directory to preview the site at `http://localhost:3000`. + +## Writing style + +- Use active voice and address the reader as “you”. +- Keep sentences concise and headings in sentence case. +- Use “simulated funds,” not “fake money” or “real funds.” +- Use “API key” and “WebSocket” consistently. +- Format commands, paths, fields, and enum values as code. +- State required API-key scopes next to protected endpoints. + +## Accuracy + +- Verify public REST routes against `backend/src` before changing endpoint documentation. +- Verify WebSocket channels and payloads against the backend and worker implementations. +- Represent prices, quantities, balances, and other decimal API values as strings. +- Never document internal admin endpoints, credentials, infrastructure secrets, or production topology. +- Do not describe planned competitions or challenges as available until they are released. + +## Links + +- Use relative links for pages inside this documentation site. +- Use absolute `https://paperdrill.dev` links for the platform and dashboard. +- Use `https://api.paperdrill.dev/v1` as the REST base URL. +- Use `wss://api.paperdrill.dev` as the public WebSocket URL. diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..79f6351 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,28 @@ +# PaperDrill documentation + +This directory contains the Mintlify documentation site for PaperDrill. + +## Local development + +Install the Mintlify CLI, then start the documentation server from this directory: + +```bash +npm install --global mint +mint dev +``` + +The local preview is available at `http://localhost:3000`. + +## Validation + +Run these checks before publishing documentation changes: + +```bash +mint validate +mint broken-links +mint a11y +``` + +`openapi.yaml` is the public contract for developer-facing REST endpoints. Keep request fields, response schemas, authentication requirements, scopes, and examples aligned with `backend/src`. + +Mintlify deploys from the `/docs` monorepo path. Production should use `docs.paperdrill.dev`. diff --git a/docs/account.mdx b/docs/account.mdx new file mode 100644 index 0000000..98daa32 --- /dev/null +++ b/docs/account.mdx @@ -0,0 +1,61 @@ +--- +title: "Track balances and portfolio" +description: "Read available funds, locked balances, portfolio performance, and private fills." +--- + +Account endpoints use API-key authentication. Balances and portfolio values are decimal strings so clients do not lose precision. + +## Understand balances + +`GET /balances` requires `ACCOUNT_READ`. Add `?asset=USD` when you need only one asset. + +```bash +curl https://api.paperdrill.dev/v1/balances \ + --header "x-api-key: $PAPERDRILL_API_KEY" +``` + +```json +{ + "USD": { "available": "9748.50", "locked": "251.50" }, + "SOL": { "available": "2.00", "locked": "0.00" } +} +``` + +- `available` can be used for a new order. +- `locked` is reserved by open orders. +- Cancelling an order releases its unfilled reservation. +- Fills move value between assets and can change both fields. + +Always refresh balances after order activity instead of calculating the authoritative balance only on the client. + +## Track portfolio performance + +`GET /portfolio` requires `ACCOUNT_READ`. It values positions in the platform quote asset and compares current equity with the account's PnL baseline. + +```bash +curl https://api.paperdrill.dev/v1/portfolio \ + --header "x-api-key: $PAPERDRILL_API_KEY" +``` + +| Field | Meaning | +| -------------------- | ------------------------------------------------ | +| `equity` | Current portfolio value | +| `baselineEquity` | Value used as the PnL starting point | +| `pnl` / `pnlPercent` | Change from the baseline | +| `baselineAt` | Time at which the baseline was recorded | +| `asOf` | Oldest market-price timestamp used for valuation | +| `partial` | `true` when a position could not be fully priced | +| `positions` | Per-asset balances, mark price, and value | + +Treat `partial: true` as an incomplete valuation. Do not present it as the value of the entire portfolio without a warning. + +## Reconcile with private trades + +Use `GET /trades` with the `ORDER_READ` scope to retrieve your fills newest first. Each record identifies your side, maker status, and related order. + +```bash +curl "https://api.paperdrill.dev/v1/trades?limit=100" \ + --header "x-api-key: $PAPERDRILL_API_KEY" +``` + +Use order history for intent and status, private trades for executions, and balances for the current authoritative funds. diff --git a/frontend/src/content/docs/errors.md b/docs/api-reference/errors-and-limits.mdx similarity index 59% rename from frontend/src/content/docs/errors.md rename to docs/api-reference/errors-and-limits.mdx index a32c75a..4db93ab 100644 --- a/frontend/src/content/docs/errors.md +++ b/docs/api-reference/errors-and-limits.mdx @@ -1,6 +1,9 @@ -# Errors and rate limits +--- +title: "Errors and rate limits" +description: "Handle API errors, validation failures, safe retries, and rate limits." +--- -All API errors use the same JSON envelope. Save `requestId` when reporting an issue, it identifies the matching server log. +All API errors use the same JSON envelope. Save `requestId` when reporting an issue because it identifies the matching server log. ```json { @@ -17,17 +20,17 @@ All API errors use the same JSON envelope. Save `requestId` when reporting an is ## Common status codes -| Status | Common codes | What to do | -| ------ | -------------------------------------------------------- | ---------------------------------------------- | -| `400` | `VALIDATION_ERROR`, `MALFORMED_JSON` | Correct the request shape, value, or precision | -| `401` | `AUTHENTICATION_REQUIRED`, `INVALID_API_KEY` | Add or replace the API key | -| `403` | `FORBIDDEN` | Add the required scope or use another key | -| `404` | `MARKET_NOT_FOUND`, `ORDER_NOT_FOUND` | Check the supplied identifier | -| `409` | `ORDER_NOT_CANCELLABLE` | Refresh the order before retrying | -| `422` | `INSUFFICIENT_BALANCE`, `NO_LIQUIDITY`, `ORDER_REJECTED` | Adjust the order or wait for liquidity | -| `429` | `RATE_LIMITED` | Wait for the current window to reset | -| `503` | `SERVICE_UNAVAILABLE`, `PORTFOLIO_UNAVAILABLE` | Retry with exponential backoff | -| `504` | `ENGINE_TIMEOUT` | Check order history before retrying | +| Status | Common codes | What to do | +| ------ | -------------------------------------------------------------------- | ---------------------------------------------- | +| `400` | `VALIDATION_ERROR`, `MALFORMED_JSON` | Correct the request shape, value, or precision | +| `401` | `AUTHENTICATION_REQUIRED`, `INVALID_API_KEY` | Add or replace the API key | +| `403` | `FORBIDDEN`, `EMAIL_NOT_VERIFIED` | Add the required scope or verify the account | +| `404` | `MARKET_NOT_FOUND`, `ORDER_NOT_FOUND`, `ASSET_NOT_FOUND` | Check the supplied identifier | +| `409` | `ORDER_NOT_CANCELLABLE` | Refresh the order before retrying | +| `422` | `INSUFFICIENT_BALANCE`, `NO_LIQUIDITY`, `ORDER_REJECTED` | Adjust the order or wait for liquidity | +| `429` | `RATE_LIMITED` | Wait for the current window to reset | +| `503` | `SERVICE_UNAVAILABLE`, `ENGINE_UNAVAILABLE`, `PORTFOLIO_UNAVAILABLE` | Retry with exponential backoff | +| `504` | `ENGINE_TIMEOUT` | Check order history before retrying | ## API-key rate limits @@ -45,5 +48,7 @@ For sustained usage above these limits, contact [support@paperdrill.dev](mailto: ## Retry safely - Retry read requests after `429`, `503`, or `504` with exponential backoff and jitter. -- Do not blindly retry order creation after a timeout; check order history first to avoid duplicates. +- Do not blindly retry order creation after a timeout. Check order history first to avoid duplicates. - Order cancellation is safe to retry after a network failure, but a filled order can no longer be cancelled. + +Use the generated **API reference** to see the errors associated with a specific endpoint. See [API overview](/api-reference/overview) for shared data and retry conventions. diff --git a/docs/api-reference/overview.mdx b/docs/api-reference/overview.mdx new file mode 100644 index 0000000..768a684 --- /dev/null +++ b/docs/api-reference/overview.mdx @@ -0,0 +1,34 @@ +--- +title: "API overview" +description: "Connect to PaperDrill and follow the conventions shared by every API endpoint." +--- + +The REST API lets you read public market data and manage credit-funded orders with a scoped API key. Use the generated endpoint pages for complete request fields, response schemas, and interactive examples. + +## Connect + +| Interface | URL | +| --------- | ------------------------------- | +| REST API | `https://api.paperdrill.dev/v1` | +| WebSocket | `wss://api.paperdrill.dev` | + +Public market-data endpoints do not require authentication. Protected endpoints expect your complete API key in the `x-api-key` header. + +## Conventions + +| Topic | Convention | +| -------------- | -------------------------------------------------------------------------------------- | +| Decimal values | Prices, quantities, balances, and volumes are strings such as `"125.50"` | +| Symbols | Use the exact underscore-delimited value returned by `GET /markets`, such as `SOL_USD` | +| Precision | Read `pricePrecision` and `qtyPrecision` before constructing an order | +| Timestamps | Responses use either ISO 8601 strings or Unix milliseconds as documented per field | +| Pagination | Order history uses one-based `page` and `limit` parameters | +| Request IDs | Save the `X-Request-Id` header when reporting a problem | + +Keep decimal values as strings until you can process them with decimal or scaled-integer arithmetic. + +## Retry safely + +Retry read requests after `429`, `503`, or `504` with exponential backoff and jitter. Do not blindly retry order creation after a timeout because the API does not accept an idempotency key; inspect order history first. + +See [Errors and rate limits](/api-reference/errors-and-limits) for recovery guidance, or choose an endpoint for its full contract. diff --git a/docs/authentication.mdx b/docs/authentication.mdx new file mode 100644 index 0000000..031df24 --- /dev/null +++ b/docs/authentication.mdx @@ -0,0 +1,73 @@ +--- +title: "Authentication" +description: "Authenticate API requests with scoped PaperDrill API keys." +--- + +Programmable access to protected PaperDrill endpoints uses scoped API keys. Public market-data endpoints do not require authentication. + +## Create an API key + +Verify your email, sign in to PaperDrill, and open [API keys](https://paperdrill.dev/settings/api-keys). Create a separate key for each integration and grant only the permissions it needs. + +Copy the complete key when it appears. PaperDrill shows it only once. + +## Store the key + +Keep the key in a server-side environment variable or secret manager: + +```bash +export PAPERDRILL_API_KEY="pdk_your_key_here" +``` + +Never commit the value to source control or embed it in browser or mobile code. Revoke and replace a key immediately if it may have been exposed. + +## Send the key + +Pass the complete value in the `x-api-key` header: + + +```bash cURL +curl https://api.paperdrill.dev/v1/orders/open \ + --header "x-api-key: $PAPERDRILL_API_KEY" +``` + +```js JavaScript +const response = await fetch("https://api.paperdrill.dev/v1/orders/open", { + headers: { "x-api-key": process.env.PAPERDRILL_API_KEY }, +}); +``` + +```python Python +import os +import requests + +response = requests.get( + "https://api.paperdrill.dev/v1/orders/open", + headers={"x-api-key": os.environ["PAPERDRILL_API_KEY"]}, + timeout=10, +) +``` + + + +Do not use `Authorization: Bearer`, prepend another prefix, or remove the key's existing `pdk_` prefix. + +## Permissions + +| Scope | Allows | +| -------------- | --------------------------------------- | +| `ACCOUNT_READ` | Read balances and portfolio performance | +| `ORDER_READ` | Read orders and private trade history | +| `ORDER_CREATE` | Place limit and market orders | +| `ORDER_CANCEL` | Cancel open orders | + +Creating and cancelling orders requires a verified account. Read-only order and account endpoints still enforce their listed API-key scope. + +## Authentication errors + +- `401 AUTHENTICATION_REQUIRED` means no usable credential was supplied. +- `401 INVALID_API_KEY` means the key is malformed, revoked, or incorrect. +- `403 FORBIDDEN` means the key lacks the required scope. +- `403 EMAIL_NOT_VERIFIED` means the account must be verified before the requested mutation. + +See [Errors and rate limits](/api-reference/errors-and-limits) for the shared error envelope and retry guidance. diff --git a/docs/build-a-bot.mdx b/docs/build-a-bot.mdx new file mode 100644 index 0000000..6c03d94 --- /dev/null +++ b/docs/build-a-bot.mdx @@ -0,0 +1,166 @@ +--- +title: "Build a simple trading bot" +description: "Create a one-shot TypeScript bot that reads the book, places a limit order, monitors it, and cancels the remainder." +--- + +This guide builds a deliberately small bot that places one credit-funded limit order and cleans up any unfilled quantity. It demonstrates the API lifecycle without hiding order state or precision handling behind an SDK. + + + The example can create a real order on your PaperDrill account, but it only uses simulated funds. + Review the selected symbol, side, price, and quantity before running it. + + +## Prerequisites + +- [Bun](https://bun.sh) installed locally +- A verified PaperDrill account with a funded credit balance +- An API key with `ORDER_READ`, `ORDER_CREATE`, and `ORDER_CANCEL` + +Set the key and, optionally, the market: + +```bash +export PAPERDRILL_API_KEY="pdk_your_key_here" +export PAPERDRILL_SYMBOL="SOL_USD" +``` + +## Create the bot + +Save this file as `bot.ts`: + +```ts +const apiUrl = "https://api.paperdrill.dev/v1"; +const apiKey = process.env.PAPERDRILL_API_KEY; +const symbol = process.env.PAPERDRILL_SYMBOL ?? "SOL_USD"; + +if (!apiKey) { + throw new Error("Set PAPERDRILL_API_KEY before running the bot"); +} + +type Market = { + symbol: string; + pricePrecision: number; + qtyPrecision: number; +}; + +type Order = { + id: string; + status: "OPEN" | "PARTIALLY_FILLED" | "FILLED" | "CANCELLED"; + filledQty: string; +}; + +type OrderBook = { + bids: { price: string; qty: string }[]; + asks: { price: string; qty: string }[]; +}; + +async function api(path: string, init: RequestInit = {}): Promise { + const response = await fetch(`${apiUrl}${path}`, { + ...init, + headers: { + "Content-Type": "application/json", + "x-api-key": apiKey, + ...init.headers, + }, + }); + + if (!response.ok) { + const body = await response.text(); + const requestId = response.headers.get("x-request-id"); + throw new Error(`${response.status} ${body} (request ${requestId ?? "unknown"})`); + } + + return response.json() as Promise; +} + +function toScaled(value: string, precision: number): bigint { + const [whole, fraction = ""] = value.split("."); + if (fraction.length > precision) throw new Error(`${value} exceeds market precision`); + return BigInt(`${whole}${fraction.padEnd(precision, "0")}`); +} + +function fromScaled(value: bigint, precision: number): string { + if (precision === 0) return value.toString(); + const padded = value.toString().padStart(precision + 1, "0"); + return `${padded.slice(0, -precision)}.${padded.slice(-precision)}`; +} + +const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); + +let activeOrderId: string | undefined; + +async function cancelActiveOrder() { + if (!activeOrderId) return; + try { + await api(`/orders/${activeOrderId}`, { method: "DELETE" }); + console.log(`Cancelled ${activeOrderId}`); + } catch (error) { + console.error(`Could not cancel ${activeOrderId}:`, error); + } finally { + activeOrderId = undefined; + } +} + +process.once("SIGINT", () => { + void cancelActiveOrder().finally(() => process.exit(130)); +}); + +const { data: markets } = await api<{ data: Market[] }>("/markets"); +const market = markets.find((candidate) => candidate.symbol === symbol); +if (!market) throw new Error(`Unknown market: ${symbol}`); + +const book = await api(`/markets/${symbol}/orderbook`); +const bestBid = book.bids[0]?.price; +if (!bestBid) throw new Error(`No bids are available for ${symbol}`); + +const bestBidScaled = toScaled(bestBid, market.pricePrecision); +if (bestBidScaled <= 1n) throw new Error("Best bid is too small to improve safely"); + +const price = fromScaled(bestBidScaled - 1n, market.pricePrecision); +const qty = fromScaled(1n, market.qtyPrecision); + +const order = await api("/orders", { + method: "POST", + body: JSON.stringify({ symbol, side: "BUY", type: "LIMIT", price, qty }), +}); + +console.log(`Created ${order.id} at ${price} for ${qty}; status=${order.status}`); +if (order.status === "OPEN" || order.status === "PARTIALLY_FILLED") { + activeOrderId = order.id; +} + +for (let attempt = 0; activeOrderId && attempt < 5; attempt++) { + await sleep(2_000); + const current = await api(`/orders/${activeOrderId}`); + console.log(`status=${current.status} filled=${current.filledQty}`); + + if (current.status === "FILLED" || current.status === "CANCELLED") { + activeOrderId = undefined; + } +} + +await cancelActiveOrder(); +``` + +The bot uses scaled integers to move one price tick below the current best bid and submits the smallest quantity allowed by the market's precision. That makes an immediate fill less likely, but another order can still match it at any time. + +## Run it + +```bash +bun run bot.ts +``` + +The script prints the created order, polls it for roughly ten seconds, and cancels any remaining open quantity. Pressing `Ctrl+C` also attempts cancellation before exit. + +## Make it production-ready + +Before turning this example into a long-running strategy: + +- Use the [WebSocket streams](/websocket) instead of polling market data. +- Fetch a fresh [order-book snapshot](/orderbook) after every reconnect. +- Reconcile open orders and balances when the process starts. +- Add exponential backoff and jitter for `429`, `503`, and `504` responses. +- Never blindly retry `POST /orders` after an ambiguous timeout. +- Persist order IDs and decisions so a restart cannot duplicate activity. +- Add explicit risk limits for order quantity, total exposure, and outstanding orders. + +See [Place and manage orders](/orders) for the order lifecycle and [Errors and rate limits](/api-reference/errors-and-limits) for retry behavior. diff --git a/docs/docs.json b/docs/docs.json new file mode 100644 index 0000000..c1dedc6 --- /dev/null +++ b/docs/docs.json @@ -0,0 +1,136 @@ +{ + "$schema": "https://mintlify.com/docs.json", + "theme": "mint", + "name": "PaperDrill", + "description": "Guides and API reference for PaperDrill's competitive trading platform.", + "seo": { + "indexing": "all" + }, + "colors": { + "primary": "#E11D48", + "light": "#E11D48", + "dark": "#E11D48" + }, + "appearance": { + "default": "system" + }, + "fonts": { + "family": "IBM Plex Sans" + }, + "icons": { + "library": "lucide" + }, + "background": { + "color": { + "light": "#FFFFFF", + "dark": "#0A0A0C" + } + }, + "styling": { + "eyebrows": "section", + "codeblocks": { + "theme": { + "light": "github-light", + "dark": "github-dark" + } + } + }, + "api": { + "playground": { + "display": "interactive" + }, + "examples": { + "languages": ["curl", "javascript", "python"], + "defaults": "required" + } + }, + "favicon": { + "light": "/favicon-light.svg", + "dark": "/favicon-dark.svg" + }, + "logo": { + "light": "/logo/light.svg", + "dark": "/logo/dark.svg", + "href": "https://paperdrill.dev" + }, + "navigation": { + "tabs": [ + { + "tab": "Documentation", + "groups": [ + { + "group": "Get started", + "pages": ["index", "quickstart", "authentication"] + }, + { + "group": "Guides", + "pages": ["orders", "markets", "trades", "orderbook", "websocket", "account"] + }, + { + "group": "Examples", + "pages": ["build-a-bot"] + } + ] + }, + { + "tab": "API reference", + "openapi": { + "source": "openapi.yaml", + "directory": "api-reference" + }, + "groups": [ + { + "group": "Overview", + "pages": ["api-reference/overview", "api-reference/errors-and-limits"] + }, + { + "group": "Markets", + "pages": [ + "GET /markets", + "GET /markets/tickers", + "GET /markets/{symbol}/ticker", + "GET /markets/{symbol}/orderbook", + "GET /markets/{symbol}/trades", + "GET /markets/{symbol}/candles" + ] + }, + { + "group": "Orders", + "pages": [ + "GET /orders", + "POST /orders", + "GET /orders/open", + "GET /orders/{orderId}", + "DELETE /orders/{orderId}" + ] + }, + { + "group": "Account", + "pages": ["GET /trades", "GET /balances", "GET /portfolio"] + } + ] + } + ] + }, + "navbar": { + "links": [ + { + "label": "Support", + "href": "mailto:support@paperdrill.dev" + } + ], + "primary": { + "type": "button", + "label": "Open PaperDrill", + "href": "https://paperdrill.dev/markets" + } + }, + "contextual": { + "options": ["copy", "view"] + }, + "footer": { + "socials": { + "github": "https://github.com/hars-21/paperdrill" + } + } +} diff --git a/docs/favicon-dark.svg b/docs/favicon-dark.svg new file mode 100644 index 0000000..78b6d19 --- /dev/null +++ b/docs/favicon-dark.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/docs/favicon-light.svg b/docs/favicon-light.svg new file mode 100644 index 0000000..7e93c0a --- /dev/null +++ b/docs/favicon-light.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/docs/index.mdx b/docs/index.mdx new file mode 100644 index 0000000..dbb9b76 --- /dev/null +++ b/docs/index.mdx @@ -0,0 +1,53 @@ +--- +title: "Introduction" +description: "Trade competitive credit markets or connect a bot through the PaperDrill REST and WebSocket APIs." +--- + +PaperDrill is a competitive trading platform backed by a live matching engine and order book. You can trade credit markets in the web interface, automate orders through the REST API, and consume live market data over WebSocket. + + + PaperDrill credits are simulated funds with no monetary value. No real deposits, withdrawals, assets, + or financial returns are involved. + + + + + Create an API key, inspect a market, submit a limit order, and cancel it safely. + + + Run a one-shot TypeScript bot that reads the book, places an order, and cleans it up. + + + Choose API-key scopes and store credentials securely. + + + Review API conventions, then explore requests in the interactive reference. + + + +## Choose a path + +- To make your first authenticated request, follow the [Quickstart](/quickstart). +- To build an integration, read [Authentication](/authentication), [API overview](/api-reference/overview), and the generated API reference. +- To consume live data, start with [WebSocket streams](/websocket) and [Order book](/orderbook). +- To trade manually, open the [PaperDrill platform](https://paperdrill.dev/markets). + +## Endpoints + +| Interface | URL | +| ---------------- | ---------------------------------------- | +| REST API | `https://api.paperdrill.dev/v1` | +| WebSocket | `wss://api.paperdrill.dev` | +| Trading platform | [paperdrill.dev](https://paperdrill.dev) | + +Public market-data endpoints do not require authentication. Order and account reads require an API key with the appropriate scope. Creating or cancelling an order also requires a verified PaperDrill account. + +## Core conventions + +- Use symbols in underscore form, such as `SOL_USD`. +- Send prices and quantities as decimal strings, not JSON numbers. +- Read each market's precision before constructing an order. +- Treat every order response as authoritative because an order can fill immediately. +- Reconnect and resubscribe after a WebSocket interruption. + +See [API overview](/api-reference/overview) for precision, timestamp, pagination, and retry conventions. diff --git a/docs/logo/dark.svg b/docs/logo/dark.svg new file mode 100644 index 0000000..9b78c5c --- /dev/null +++ b/docs/logo/dark.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/logo/light.svg b/docs/logo/light.svg new file mode 100644 index 0000000..1e9e99d --- /dev/null +++ b/docs/logo/light.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/markets.mdx b/docs/markets.mdx new file mode 100644 index 0000000..c0af5a4 --- /dev/null +++ b/docs/markets.mdx @@ -0,0 +1,74 @@ +--- +title: "Read market data" +description: "Discover markets, apply precision rules, read tickers, and request historical candles." +--- + +Market-data endpoints are public. Use them to discover valid symbols and precision rules before constructing orders. + +## Discover a market + +```bash +curl https://api.paperdrill.dev/v1/markets +``` + +```json +{ + "data": [ + { + "id": "market_123", + "name": "Solana", + "symbol": "SOL_USD", + "baseAsset": "SOL", + "quoteAsset": "USD", + "pricePrecision": 2, + "qtyPrecision": 2 + } + ] +} +``` + +Use the exact symbol returned by the API. `SOL_USD` means the base asset is `SOL` and its price is expressed in `USD`. + +## Apply precision + +`pricePrecision` and `qtyPrecision` define the maximum number of decimal places accepted for an order. For a market with precision `2`, `"125.50"` and `"2.00"` are valid; `"125.501"` is not. + +Keep decimal values as strings and use decimal or scaled-integer arithmetic in your application. + +## Read a ticker + +Use `GET /markets/tickers` for every market or request one symbol: + +```bash +curl https://api.paperdrill.dev/v1/markets/SOL_USD/ticker +``` + +A ticker summarizes the latest price and rolling 24-hour open, high, low, base volume, and quote volume. Before the first trade, price and volume fields can be `null`. + +Ticker values are summaries, not executable quotes. Read the [Order book](/orderbook) when you need current bid and ask liquidity. + +## Request candles + +`GET /markets/:symbol/candles` returns OHLCV candles in chronological order. Choose one of `1m`, `5m`, `15m`, `30m`, `1H`, `4H`, or `1D`; the default is `15m`. + +```bash +curl "https://api.paperdrill.dev/v1/markets/SOL_USD/candles?interval=1H" +``` + +```json +{ + "data": [ + { + "time": 1789812000000, + "symbol": "SOL_USD", + "open": "125.00", + "high": "126.00", + "low": "124.50", + "close": "125.50", + "volume": "20.00" + } + ] +} +``` + +`time` is the candle start in Unix milliseconds. For live ticker and candle updates, use [WebSocket streams](/websocket). diff --git a/docs/openapi.yaml b/docs/openapi.yaml new file mode 100644 index 0000000..e4720d7 --- /dev/null +++ b/docs/openapi.yaml @@ -0,0 +1,911 @@ +openapi: 3.1.0 +info: + title: PaperDrill REST API + version: 1.0.0 + description: | + Trade PaperDrill credit markets and read live market data. + + Prices, quantities, balances, and other decimal values are encoded as strings so clients do not lose precision. +servers: + - url: https://api.paperdrill.dev/v1 + description: Production +tags: + - name: Market data + description: Public markets, tickers, candles, trades, and order-book snapshots. + - name: Trading + description: Create, inspect, and cancel orders with a scoped API key. + - name: Account + description: Read balances, portfolio performance, and private trade history. +paths: + /markets: + get: + operationId: listMarkets + summary: List markets + description: Returns every tradable market and its price and quantity precision. + tags: [Market data] + security: [] + responses: + "200": + description: Markets returned successfully. + content: + application/json: + schema: + type: object + required: [data] + properties: + data: + type: array + items: + $ref: "#/components/schemas/Market" + example: + data: + - id: market_123 + name: Solana + symbol: SOL_USD + baseAsset: SOL + quoteAsset: USD + pricePrecision: 2 + qtyPrecision: 2 + default: + $ref: "#/components/responses/RequestError" + /markets/tickers: + get: + operationId: listTickers + summary: List tickers + description: Returns the latest 24-hour ticker for every market. + tags: [Market data] + security: [] + responses: + "200": + description: Tickers returned successfully. + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Ticker" + default: + $ref: "#/components/responses/RequestError" + /markets/{symbol}/ticker: + get: + operationId: getTicker + summary: Get a ticker + description: Returns the latest 24-hour ticker for one market. + tags: [Market data] + security: [] + parameters: + - $ref: "#/components/parameters/Symbol" + responses: + "200": + description: Ticker returned successfully. + content: + application/json: + schema: + $ref: "#/components/schemas/Ticker" + "404": + $ref: "#/components/responses/MarketNotFound" + default: + $ref: "#/components/responses/RequestError" + /markets/{symbol}/orderbook: + get: + operationId: getOrderBook + summary: Get an order-book snapshot + description: Returns an aggregated order-book snapshot for one market. + tags: [Market data] + security: [] + parameters: + - $ref: "#/components/parameters/Symbol" + responses: + "200": + description: Order-book snapshot returned successfully. + content: + application/json: + schema: + $ref: "#/components/schemas/OrderBook" + "404": + $ref: "#/components/responses/MarketNotFound" + default: + $ref: "#/components/responses/RequestError" + /markets/{symbol}/trades: + get: + operationId: listPublicTrades + summary: List public trades + description: Returns recent public fills for one market, newest first. + tags: [Market data] + security: [] + parameters: + - $ref: "#/components/parameters/Symbol" + - name: limit + in: query + description: Maximum number of trades to return. + schema: + type: integer + minimum: 1 + maximum: 500 + default: 50 + responses: + "200": + description: Trades returned successfully. + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/PublicTrade" + "404": + $ref: "#/components/responses/MarketNotFound" + default: + $ref: "#/components/responses/RequestError" + /markets/{symbol}/candles: + get: + operationId: listCandles + summary: List candles + description: Returns historical OHLCV candles in chronological order. + tags: [Market data] + security: [] + parameters: + - $ref: "#/components/parameters/Symbol" + - name: interval + in: query + description: Candle interval. + schema: + type: string + enum: [1m, 5m, 15m, 30m, 1H, 4H, 1D] + default: 15m + responses: + "200": + description: Candles returned successfully. + content: + application/json: + schema: + type: object + required: [data] + properties: + data: + type: array + items: + $ref: "#/components/schemas/Candle" + "404": + $ref: "#/components/responses/MarketNotFound" + default: + $ref: "#/components/responses/RequestError" + /orders: + get: + operationId: listOrders + summary: List order history + description: | + Returns the caller's orders, newest first. + + Requires the `ORDER_READ` scope. + tags: [Trading] + security: + - ApiKeyAuth: [] + parameters: + - name: symbol + in: query + description: Return orders for this market only. + schema: + type: string + example: SOL_USD + - name: status + in: query + description: Return orders with this status only. + schema: + $ref: "#/components/schemas/OrderStatus" + - name: limit + in: query + description: Maximum number of orders to return. + schema: + type: integer + minimum: 1 + default: 10 + - name: page + in: query + description: One-based results page. + schema: + type: integer + minimum: 1 + default: 1 + responses: + "200": + description: Orders returned successfully. + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Order" + default: + $ref: "#/components/responses/RequestError" + post: + operationId: createOrder + summary: Create an order + description: | + Creates a limit or market order. The account's email must be verified. + + Requires the `ORDER_CREATE` scope. + tags: [Trading] + security: + - ApiKeyAuth: [] + requestBody: + required: true + content: + application/json: + schema: + oneOf: + - $ref: "#/components/schemas/LimitOrderRequest" + - $ref: "#/components/schemas/MarketOrderRequest" + discriminator: + propertyName: type + examples: + limit: + summary: Limit buy + value: + symbol: SOL_USD + side: BUY + type: LIMIT + price: "125.50" + qty: "2.00" + market: + summary: Market buy + value: + symbol: SOL_USD + side: BUY + type: MARKET + qty: "1.00" + responses: + "201": + description: Order accepted by the matching engine. + content: + application/json: + schema: + $ref: "#/components/schemas/Order" + "404": + $ref: "#/components/responses/MarketNotFound" + "422": + $ref: "#/components/responses/OrderRejected" + default: + $ref: "#/components/responses/RequestError" + /orders/open: + get: + operationId: listOpenOrders + summary: List open orders + description: | + Returns every open and partially filled order owned by the caller. + + Requires the `ORDER_READ` scope. + tags: [Trading] + security: + - ApiKeyAuth: [] + responses: + "200": + description: Open orders returned successfully. + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Order" + default: + $ref: "#/components/responses/RequestError" + /orders/{orderId}: + get: + operationId: getOrder + summary: Get an order + description: | + Returns one order owned by the caller. + + Requires the `ORDER_READ` scope. + tags: [Trading] + security: + - ApiKeyAuth: [] + parameters: + - $ref: "#/components/parameters/OrderId" + responses: + "200": + description: Order returned successfully. + content: + application/json: + schema: + $ref: "#/components/schemas/Order" + "404": + $ref: "#/components/responses/OrderNotFound" + default: + $ref: "#/components/responses/RequestError" + delete: + operationId: cancelOrder + summary: Cancel an order + description: | + Cancels the unfilled portion of an open order. The account's email must be verified. + + Requires the `ORDER_CANCEL` scope. + tags: [Trading] + security: + - ApiKeyAuth: [] + parameters: + - $ref: "#/components/parameters/OrderId" + responses: + "200": + description: Order cancelled successfully. + content: + application/json: + schema: + oneOf: + - $ref: "#/components/schemas/CancelledOrder" + - type: object + required: [message] + properties: + message: + type: string + examples: + cancelled: + value: + id: order_123 + symbol: SOL_USD + status: CANCELLED + side: BUY + qty: "2.00" + filledQty: "0.50" + releasedFunds: "188.25" + "404": + $ref: "#/components/responses/OrderNotFound" + "409": + $ref: "#/components/responses/OrderNotCancellable" + default: + $ref: "#/components/responses/RequestError" + /trades: + get: + operationId: listPrivateTrades + summary: List private trades + description: | + Returns fills involving the caller, newest first. + + Requires the `ORDER_READ` scope. + tags: [Account] + security: + - ApiKeyAuth: [] + parameters: + - name: limit + in: query + description: Maximum number of trades to return. + schema: + type: integer + minimum: 1 + maximum: 500 + default: 100 + responses: + "200": + description: Private trades returned successfully. + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/PrivateTrade" + default: + $ref: "#/components/responses/RequestError" + /balances: + get: + operationId: listBalances + summary: List balances + description: | + Returns available and locked balances, optionally filtered to one asset. + + Requires the `ACCOUNT_READ` scope. + tags: [Account] + security: + - ApiKeyAuth: [] + parameters: + - name: asset + in: query + description: Return this asset only. + schema: + type: string + example: USD + responses: + "200": + description: Balances returned successfully. + content: + application/json: + schema: + $ref: "#/components/schemas/Balances" + example: + USD: + available: "9748.50" + locked: "251.50" + SOL: + available: "2.00" + locked: "0.00" + "404": + $ref: "#/components/responses/AssetNotFound" + default: + $ref: "#/components/responses/RequestError" + /portfolio: + get: + operationId: getPortfolio + summary: Get portfolio performance + description: | + Returns valued positions and performance relative to the account's PnL baseline. + + Requires the `ACCOUNT_READ` scope. + tags: [Account] + security: + - ApiKeyAuth: [] + responses: + "200": + description: Portfolio returned successfully. + content: + application/json: + schema: + $ref: "#/components/schemas/Portfolio" + "503": + $ref: "#/components/responses/PortfolioUnavailable" + default: + $ref: "#/components/responses/RequestError" +components: + securitySchemes: + ApiKeyAuth: + type: apiKey + in: header + name: x-api-key + description: A scoped API key created in the PaperDrill dashboard. + parameters: + Symbol: + name: symbol + in: path + required: true + description: Market symbol in underscore form. + schema: + type: string + example: SOL_USD + OrderId: + name: orderId + in: path + required: true + description: Order identifier. + schema: + type: string + example: order_123 + schemas: + DecimalString: + type: string + pattern: '^\d+(\.\d+)?$' + description: A non-negative decimal encoded as a string. + example: "125.50" + SignedDecimalString: + type: string + pattern: '^[+-]?\d+(\.\d+)?$' + description: A signed decimal encoded as a string. + example: "+3.40" + NullableDecimalString: + oneOf: + - $ref: "#/components/schemas/DecimalString" + - type: "null" + NullableSignedDecimalString: + oneOf: + - $ref: "#/components/schemas/SignedDecimalString" + - type: "null" + Side: + type: string + enum: [BUY, SELL] + OrderType: + type: string + enum: [LIMIT, MARKET] + OrderStatus: + type: string + enum: [OPEN, PARTIALLY_FILLED, FILLED, CANCELLED] + Market: + type: object + required: [id, name, symbol, baseAsset, quoteAsset, pricePrecision, qtyPrecision] + properties: + id: + type: string + name: + type: string + symbol: + type: string + example: SOL_USD + baseAsset: + type: string + example: SOL + quoteAsset: + type: string + example: USD + pricePrecision: + type: integer + minimum: 0 + qtyPrecision: + type: integer + minimum: 0 + Ticker: + type: object + required: + - event + - symbol + - lastPrice + - openPrice + - high + - low + - volume + - quoteVolume + - priceChange + - priceChangePercent + - timestamp + properties: + event: + type: string + const: ticker + symbol: + type: string + example: SOL_USD + lastPrice: + $ref: "#/components/schemas/NullableDecimalString" + openPrice: + $ref: "#/components/schemas/NullableDecimalString" + high: + $ref: "#/components/schemas/NullableDecimalString" + low: + $ref: "#/components/schemas/NullableDecimalString" + volume: + $ref: "#/components/schemas/NullableDecimalString" + quoteVolume: + $ref: "#/components/schemas/NullableDecimalString" + priceChange: + $ref: "#/components/schemas/NullableSignedDecimalString" + priceChangePercent: + type: [number, "null"] + timestamp: + type: string + format: date-time + example: + event: ticker + symbol: SOL_USD + lastPrice: "125.50" + openPrice: "122.10" + high: "128.00" + low: "120.25" + volume: "340.50" + quoteVolume: "42540.75" + priceChange: "+3.40" + priceChangePercent: 2.78 + timestamp: "2026-09-19T12:00:00.000Z" + DepthLevel: + type: object + required: [price, qty] + properties: + price: + $ref: "#/components/schemas/DecimalString" + qty: + $ref: "#/components/schemas/DecimalString" + OrderBook: + type: object + required: [symbol, bids, asks, lastUpdateId, timestamp] + properties: + symbol: + type: string + bids: + type: array + description: Price levels sorted from highest to lowest. + items: + $ref: "#/components/schemas/DepthLevel" + asks: + type: array + description: Price levels sorted from lowest to highest. + items: + $ref: "#/components/schemas/DepthLevel" + lastUpdateId: + type: integer + timestamp: + type: integer + format: int64 + description: Unix milliseconds. + PublicTrade: + type: object + required: + - id + - symbol + - price + - qty + - buyOrderId + - sellOrderId + - buyerId + - sellerId + - isBuyerMaker + - createdAt + properties: + id: + type: string + symbol: + type: string + price: + $ref: "#/components/schemas/DecimalString" + qty: + $ref: "#/components/schemas/DecimalString" + buyOrderId: + type: string + sellOrderId: + type: string + buyerId: + type: string + sellerId: + type: string + isBuyerMaker: + type: boolean + createdAt: + type: integer + format: int64 + description: Unix milliseconds. + Candle: + type: object + required: [time, symbol, open, high, low, close, volume] + properties: + time: + type: integer + format: int64 + description: Candle start time in Unix milliseconds. + symbol: + type: string + open: + $ref: "#/components/schemas/DecimalString" + high: + $ref: "#/components/schemas/DecimalString" + low: + $ref: "#/components/schemas/DecimalString" + close: + $ref: "#/components/schemas/DecimalString" + volume: + $ref: "#/components/schemas/DecimalString" + LimitOrderRequest: + type: object + additionalProperties: false + required: [symbol, side, type, price, qty] + properties: + symbol: + type: string + example: SOL_USD + side: + $ref: "#/components/schemas/Side" + type: + type: string + const: LIMIT + price: + $ref: "#/components/schemas/DecimalString" + qty: + $ref: "#/components/schemas/DecimalString" + MarketOrderRequest: + type: object + additionalProperties: false + required: [symbol, side, type, qty] + properties: + symbol: + type: string + example: SOL_USD + side: + $ref: "#/components/schemas/Side" + type: + type: string + const: MARKET + qty: + $ref: "#/components/schemas/DecimalString" + Order: + type: object + required: [id, userId, symbol, side, type, status, qty, filledQty, createdAt] + properties: + id: + type: string + userId: + type: string + symbol: + type: string + side: + $ref: "#/components/schemas/Side" + type: + $ref: "#/components/schemas/OrderType" + status: + $ref: "#/components/schemas/OrderStatus" + price: + $ref: "#/components/schemas/DecimalString" + description: Present for limit orders. + qty: + $ref: "#/components/schemas/DecimalString" + filledQty: + $ref: "#/components/schemas/DecimalString" + averagePrice: + $ref: "#/components/schemas/DecimalString" + description: Present after at least one fill. + createdAt: + type: string + format: date-time + example: + id: order_123 + userId: user_123 + symbol: SOL_USD + side: BUY + type: LIMIT + status: PARTIALLY_FILLED + price: "125.50" + qty: "2.00" + filledQty: "0.50" + averagePrice: "125.25" + createdAt: "2026-09-19T10:00:00.000Z" + CancelledOrder: + type: object + required: [id, symbol, status, side, qty, filledQty, releasedFunds] + properties: + id: + type: string + symbol: + type: string + status: + type: string + const: CANCELLED + side: + $ref: "#/components/schemas/Side" + qty: + $ref: "#/components/schemas/DecimalString" + filledQty: + $ref: "#/components/schemas/DecimalString" + releasedFunds: + $ref: "#/components/schemas/DecimalString" + PrivateTrade: + type: object + required: [id, symbol, price, qty, side, isMaker, orderId, createdAt] + properties: + id: + type: string + symbol: + type: string + price: + $ref: "#/components/schemas/DecimalString" + qty: + $ref: "#/components/schemas/DecimalString" + side: + $ref: "#/components/schemas/Side" + isMaker: + type: boolean + orderId: + type: string + createdAt: + type: string + format: date-time + Balance: + type: object + required: [available, locked] + properties: + available: + $ref: "#/components/schemas/DecimalString" + locked: + $ref: "#/components/schemas/DecimalString" + Balances: + type: object + additionalProperties: + $ref: "#/components/schemas/Balance" + PortfolioPosition: + type: object + required: [asset, available, locked, total, markPrice, value] + properties: + asset: + type: string + available: + $ref: "#/components/schemas/DecimalString" + locked: + $ref: "#/components/schemas/DecimalString" + total: + $ref: "#/components/schemas/DecimalString" + markPrice: + $ref: "#/components/schemas/DecimalString" + value: + $ref: "#/components/schemas/DecimalString" + Portfolio: + type: object + required: + - quoteAsset + - equity + - baselineEquity + - pnl + - pnlPercent + - baselineAt + - asOf + - partial + - positions + properties: + quoteAsset: + type: string + equity: + $ref: "#/components/schemas/DecimalString" + baselineEquity: + $ref: "#/components/schemas/DecimalString" + pnl: + $ref: "#/components/schemas/SignedDecimalString" + pnlPercent: + $ref: "#/components/schemas/SignedDecimalString" + baselineAt: + type: string + format: date-time + asOf: + type: string + format: date-time + partial: + type: boolean + positions: + type: array + items: + $ref: "#/components/schemas/PortfolioPosition" + ApiErrorDetail: + type: object + required: [message] + properties: + field: + type: string + message: + type: string + ApiError: + type: object + required: [error, requestId] + properties: + error: + type: object + required: [code, message] + properties: + code: + type: string + message: + type: string + details: + type: array + items: + $ref: "#/components/schemas/ApiErrorDetail" + requestId: + type: string + format: uuid + example: + error: + code: VALIDATION_ERROR + message: Request validation failed + details: + - field: qty + message: invalid decimal format + requestId: f4c0baf4-b8d2-4c9a-a17b-c8656c4a7b0e + responses: + RequestError: + description: The request failed. See Errors and rate limits for recovery guidance. + content: + application/json: + schema: + $ref: "#/components/schemas/ApiError" + MarketNotFound: + description: The market does not exist. + content: + application/json: + schema: + $ref: "#/components/schemas/ApiError" + OrderNotFound: + description: The order does not exist or is not owned by the caller. + content: + application/json: + schema: + $ref: "#/components/schemas/ApiError" + AssetNotFound: + description: The requested asset does not exist. + content: + application/json: + schema: + $ref: "#/components/schemas/ApiError" + OrderNotCancellable: + description: The order can no longer be cancelled. + content: + application/json: + schema: + $ref: "#/components/schemas/ApiError" + OrderRejected: + description: The order was rejected because of balance, liquidity, or matching constraints. + content: + application/json: + schema: + $ref: "#/components/schemas/ApiError" + PortfolioUnavailable: + description: Portfolio valuation or its baseline is temporarily unavailable. + content: + application/json: + schema: + $ref: "#/components/schemas/ApiError" diff --git a/docs/orderbook.mdx b/docs/orderbook.mdx new file mode 100644 index 0000000..d93ab7a --- /dev/null +++ b/docs/orderbook.mdx @@ -0,0 +1,70 @@ +--- +title: "Maintain a local order book" +description: "Read an aggregated snapshot and apply live depth updates safely." +--- + +Use the REST snapshot when you need the current book once. Combine it with the `depth:SYMBOL` WebSocket stream when your application must maintain a live local copy. + +## Read a snapshot + +```bash +curl https://api.paperdrill.dev/v1/markets/SOL_USD/orderbook +``` + +```json +{ + "symbol": "SOL_USD", + "bids": [ + { "price": "125.40", "qty": "8.50" }, + { "price": "125.20", "qty": "4.00" } + ], + "asks": [ + { "price": "125.60", "qty": "3.25" }, + { "price": "125.80", "qty": "6.00" } + ], + "lastUpdateId": 1842, + "timestamp": 1789812000000 +} +``` + +Bids are sorted from highest to lowest price. Asks are sorted from lowest to highest. Each level contains the total remaining quantity at that price; individual orders are not exposed. + +## Combine the snapshot and stream + +The depth stream contains only levels that changed, so it cannot initialize a complete book by itself. + + + + Connect to [WebSocket streams](/websocket), subscribe to `depth:SYMBOL`, and buffer every + message without applying it yet. + + + Request `GET /markets/:symbol/orderbook` while buffering continues. + + + Discard buffered messages whose `lastUpdateId` is less than or equal to the snapshot's + `lastUpdateId`. + + + Apply the remaining buffered messages in arrival order, then apply new messages as they arrive. + + + +A depth update replaces the quantity at a price level; it is not a delta to add. Remove the level when the received quantity represents zero. + +```json +{ + "event": "depth", + "symbol": "SOL_USD", + "bids": [{ "price": "125.40", "qty": "0.00" }], + "asks": [], + "lastUpdateId": 1843, + "timestamp": 1789812000100 +} +``` + +Store prices as strings or scaled integers rather than JavaScript numbers. A simple implementation can use one map for bids and another for asks, keyed by the exact price string. + +## Recover after a disconnect + +Do not continue from the old local book after reconnecting. Resubscribe, start buffering again, fetch a fresh snapshot, and repeat the synchronization procedure. diff --git a/docs/orders.mdx b/docs/orders.mdx new file mode 100644 index 0000000..b43f8b5 --- /dev/null +++ b/docs/orders.mdx @@ -0,0 +1,83 @@ +--- +title: "Place and manage orders" +description: "Choose an order type, handle fills, inspect status, and cancel remaining quantity." +--- + +PaperDrill supports limit and market orders. Before placing either type, read the market metadata and current book rather than hardcoding a symbol, price, or precision. + +Creating an order requires `ORDER_CREATE` and a verified account. Reading orders requires `ORDER_READ`; cancellation requires `ORDER_CANCEL` and a verified account. + +## Choose an order type + +| Type | Use it when | Price field | +| -------- | -------------------------------------------------------------------------- | ----------- | +| `LIMIT` | You want to set the highest buy price or lowest sell price you will accept | Required | +| `MARKET` | You want to trade immediately against available liquidity | Omitted | + +A limit order can execute immediately when it crosses the book. A market order can be partially filled when the book does not contain enough quantity. + +## Construct valid values + +Fetch `GET /markets` and locate the selected symbol. If `pricePrecision` and `qtyPrecision` are both `2`, values such as `"125.50"` and `"2.00"` are valid. + +Send decimals as JSON strings: + +```json +{ + "symbol": "SOL_USD", + "side": "BUY", + "type": "LIMIT", + "price": "125.50", + "qty": "2.00" +} +``` + +For a market order, set `type` to `MARKET` and omit `price`. + +## Use the returned status + +Do not assume a newly created order is open. The matching engine returns its current state: + +```text +OPEN → PARTIALLY_FILLED → FILLED + └───────────────┬────→ CANCELLED + └────→ CANCELLED +``` + +| Status | Meaning | +| ------------------ | ---------------------------------------------------- | +| `OPEN` | No quantity has filled and the remainder is resting | +| `PARTIALLY_FILLED` | Some quantity filled and the remainder is still open | +| `FILLED` | The complete quantity filled | +| `CANCELLED` | The remaining quantity was removed from the book | + +Use `filledQty` to determine how much executed. `averagePrice` appears after the first fill. + +## Inspect an order + +Read a specific order when you already have its ID: + +```bash +curl https://api.paperdrill.dev/v1/orders/ORDER_ID \ + --header "x-api-key: $PAPERDRILL_API_KEY" +``` + +Use `GET /orders/open` for every open or partially filled order. Use `GET /orders` for paginated history and optional `symbol` or `status` filters. + +## Cancel the remainder + +Cancellation affects only unfilled quantity. It does not reverse completed fills. + +```bash +curl --request DELETE https://api.paperdrill.dev/v1/orders/ORDER_ID \ + --header "x-api-key: $PAPERDRILL_API_KEY" +``` + +A filled or already cancelled order returns `409 ORDER_NOT_CANCELLABLE`. If a cancel request fails because of a network interruption, read the order before deciding what to do next. + + + Do not blindly retry order creation after a timeout. PaperDrill does not currently accept an + idempotency key, so a retry can create another order. Inspect order history first. + + +Use the generated **API reference** for complete request and response schemas. Continue to [Build a simple bot](/build-a-bot) for an end-to-end implementation. diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx new file mode 100644 index 0000000..a9274df --- /dev/null +++ b/docs/quickstart.mdx @@ -0,0 +1,158 @@ +--- +title: "Quickstart" +description: "Create an API key and complete your first PaperDrill order workflow." +--- + +In this workflow, you discover a market, inspect its order book, place a limit order, check its status, and cancel any unfilled quantity. + + + + Open [API keys](https://paperdrill.dev/settings/api-keys) and create a key with these scopes: + + - `ORDER_READ` + - `ORDER_CREATE` + - `ORDER_CANCEL` + + Copy the complete key when it appears. PaperDrill shows it only once. + + + + Set the key in your shell so you do not paste it into source code: + + ```bash + export PAPERDRILL_API_KEY="pdk_your_key_here" + ``` + + See [Authentication](/authentication) for permission and storage guidance. + + + + Never hardcode a symbol's precision. Fetch the market before constructing an order. + + + ```bash cURL + curl https://api.paperdrill.dev/v1/markets + ``` + + ```js JavaScript + const response = await fetch("https://api.paperdrill.dev/v1/markets"); + const { data: markets } = await response.json(); + console.log(markets); + ``` + + ```python Python + import requests + + response = requests.get("https://api.paperdrill.dev/v1/markets", timeout=10) + response.raise_for_status() + print(response.json()["data"]) + ``` + + + ```json + { + "data": [ + { + "symbol": "SOL_USD", + "baseAsset": "SOL", + "quoteAsset": "USD", + "pricePrecision": 2, + "qtyPrecision": 2 + } + ] + } + ``` + + For this market, `price` and `qty` accept up to two decimal places. Send both values as strings. + + + + ```bash + curl https://api.paperdrill.dev/v1/markets/SOL_USD/orderbook + ``` + + Choose a buy price below the best ask if you want the order to rest instead of executing immediately. The example below uses a deliberately low price; choose an appropriate value for the current book. + + + + + ```bash cURL + curl --request POST https://api.paperdrill.dev/v1/orders \ + --header "Content-Type: application/json" \ + --header "x-api-key: $PAPERDRILL_API_KEY" \ + --data '{ + "symbol": "SOL_USD", + "side": "BUY", + "type": "LIMIT", + "price": "1.00", + "qty": "1.00" + }' + ``` + + ```js JavaScript + const response = await fetch("https://api.paperdrill.dev/v1/orders", { + method: "POST", + headers: { + "Content-Type": "application/json", + "x-api-key": process.env.PAPERDRILL_API_KEY, + }, + body: JSON.stringify({ + symbol: "SOL_USD", + side: "BUY", + type: "LIMIT", + price: "1.00", + qty: "1.00", + }), + }); + + if (!response.ok) throw new Error(await response.text()); + console.log(await response.json()); + ``` + + ```python Python + import os + import requests + + response = requests.post( + "https://api.paperdrill.dev/v1/orders", + headers={"x-api-key": os.environ["PAPERDRILL_API_KEY"]}, + json={ + "symbol": "SOL_USD", + "side": "BUY", + "type": "LIMIT", + "price": "1.00", + "qty": "1.00", + }, + timeout=10, + ) + response.raise_for_status() + print(response.json()) + ``` + + + Save the returned `id`. A limit order can be `OPEN`, `PARTIALLY_FILLED`, or `FILLED` immediately, so always use the returned status. + + + + Replace `ORDER_ID` with the returned ID: + + ```bash + curl https://api.paperdrill.dev/v1/orders/ORDER_ID \ + --header "x-api-key: $PAPERDRILL_API_KEY" + ``` + + You can also request every open order with `GET /orders/open`. + + + + Only cancel an order whose status is `OPEN` or `PARTIALLY_FILLED`: + + ```bash + curl --request DELETE https://api.paperdrill.dev/v1/orders/ORDER_ID \ + --header "x-api-key: $PAPERDRILL_API_KEY" + ``` + + + + +Continue to [Place and manage orders](/orders) for order behavior or [Build a simple bot](/build-a-bot) for a complete TypeScript workflow. diff --git a/docs/style.css b/docs/style.css new file mode 100644 index 0000000..c66fb69 --- /dev/null +++ b/docs/style.css @@ -0,0 +1,3 @@ +#sidebar-content li[data-active] a { + background: transparent; +} \ No newline at end of file diff --git a/docs/trades.mdx b/docs/trades.mdx new file mode 100644 index 0000000..e0c21f0 --- /dev/null +++ b/docs/trades.mdx @@ -0,0 +1,44 @@ +--- +title: "Read trade history" +description: "Read recent public fills and distinguish them from your private trade history." +--- + +A trade is created when a buy order and sell order match. PaperDrill exposes a public market feed and a private history containing only your fills. + +## Read public trades + +`GET /markets/:symbol/trades` requires no authentication and returns recent fills newest first. + +```bash +curl "https://api.paperdrill.dev/v1/markets/SOL_USD/trades?limit=2" +``` + +```json +[ + { + "id": "fill_123", + "symbol": "SOL_USD", + "price": "125.50", + "qty": "1.25", + "buyOrderId": "buy_order_123", + "sellOrderId": "sell_order_123", + "buyerId": "buyer_123", + "sellerId": "seller_123", + "isBuyerMaker": false, + "createdAt": 1789812000000 + } +] +``` + +`isBuyerMaker` is `true` when the resting order was the buy order. `createdAt` is Unix milliseconds. A market with no fills returns an empty array. + +## Read your fills + +`GET /trades` requires `ORDER_READ` and returns only trades in which your account participated. Its response adds your `side`, whether your order was the maker, and your `orderId`. + +```bash +curl "https://api.paperdrill.dev/v1/trades?limit=20" \ + --header "x-api-key: $PAPERDRILL_API_KEY" +``` + +Public and private trade limits accept values from 1 through 500. Use the `trade:SYMBOL` [WebSocket stream](/websocket) for new public trades instead of repeatedly polling the REST endpoint. diff --git a/docs/websocket.mdx b/docs/websocket.mdx new file mode 100644 index 0000000..fee1371 --- /dev/null +++ b/docs/websocket.mdx @@ -0,0 +1,97 @@ +--- +title: "Subscribe to WebSocket streams" +description: "Consume live public trades, depth changes, tickers, and one-minute candles." +--- + +PaperDrill's public WebSocket streams market updates without authentication. + +```text +wss://api.paperdrill.dev +``` + +## Choose channels + +| Channel | Message | +| --------------- | ------------------------------------------------ | +| `trade:SYMBOL` | Completed public trade | +| `depth:SYMBOL` | Changed order-book levels only | +| `ticker:SYMBOL` | Updated rolling 24-hour statistics | +| `candle:SYMBOL` | Current one-minute candle, updated on each trade | + +Use the exact symbol returned by `GET /markets`. + +## Subscribe + +Send one `SUBSCRIBE` message after the connection opens. One message can contain multiple channels. + +```js +const channels = ["trade:SOL_USD", "ticker:SOL_USD"]; +const socket = new WebSocket("wss://api.paperdrill.dev"); + +socket.addEventListener("open", () => { + socket.send(JSON.stringify({ method: "SUBSCRIBE", params: channels })); +}); + +socket.addEventListener("message", ({ data }) => { + const message = JSON.parse(data); + console.log(message.event, message); +}); +``` + +The server does not send a subscription acknowledgement. Messages begin when the selected market changes. To stop receiving a channel, send the same params with `UNSUBSCRIBE`. + +## Interpret messages + +### Trades + +```json +{ + "event": "trade", + "symbol": "SOL_USD", + "id": "fill_123", + "price": "125.50", + "qty": "1.25", + "maker": false, + "timestamp": 1789812000000 +} +``` + +### Tickers and candles + +Ticker messages use the same shape as the REST ticker. Candle messages contain `time`, `symbol`, `open`, `high`, `low`, `close`, `volume`, and `event: "candle"`. + +### Depth + +Depth messages contain only changed levels. Follow the snapshot-and-buffer procedure in [Maintain a local order book](/orderbook); do not treat one depth message as a complete book. + +## Reconnect safely + +Connections can close during a deployment or network interruption. Reconnect with exponential backoff and jitter, then resubscribe to every desired channel. + +```js +const channels = ["trade:SOL_USD", "ticker:SOL_USD"]; +let attempt = 0; + +function connect() { + const socket = new WebSocket("wss://api.paperdrill.dev"); + + socket.addEventListener("open", () => { + attempt = 0; + socket.send(JSON.stringify({ method: "SUBSCRIBE", params: channels })); + }); + + socket.addEventListener("message", ({ data }) => { + const message = JSON.parse(data); + console.log(message); + }); + + socket.addEventListener("close", () => { + const delay = Math.min(30_000, 1_000 * 2 ** attempt++); + setTimeout(connect, delay + Math.random() * 500); + }); +} + +connect(); +``` + +Fetch a fresh REST snapshot after reconnecting before trusting a local order book. diff --git a/frontend/build.ts b/frontend/build.ts index 11e1ed9..4e2203a 100644 --- a/frontend/build.ts +++ b/frontend/build.ts @@ -33,7 +33,7 @@ Example: process.exit(0); } -const toCamelCase = (str: string): string => str.replace(/-([a-z])/g, (g) => g[1].toUpperCase()); +const toCamelCase = (str: string): string => str.replace(/-([a-z])/g, (g) => g[1]!.toUpperCase()); const parseValue = (value: string): any => { if (value === "true") return true; @@ -48,7 +48,7 @@ const parseValue = (value: string): any => { }; function parseArgs(): Partial { - const config: Partial = {}; + const config: Record = {}; const args = process.argv.slice(2); for (let i = 0; i < args.length; i++) { @@ -81,7 +81,7 @@ function parseArgs(): Partial { key = toCamelCase(key); if (key.includes(".")) { - const [parentKey, childKey] = key.split("."); + const [parentKey, childKey] = key.split(".") as [string, string]; config[parentKey] = config[parentKey] || {}; config[parentKey][childKey] = parseValue(value); } else { @@ -89,7 +89,7 @@ function parseArgs(): Partial { } } - return config; + return config as Partial; } const formatFileSize = (bytes: number): string => { @@ -102,7 +102,7 @@ const formatFileSize = (bytes: number): string => { unitIndex++; } - return `${size.toFixed(2)} ${units[unitIndex]}`; + return `${size.toFixed(2)} ${units[unitIndex]!}`; }; console.log("\n🚀 Starting build process...\n"); diff --git a/frontend/bun.lock b/frontend/bun.lock index bc00a00..f25a8a3 100644 --- a/frontend/bun.lock +++ b/frontend/bun.lock @@ -13,16 +13,13 @@ "bun-plugin-tailwind": "^0.1.2", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", - "highlight.js": "^11.12.0", "lightweight-charts": "^5.2.0", "lucide-react": "^1.31.0", "posthog-js": "^1.434.2", "radix-ui": "^1.6.0", "react": "^19", "react-dom": "^19", - "react-markdown": "^10.1.0", "react-router-dom": "^7.17.0", - "remark-gfm": "^4.0.1", "shadcn": "^4.16.2", "sonner": "^2.0.7", "tailwind-merge": "^3.6.0", @@ -297,18 +294,6 @@ "@types/bun": ["@types/bun@1.3.14", "", { "dependencies": { "bun-types": "1.3.14" } }, "sha512-h1hFqFVcvAvD9j9K7ZW7vd82aSA+rTdznZa+5bwvCwqSB1jmmfLcbIWhOLx1/+boy/xmjgCs/OMUL8hRJSmnPw=="], - "@types/debug": ["@types/debug@4.1.13", "", { "dependencies": { "@types/ms": "*" } }, "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw=="], - - "@types/estree": ["@types/estree@1.0.9", "", {}, "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg=="], - - "@types/estree-jsx": ["@types/estree-jsx@1.0.5", "", { "dependencies": { "@types/estree": "*" } }, "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg=="], - - "@types/hast": ["@types/hast@3.0.5", "", { "dependencies": { "@types/unist": "*" } }, "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g=="], - - "@types/mdast": ["@types/mdast@4.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA=="], - - "@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="], - "@types/node": ["@types/node@25.9.3", "", { "dependencies": { "undici-types": ">=7.24.0 <7.24.7" } }, "sha512-603BddQMv3pUcr4U2dhujk83N2tTDVr/34wII2B6bJy6g+8WD6yUb11jszNs0gdi4PesVWl7ABt8nYMVpnLUcg=="], "@types/react": ["@types/react@19.2.17", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw=="], @@ -317,12 +302,8 @@ "@types/trusted-types": ["@types/trusted-types@2.0.7", "", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="], - "@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="], - "@types/validate-npm-package-name": ["@types/validate-npm-package-name@4.0.2", "", {}, "sha512-lrpDziQipxCEeK5kWxvljWYhUvOiB2A9izZd9B2AFarYAkqZshb4lPbRs7zKEic6eGtH8V/2qJW+dPp9OtF6bw=="], - "@ungap/structured-clone": ["@ungap/structured-clone@1.4.0", "", {}, "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ=="], - "accepts": ["accepts@2.0.0", "", { "dependencies": { "mime-types": "^3.0.0", "negotiator": "^1.0.0" } }, "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng=="], "ajv": ["ajv@8.20.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA=="], @@ -341,8 +322,6 @@ "atomically": ["atomically@1.7.0", "", {}, "sha512-Xcz9l0z7y9yQ9rdDaxlmaI4uJHf/T8g9hOEzJcsEqX2SjCj4J20uK7+ldkDHMbpJDK76wF7xEIgxc/vSlsfw5w=="], - "bail": ["bail@2.0.2", "", {}, "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw=="], - "balanced-match": ["balanced-match@4.0.4", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="], "baseline-browser-mapping": ["baseline-browser-mapping@2.11.13", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-k9HNuUVMlqVjQ9UHzfPjIqiDbWw7WqT1AoT7GL8VwvF3r0ZfArtgiSPAlmupyNquNgOJHTuH4CKYf8ttMTWBTQ=="], @@ -373,18 +352,8 @@ "caniuse-lite": ["caniuse-lite@1.0.30001809", "", {}, "sha512-xxWVywk6a6Arlk+hymeycyn/VgqEfLDxupvhH/xiY5SJ/18kmi9o6MiO320DCUzypORHLtvh0I4i04tUhCNHNQ=="], - "ccount": ["ccount@2.0.1", "", {}, "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg=="], - "chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="], - "character-entities": ["character-entities@2.0.2", "", {}, "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ=="], - - "character-entities-html4": ["character-entities-html4@2.1.0", "", {}, "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA=="], - - "character-entities-legacy": ["character-entities-legacy@3.0.0", "", {}, "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ=="], - - "character-reference-invalid": ["character-reference-invalid@2.0.1", "", {}, "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw=="], - "class-variance-authority": ["class-variance-authority@0.7.1", "", { "dependencies": { "clsx": "^2.1.1" } }, "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg=="], "cli-cursor": ["cli-cursor@5.0.0", "", { "dependencies": { "restore-cursor": "^5.0.0" } }, "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw=="], @@ -395,8 +364,6 @@ "code-block-writer": ["code-block-writer@13.0.3", "", {}, "sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg=="], - "comma-separated-tokens": ["comma-separated-tokens@2.0.3", "", {}, "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg=="], - "commander": ["commander@14.0.3", "", {}, "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw=="], "conf": ["conf@10.2.0", "", { "dependencies": { "ajv": "^8.6.3", "ajv-formats": "^2.1.1", "atomically": "^1.7.0", "debounce-fn": "^4.0.0", "dot-prop": "^6.0.1", "env-paths": "^2.2.1", "json-schema-typed": "^7.0.3", "onetime": "^5.1.2", "pkg-up": "^3.1.0", "semver": "^7.3.5" } }, "sha512-8fLl9F04EJqjSqH+QjITQfJF8BrOVaYr1jewVgSRAEWePfxT0sku4w2hrGQ60BC/TNLGQ2pgxNlTbWQmMPFvXg=="], @@ -427,8 +394,6 @@ "debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="], - "decode-named-character-reference": ["decode-named-character-reference@1.3.0", "", { "dependencies": { "character-entities": "^2.0.0" } }, "sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q=="], - "dedent": ["dedent@1.7.2", "", { "peerDependencies": { "babel-plugin-macros": "^3.1.0" }, "optionalPeers": ["babel-plugin-macros"] }, "sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA=="], "deepmerge": ["deepmerge@4.3.1", "", {}, "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="], @@ -441,12 +406,8 @@ "depd": ["depd@2.0.0", "", {}, "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="], - "dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="], - "detect-node-es": ["detect-node-es@1.1.0", "", {}, "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ=="], - "devlop": ["devlop@1.1.0", "", { "dependencies": { "dequal": "^2.0.0" } }, "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA=="], - "diff": ["diff@8.0.4", "", {}, "sha512-DPi0FmjiSU5EvQV0++GFDOJ9ASQUVFh5kD+OzOnYdi7n3Wpm9hWWGfB/O2blfHcMVTL5WkQXSnRiK9makhrcnw=="], "dompurify": ["dompurify@3.4.15", "", { "optionalDependencies": { "@types/trusted-types": "^2.0.7" } }, "sha512-EUBjM+B+lkDE41iE82DDSCfkoPGfXx8IxFxPMjNzm/Uk4xDet77rTN9wqlxlVg71kK7XGuUMv6wUxJUwwv+Xyw=="], @@ -481,12 +442,8 @@ "escape-html": ["escape-html@1.0.3", "", {}, "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="], - "escape-string-regexp": ["escape-string-regexp@5.0.0", "", {}, "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="], - "esprima": ["esprima@4.0.1", "", { "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" } }, "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="], - "estree-util-is-identifier-name": ["estree-util-is-identifier-name@3.0.0", "", {}, "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg=="], - "etag": ["etag@1.8.1", "", {}, "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="], "eventsource": ["eventsource@3.0.7", "", { "dependencies": { "eventsource-parser": "^3.0.1" } }, "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA=="], @@ -499,8 +456,6 @@ "express-rate-limit": ["express-rate-limit@8.6.2", "", { "dependencies": { "debug": "^4.4.3", "ip-address": "^10.2.0" }, "peerDependencies": { "express": ">= 4.11" } }, "sha512-YH4ru+eOJxQABscKFfRCy9R7x9QFGdezclVMwwgFFndzS2Xnm0uo6B0ABZsLhcpeptGv2qvuJVWlQr9gQZoC3A=="], - "extend": ["extend@3.0.2", "", {}, "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="], - "fancy-canvas": ["fancy-canvas@2.1.0", "", {}, "sha512-nifxXJ95JNLFR2NgRV4/MxVP45G9909wJTEKz5fg/TZS20JJZA6hfgRVh/bC9bwl2zBtBNcYPjiBE4njQHVBwQ=="], "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], @@ -557,16 +512,8 @@ "hasown": ["hasown@2.0.4", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A=="], - "hast-util-to-jsx-runtime": ["hast-util-to-jsx-runtime@2.3.6", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "comma-separated-tokens": "^2.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "hast-util-whitespace": "^3.0.0", "mdast-util-mdx-expression": "^2.0.0", "mdast-util-mdx-jsx": "^3.0.0", "mdast-util-mdxjs-esm": "^2.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "style-to-js": "^1.0.0", "unist-util-position": "^5.0.0", "vfile-message": "^4.0.0" } }, "sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg=="], - - "hast-util-whitespace": ["hast-util-whitespace@3.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw=="], - - "highlight.js": ["highlight.js@11.12.0", "", {}, "sha512-nbfWpyRMcMrPMmDwJB+dhX/eiaPKtc2RB+0QZskqJ3WjRA/FDS0e9hZrx8EC/lbEv8gXy98FcDbNa/dspAaJMg=="], - "hono": ["hono@4.13.1", "", {}, "sha512-kdJoFVv2xmayw6cY09H7AbMJMt8Jn5jdlEdXsP7AGBdF2DIptVlKlOLKXP41yPip4/a3yQPv9gVcJYI8YY04dw=="], - "html-url-attributes": ["html-url-attributes@3.0.1", "", {}, "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ=="], - "http-errors": ["http-errors@2.0.1", "", { "dependencies": { "depd": "~2.0.0", "inherits": "~2.0.4", "setprototypeof": "~1.2.0", "statuses": "~2.0.2", "toidentifier": "~1.0.1" } }, "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ=="], "human-signals": ["human-signals@8.0.1", "", {}, "sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ=="], @@ -579,28 +526,18 @@ "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], - "inline-style-parser": ["inline-style-parser@0.2.7", "", {}, "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA=="], - "ip-address": ["ip-address@10.5.0", "", {}, "sha512-R5SnVLJmgYYvf2F2ZgwSBnelz5G4q5AxIC277GDfUaNbrZKNANcBC7RHqYYePlszf4kBolVkJauG0ZjHHFh55g=="], "ipaddr.js": ["ipaddr.js@1.9.1", "", {}, "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="], - "is-alphabetical": ["is-alphabetical@2.0.1", "", {}, "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ=="], - - "is-alphanumerical": ["is-alphanumerical@2.0.1", "", { "dependencies": { "is-alphabetical": "^2.0.0", "is-decimal": "^2.0.0" } }, "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw=="], - "is-arrayish": ["is-arrayish@0.2.1", "", {}, "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="], - "is-decimal": ["is-decimal@2.0.1", "", {}, "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A=="], - "is-docker": ["is-docker@2.2.1", "", { "bin": { "is-docker": "cli.js" } }, "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ=="], "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="], "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="], - "is-hexadecimal": ["is-hexadecimal@2.0.1", "", {}, "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg=="], - "is-in-ssh": ["is-in-ssh@1.0.0", "", {}, "sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw=="], "is-inside-container": ["is-inside-container@1.0.0", "", { "dependencies": { "is-docker": "^3.0.0" }, "bin": { "is-inside-container": "cli.js" } }, "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA=="], @@ -653,46 +590,12 @@ "log-symbols": ["log-symbols@6.0.0", "", { "dependencies": { "chalk": "^5.3.0", "is-unicode-supported": "^1.3.0" } }, "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw=="], - "longest-streak": ["longest-streak@3.1.0", "", {}, "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g=="], - "lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="], "lucide-react": ["lucide-react@1.31.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-G8u2eEtoHUnUa9f8lbvqDhCiORMnYLdUEo06EEG9MQvHQrInKcX3Pa2TH39MM5qyzRcWETxB0+aOwAPI1g1kEg=="], - "markdown-table": ["markdown-table@3.0.4", "", {}, "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw=="], - "math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="], - "mdast-util-find-and-replace": ["mdast-util-find-and-replace@3.0.2", "", { "dependencies": { "@types/mdast": "^4.0.0", "escape-string-regexp": "^5.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.0.0" } }, "sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg=="], - - "mdast-util-from-markdown": ["mdast-util-from-markdown@2.0.3", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "mdast-util-to-string": "^4.0.0", "micromark": "^4.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-W4mAWTvSlKvf8L6J+VN9yLSqQ9AOAAvHuoDAmPkz4dHf553m5gVj2ejadHJhoJmcmxEnOv6Pa8XJhpxE93kb8Q=="], - - "mdast-util-gfm": ["mdast-util-gfm@3.1.0", "", { "dependencies": { "mdast-util-from-markdown": "^2.0.0", "mdast-util-gfm-autolink-literal": "^2.0.0", "mdast-util-gfm-footnote": "^2.0.0", "mdast-util-gfm-strikethrough": "^2.0.0", "mdast-util-gfm-table": "^2.0.0", "mdast-util-gfm-task-list-item": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ=="], - - "mdast-util-gfm-autolink-literal": ["mdast-util-gfm-autolink-literal@2.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "ccount": "^2.0.0", "devlop": "^1.0.0", "mdast-util-find-and-replace": "^3.0.0", "micromark-util-character": "^2.0.0" } }, "sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ=="], - - "mdast-util-gfm-footnote": ["mdast-util-gfm-footnote@2.1.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.1.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0" } }, "sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ=="], - - "mdast-util-gfm-strikethrough": ["mdast-util-gfm-strikethrough@2.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg=="], - - "mdast-util-gfm-table": ["mdast-util-gfm-table@2.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "markdown-table": "^3.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg=="], - - "mdast-util-gfm-task-list-item": ["mdast-util-gfm-task-list-item@2.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ=="], - - "mdast-util-mdx-expression": ["mdast-util-mdx-expression@2.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ=="], - - "mdast-util-mdx-jsx": ["mdast-util-mdx-jsx@3.2.0", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "devlop": "^1.1.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0", "parse-entities": "^4.0.0", "stringify-entities": "^4.0.0", "unist-util-stringify-position": "^4.0.0", "vfile-message": "^4.0.0" } }, "sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q=="], - - "mdast-util-mdxjs-esm": ["mdast-util-mdxjs-esm@2.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg=="], - - "mdast-util-phrasing": ["mdast-util-phrasing@4.1.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "unist-util-is": "^6.0.0" } }, "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w=="], - - "mdast-util-to-hast": ["mdast-util-to-hast@13.2.1", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@ungap/structured-clone": "^1.0.0", "devlop": "^1.0.0", "micromark-util-sanitize-uri": "^2.0.0", "trim-lines": "^3.0.0", "unist-util-position": "^5.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA=="], - - "mdast-util-to-markdown": ["mdast-util-to-markdown@2.1.2", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "longest-streak": "^3.0.0", "mdast-util-phrasing": "^4.0.0", "mdast-util-to-string": "^4.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "unist-util-visit": "^5.0.0", "zwitch": "^2.0.0" } }, "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA=="], - - "mdast-util-to-string": ["mdast-util-to-string@4.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0" } }, "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg=="], - "media-typer": ["media-typer@1.1.1", "", {}, "sha512-yz3xRaG20c6/BOzvYoDaGtPmGscs7YivItZEEqe6GbwNfHuxu9YNmvnEkMzKldAGY4/80pRcQRZSEnhquk9XuQ=="], "merge-descriptors": ["merge-descriptors@2.0.0", "", {}, "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g=="], @@ -701,62 +604,6 @@ "merge2": ["merge2@1.4.1", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="], - "micromark": ["micromark@4.0.2", "", { "dependencies": { "@types/debug": "^4.0.0", "debug": "^4.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA=="], - - "micromark-core-commonmark": ["micromark-core-commonmark@2.0.3", "", { "dependencies": { "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-factory-destination": "^2.0.0", "micromark-factory-label": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-factory-title": "^2.0.0", "micromark-factory-whitespace": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-html-tag-name": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg=="], - - "micromark-extension-gfm": ["micromark-extension-gfm@3.0.0", "", { "dependencies": { "micromark-extension-gfm-autolink-literal": "^2.0.0", "micromark-extension-gfm-footnote": "^2.0.0", "micromark-extension-gfm-strikethrough": "^2.0.0", "micromark-extension-gfm-table": "^2.0.0", "micromark-extension-gfm-tagfilter": "^2.0.0", "micromark-extension-gfm-task-list-item": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w=="], - - "micromark-extension-gfm-autolink-literal": ["micromark-extension-gfm-autolink-literal@2.1.0", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw=="], - - "micromark-extension-gfm-footnote": ["micromark-extension-gfm-footnote@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw=="], - - "micromark-extension-gfm-strikethrough": ["micromark-extension-gfm-strikethrough@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw=="], - - "micromark-extension-gfm-table": ["micromark-extension-gfm-table@2.1.1", "", { "dependencies": { "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg=="], - - "micromark-extension-gfm-tagfilter": ["micromark-extension-gfm-tagfilter@2.0.0", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg=="], - - "micromark-extension-gfm-task-list-item": ["micromark-extension-gfm-task-list-item@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw=="], - - "micromark-factory-destination": ["micromark-factory-destination@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA=="], - - "micromark-factory-label": ["micromark-factory-label@2.0.1", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg=="], - - "micromark-factory-space": ["micromark-factory-space@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg=="], - - "micromark-factory-title": ["micromark-factory-title@2.0.1", "", { "dependencies": { "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw=="], - - "micromark-factory-whitespace": ["micromark-factory-whitespace@2.0.1", "", { "dependencies": { "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ=="], - - "micromark-util-character": ["micromark-util-character@2.1.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q=="], - - "micromark-util-chunked": ["micromark-util-chunked@2.0.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0" } }, "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA=="], - - "micromark-util-classify-character": ["micromark-util-classify-character@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q=="], - - "micromark-util-combine-extensions": ["micromark-util-combine-extensions@2.0.1", "", { "dependencies": { "micromark-util-chunked": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg=="], - - "micromark-util-decode-numeric-character-reference": ["micromark-util-decode-numeric-character-reference@2.0.2", "", { "dependencies": { "micromark-util-symbol": "^2.0.0" } }, "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw=="], - - "micromark-util-decode-string": ["micromark-util-decode-string@2.0.1", "", { "dependencies": { "decode-named-character-reference": "^1.0.0", "micromark-util-character": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-symbol": "^2.0.0" } }, "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ=="], - - "micromark-util-encode": ["micromark-util-encode@2.0.1", "", {}, "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw=="], - - "micromark-util-html-tag-name": ["micromark-util-html-tag-name@2.0.1", "", {}, "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA=="], - - "micromark-util-normalize-identifier": ["micromark-util-normalize-identifier@2.0.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0" } }, "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q=="], - - "micromark-util-resolve-all": ["micromark-util-resolve-all@2.0.1", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg=="], - - "micromark-util-sanitize-uri": ["micromark-util-sanitize-uri@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-symbol": "^2.0.0" } }, "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ=="], - - "micromark-util-subtokenize": ["micromark-util-subtokenize@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA=="], - - "micromark-util-symbol": ["micromark-util-symbol@2.0.1", "", {}, "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q=="], - - "micromark-util-types": ["micromark-util-types@2.0.2", "", {}, "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA=="], - "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="], "mime-db": ["mime-db@1.54.0", "", {}, "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ=="], @@ -805,8 +652,6 @@ "parent-module": ["parent-module@1.0.1", "", { "dependencies": { "callsites": "^3.0.0" } }, "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g=="], - "parse-entities": ["parse-entities@4.0.2", "", { "dependencies": { "@types/unist": "^2.0.0", "character-entities-legacy": "^3.0.0", "character-reference-invalid": "^2.0.0", "decode-named-character-reference": "^1.0.0", "is-alphanumerical": "^2.0.0", "is-decimal": "^2.0.0", "is-hexadecimal": "^2.0.0" } }, "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw=="], - "parse-json": ["parse-json@5.2.0", "", { "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", "json-parse-even-better-errors": "^2.3.0", "lines-and-columns": "^1.1.6" } }, "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg=="], "parse-ms": ["parse-ms@4.0.0", "", {}, "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw=="], @@ -843,8 +688,6 @@ "prompts": ["prompts@2.4.2", "", { "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" } }, "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q=="], - "property-information": ["property-information@7.2.0", "", {}, "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg=="], - "proxy-addr": ["proxy-addr@2.0.7", "", { "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg=="], "qs": ["qs@6.15.3", "", { "dependencies": { "es-define-property": "^1.0.1", "side-channel": "^1.1.1" } }, "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A=="], @@ -863,8 +706,6 @@ "react-dom": ["react-dom@19.2.7", "", { "dependencies": { "scheduler": "^0.27.0" }, "peerDependencies": { "react": "^19.2.7" } }, "sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ=="], - "react-markdown": ["react-markdown@10.1.0", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "html-url-attributes": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", "unified": "^11.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" }, "peerDependencies": { "@types/react": ">=18", "react": ">=18" } }, "sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ=="], - "react-remove-scroll": ["react-remove-scroll@2.7.2", "", { "dependencies": { "react-remove-scroll-bar": "^2.3.7", "react-style-singleton": "^2.2.3", "tslib": "^2.1.0", "use-callback-ref": "^1.3.3", "use-sidecar": "^1.1.3" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Iqb9NjCCTt6Hf+vOdNIZGdTiH1QSqr27H/Ek9sv/a97gfueI/5h1s3yRi1nngzMUaOOToin5dI1dXKdXiF+u0Q=="], "react-remove-scroll-bar": ["react-remove-scroll-bar@2.3.8", "", { "dependencies": { "react-style-singleton": "^2.2.2", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q=="], @@ -877,14 +718,6 @@ "recast": ["recast@0.23.21", "", { "dependencies": { "ast-types": "^0.16.1", "esprima": "~4.0.0", "source-map": "~0.6.1", "tiny-invariant": "^1.3.3", "tslib": "^2.0.1" } }, "sha512-mFAyJq9vUbSTARLZUvAEf1z3YxlvAwswbmxMx2mPA/MSm4KmpwvwvhsH/NIrZhyOuwD60Lzyw2qh83uCbgTPYw=="], - "remark-gfm": ["remark-gfm@4.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-gfm": "^3.0.0", "micromark-extension-gfm": "^3.0.0", "remark-parse": "^11.0.0", "remark-stringify": "^11.0.0", "unified": "^11.0.0" } }, "sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg=="], - - "remark-parse": ["remark-parse@11.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-from-markdown": "^2.0.0", "micromark-util-types": "^2.0.0", "unified": "^11.0.0" } }, "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA=="], - - "remark-rehype": ["remark-rehype@11.1.2", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "mdast-util-to-hast": "^13.0.0", "unified": "^11.0.0", "vfile": "^6.0.0" } }, "sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw=="], - - "remark-stringify": ["remark-stringify@11.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-to-markdown": "^2.0.0", "unified": "^11.0.0" } }, "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw=="], - "require-from-string": ["require-from-string@2.0.2", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="], "resolve-from": ["resolve-from@4.0.0", "", {}, "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="], @@ -937,16 +770,12 @@ "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], - "space-separated-tokens": ["space-separated-tokens@2.0.2", "", {}, "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q=="], - "statuses": ["statuses@2.0.2", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="], "stdin-discarder": ["stdin-discarder@0.2.2", "", {}, "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ=="], "string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="], - "stringify-entities": ["stringify-entities@4.0.4", "", { "dependencies": { "character-entities-html4": "^2.0.0", "character-entities-legacy": "^3.0.0" } }, "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg=="], - "stringify-object": ["stringify-object@5.0.0", "", { "dependencies": { "get-own-enumerable-keys": "^1.0.0", "is-obj": "^3.0.0", "is-regexp": "^3.1.0" } }, "sha512-zaJYxz2FtcMb4f+g60KsRNFOpVMUyuJgA51Zi5Z1DOTC3S59+OQiVOzE9GZt0x72uBGWKsQIuBKeF9iusmKFsg=="], "strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="], @@ -955,10 +784,6 @@ "strip-final-newline": ["strip-final-newline@4.0.0", "", {}, "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw=="], - "style-to-js": ["style-to-js@1.1.21", "", { "dependencies": { "style-to-object": "1.0.14" } }, "sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ=="], - - "style-to-object": ["style-to-object@1.0.14", "", { "dependencies": { "inline-style-parser": "0.2.7" } }, "sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw=="], - "systeminformation": ["systeminformation@5.33.1", "", { "os": "!aix", "bin": { "systeminformation": "lib/cli.js" } }, "sha512-DEN6ICHk3Tk0Uf/hrAHh7xlt7iL5CJFBtPZinA0H62DrGG/KPKqq/Nzj6lCXPS4Ay/sf/14zNnk9LpqKzBIc+w=="], "tailwind-merge": ["tailwind-merge@3.6.0", "", {}, "sha512-uxL7qAVQriqRQPAyK3pj66VqskWqoZ37PW94jwOTwNfq/z9oyu1V+eqrZqtR2+fCiXdYOZe/Modt8GtvqNzu+w=="], @@ -971,10 +796,6 @@ "toidentifier": ["toidentifier@1.0.1", "", {}, "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="], - "trim-lines": ["trim-lines@3.0.1", "", {}, "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg=="], - - "trough": ["trough@2.2.0", "", {}, "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw=="], - "ts-morph": ["ts-morph@26.0.0", "", { "dependencies": { "@ts-morph/common": "~0.27.0", "code-block-writer": "^13.0.3" } }, "sha512-ztMO++owQnz8c/gIENcM9XfCEzgoGphTv+nKpYNM1bgsdOVC/jRZuEBf6N+mLLDNg68Kl+GgUZfOySaRiG1/Ug=="], "tsconfig-paths": ["tsconfig-paths@4.2.0", "", { "dependencies": { "json5": "^2.2.2", "minimist": "^1.2.6", "strip-bom": "^3.0.0" } }, "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg=="], @@ -991,18 +812,6 @@ "unicorn-magic": ["unicorn-magic@0.3.0", "", {}, "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA=="], - "unified": ["unified@11.0.5", "", { "dependencies": { "@types/unist": "^3.0.0", "bail": "^2.0.0", "devlop": "^1.0.0", "extend": "^3.0.0", "is-plain-obj": "^4.0.0", "trough": "^2.0.0", "vfile": "^6.0.0" } }, "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA=="], - - "unist-util-is": ["unist-util-is@6.0.1", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g=="], - - "unist-util-position": ["unist-util-position@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA=="], - - "unist-util-stringify-position": ["unist-util-stringify-position@4.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ=="], - - "unist-util-visit": ["unist-util-visit@5.1.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.0.0" } }, "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg=="], - - "unist-util-visit-parents": ["unist-util-visit-parents@6.0.2", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" } }, "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ=="], - "universalify": ["universalify@2.0.1", "", {}, "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw=="], "unpipe": ["unpipe@1.0.0", "", {}, "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="], @@ -1019,10 +828,6 @@ "vary": ["vary@1.1.2", "", {}, "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="], - "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], - - "vfile-message": ["vfile-message@4.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw=="], - "web-vitals": ["web-vitals@6.2.2", "", {}, "sha512-oto5x6dLEgrRqfcWed+pZEUb2q6ikbFmqF54CRDhI/QGbn+qxC49b4C4OkbH+kb9C3a8shpFD3SgR9kRcs80ZQ=="], "web-vitals-soft-navs": ["web-vitals@6.2.1", "", {}, "sha512-rLcLXA2sx6+9dE88NHFubwTtGxpK4yYBLj6qHPdFoCaLr0cXGb4efOqtKLlm4loGA4OEKHIQKMKzZkKyOh5ctw=="], @@ -1043,8 +848,6 @@ "zod-to-json-schema": ["zod-to-json-schema@3.25.2", "", { "peerDependencies": { "zod": "^3.25.28 || ^4" } }, "sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA=="], - "zwitch": ["zwitch@2.0.4", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="], - "@dotenvx/dotenvx/commander": ["commander@11.1.0", "", {}, "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ=="], "@dotenvx/dotenvx/execa": ["execa@5.1.1", "", { "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", "human-signals": "^2.1.0", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^4.0.1", "onetime": "^5.1.2", "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" } }, "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg=="], @@ -1215,8 +1018,6 @@ "onetime/mimic-fn": ["mimic-fn@2.1.0", "", {}, "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="], - "parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="], - "prompts/kleur": ["kleur@3.0.3", "", {}, "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w=="], "radix-ui/@radix-ui/react-collection": ["@radix-ui/react-collection@1.1.10", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.3", "@radix-ui/react-context": "1.1.4", "@radix-ui/react-primitive": "2.1.6", "@radix-ui/react-slot": "1.3.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-IVVz4EvBcKjrzKgof714qDnz/SzQAkLA2Emh5edlHbgcE6fNd3Un6CJLlaYcnm8N4JmAtzQgse4dOKxcD2yc9g=="], diff --git a/frontend/package.json b/frontend/package.json index 52c3c1e..514bb53 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -17,16 +17,13 @@ "bun-plugin-tailwind": "^0.1.2", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", - "highlight.js": "^11.12.0", "lightweight-charts": "^5.2.0", "lucide-react": "^1.31.0", "posthog-js": "^1.434.2", "radix-ui": "^1.6.0", "react": "^19", "react-dom": "^19", - "react-markdown": "^10.1.0", "react-router-dom": "^7.17.0", - "remark-gfm": "^4.0.1", "shadcn": "^4.16.2", "sonner": "^2.0.7", "tailwind-merge": "^3.6.0" diff --git a/frontend/public/llms.txt b/frontend/public/llms.txt index e52ae20..7e1c6ef 100644 --- a/frontend/public/llms.txt +++ b/frontend/public/llms.txt @@ -1,25 +1,25 @@ # PaperDrill -> PaperDrill is a live paper-trading exchange simulator with a real matching engine, live order book, and REST/WebSocket API — built for developers who want to trade or test bots without real money or KYC. +> PaperDrill is a competitive trading platform where traders trade credit markets, connect bots through the API, and climb the global leaderboard. -PaperDrill runs BTC/USD, ETH/USD, and SOL/USD spot markets with price-time priority matching, persistent simulated balances, and real-time market data. It is free, browser-based, and designed as a sandbox for learning exchange mechanics and building trading strategies. +PaperDrill runs BTC/USD, ETH/USD, and SOL/USD credit markets with price-time priority matching, persistent credit balances, and real-time market data. It is free, browser-based, and gives manual and API traders one measurable public record. Credits have no monetary value, and no real funds or assets are deposited or traded. ## Platform - [Home](https://paperdrill.dev/): Landing page with product overview and live demo UI - [Markets](https://paperdrill.dev/markets): Browse live spot markets and 24h stats -- [Leaderboard](https://paperdrill.dev/leaderboard): Global paper-trading standings ranked by portfolio return +- [Leaderboard](https://paperdrill.dev/leaderboard): Global standings ranked by portfolio return - [Trading Console](https://paperdrill.dev/trade/BTC_USD): Full trading UI with order book, chart, and order entry -- [Sign Up](https://paperdrill.dev/signup): Create a free account with simulated starting balances +- [Sign Up](https://paperdrill.dev/signup): Create a free account with a starting credit balance ## Developers -- [Documentation](https://paperdrill.dev/docs): How PaperDrill works — markets, trading, API overview +- [Documentation](https://docs.paperdrill.dev): How PaperDrill works — markets, trading, API overview - [API](https://api.paperdrill.dev): REST API and WebSocket endpoints (see docs for usage) ## Legal -- [Terms of Service](https://paperdrill.dev/terms): Usage terms for the simulated platform +- [Terms of Service](https://paperdrill.dev/terms): Rules for using PaperDrill and its credit markets - [Privacy Policy](https://paperdrill.dev/privacy): Data handling and privacy practices ## Optional diff --git a/frontend/public/robots.txt b/frontend/public/robots.txt index 844cfd3..445d865 100644 --- a/frontend/public/robots.txt +++ b/frontend/public/robots.txt @@ -1,40 +1,43 @@ User-agent: * Allow: / -# Public marketing and docs pages -Allow: /docs +# Public product pages Allow: /terms Allow: /privacy Allow: /markets Allow: /leaderboard +Allow: /trade/ Allow: /signup -# Authenticated/private pages — allow crawl of entry points but discourage indexing via meta +# Account and authentication pages +Disallow: /home +Disallow: /portfolio +Disallow: /activity +Disallow: /settings/ Disallow: /profile +Disallow: /login +Disallow: /verify-email Sitemap: https://paperdrill.dev/sitemap.xml -# AI crawlers — welcome on public content +# AI search and assistant crawlers — welcome on public content User-agent: GPTBot -Allow: / - +User-agent: OAI-SearchBot User-agent: ChatGPT-User -Allow: / - User-agent: ClaudeBot -Allow: / - -User-agent: Claude-Web -Allow: / - +User-agent: Claude-SearchBot +User-agent: Claude-User User-agent: Google-Extended -Allow: / - User-agent: PerplexityBot -Allow: / - User-agent: Applebot-Extended Allow: / +Disallow: /home +Disallow: /portfolio +Disallow: /activity +Disallow: /settings/ +Disallow: /profile +Disallow: /login +Disallow: /verify-email # Discovery files # llms.txt: https://paperdrill.dev/llms.txt diff --git a/frontend/public/site.webmanifest b/frontend/public/site.webmanifest index e58b400..b89c199 100644 --- a/frontend/public/site.webmanifest +++ b/frontend/public/site.webmanifest @@ -1,7 +1,7 @@ { "name": "PaperDrill", "short_name": "PaperDrill", - "description": "The exchange built for developers - real matching engine, paper trading, zero risk.", + "description": "Trade competitive credit markets, connect bots, and climb the global leaderboard.", "start_url": "/", "display": "standalone", "background_color": "#0a0a0a", diff --git a/frontend/public/sitemap.xml b/frontend/public/sitemap.xml index 9984667..043b907 100644 --- a/frontend/public/sitemap.xml +++ b/frontend/public/sitemap.xml @@ -30,11 +30,6 @@ hourly 0.8 - - https://paperdrill.dev/docs - monthly - 0.8 - https://paperdrill.dev/signup monthly diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index abab24c..0944acf 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,5 +1,5 @@ import "./index.css"; -import { Routes, Route, Link, Navigate } from "react-router-dom"; +import { Routes, Route, Navigate } from "react-router-dom"; import { LandingPage } from "./pages/landing"; import { LoginPage } from "./pages/login"; import { SignupPage } from "./pages/signup"; @@ -7,83 +7,102 @@ import { VerifyEmailPage } from "./pages/verify-email"; import { ProfilePage } from "./pages/profile"; import { TradePage } from "./pages/trade"; import { MarketsPage } from "./pages/markets"; -import { DocsPage } from "./pages/docs"; import { TermsPage } from "./pages/terms"; import { PrivacyPage } from "./pages/privacy"; import { AppLayout } from "./components/app-layout"; import { RootLayout } from "./components/root-layout"; import { Protected, PublicOnly } from "./components/route-guards"; -import { DashboardLayout } from "./components/dashboard-layout"; -import { DashboardOverviewPage } from "./pages/dashboard/overview"; -import { DashboardApiKeysPage } from "./pages/dashboard/api-keys"; -import { DashboardBalancesPage } from "./pages/dashboard/balances"; -import { DashboardDataPage } from "./pages/dashboard/data"; -import { DocsLayout } from "./components/docs/docs-layout"; +import { HomePage } from "./pages/home"; +import { ApiKeysPage } from "./pages/api-keys"; +import { PortfolioPage } from "./pages/portfolio"; +import { ActivityPage } from "./pages/activity"; import { LeaderboardPage } from "./pages/leaderboard"; +import { NotFoundPage } from "./pages/not-found"; +import { RouteBehavior } from "./components/route-behavior"; +import { getLastTradePath } from "./lib/ux-preferences"; -function NotFound() { - return ( -
-

404

-

This page doesn't exist on PaperDrill yet.

- - Go home - -
- ); +function TradeRedirect() { + return ; } export function App() { return ( - - }> - } /> - }> - } /> - } /> + <> + + + }> + } /> + } /> + } /> - } /> - } /> - - }> - - - - } - > - } /> - } /> - } /> - } /> - } /> + }> + + + + } + /> + + + + } + /> + + + + } + /> + + + + } + /> + + + + } + /> + } /> + } /> + } /> + } /> + } /> + } /> + + + + } + /> + + + + } + /> + } /> + } /> - } /> - } /> - } /> - } /> - - - - } - /> - - - - } - /> - } /> - } /> - - + + ); } diff --git a/frontend/src/assets/index.ts b/frontend/src/assets/index.ts index 036b489..90ddc33 100644 --- a/frontend/src/assets/index.ts +++ b/frontend/src/assets/index.ts @@ -5,16 +5,17 @@ import logo from "./brand/logo.png"; import bannerDark from "./brand/banner-dark.png"; import banner from "./brand/banner.png"; +import arena from "./landing/arena.png"; +import trading from "./landing/trading.png"; +import apiTrading from "./landing/api-trading.png"; +import leaderboard from "./landing/leaderboard.png"; +import exchange from "./landing/exchange.png"; + import btcLogo from "./crypto/btc.svg"; import ethLogo from "./crypto/eth.svg"; import solLogo from "./crypto/sol.svg"; import usdLogo from "./crypto/usd.svg"; -import balanceScreenshot from "./screenshots/balance.png"; -import marketDataScreenshot from "./screenshots/market-data.png"; -import tradingScreenshot from "./screenshots/trading.png"; -import chartScreenshot from "./screenshots/chart.png"; - export type Theme = "light" | "dark"; export const brand = { @@ -32,6 +33,14 @@ export const brand = { }, } as const; +export const landing = { + arena, + trading, + apiTrading, + leaderboard, + exchange, +}; + export const crypto = { BTC: btcLogo, ETH: ethLogo, @@ -39,13 +48,6 @@ export const crypto = { USD: usdLogo, } as const; -export const screenshots = { - balance: balanceScreenshot, - chart: chartScreenshot, - marketData: marketDataScreenshot, - trading: tradingScreenshot, -} as const; - export function brandLogo(theme: Theme): string { return brand.logo[theme]; } diff --git a/frontend/src/assets/landing/api-trading.png b/frontend/src/assets/landing/api-trading.png new file mode 100644 index 0000000..0f182aa Binary files /dev/null and b/frontend/src/assets/landing/api-trading.png differ diff --git a/frontend/src/assets/landing/arena.png b/frontend/src/assets/landing/arena.png new file mode 100644 index 0000000..f882415 Binary files /dev/null and b/frontend/src/assets/landing/arena.png differ diff --git a/frontend/src/assets/landing/exchange.png b/frontend/src/assets/landing/exchange.png new file mode 100644 index 0000000..b79a717 Binary files /dev/null and b/frontend/src/assets/landing/exchange.png differ diff --git a/frontend/src/assets/landing/leaderboard.png b/frontend/src/assets/landing/leaderboard.png new file mode 100644 index 0000000..778465f Binary files /dev/null and b/frontend/src/assets/landing/leaderboard.png differ diff --git a/frontend/src/assets/landing/trading.png b/frontend/src/assets/landing/trading.png new file mode 100644 index 0000000..901fe19 Binary files /dev/null and b/frontend/src/assets/landing/trading.png differ diff --git a/frontend/src/assets/screenshots/balance.png b/frontend/src/assets/screenshots/balance.png deleted file mode 100644 index 62704d4..0000000 Binary files a/frontend/src/assets/screenshots/balance.png and /dev/null differ diff --git a/frontend/src/assets/screenshots/chart.png b/frontend/src/assets/screenshots/chart.png deleted file mode 100644 index 4cf72e1..0000000 Binary files a/frontend/src/assets/screenshots/chart.png and /dev/null differ diff --git a/frontend/src/assets/screenshots/market-data.png b/frontend/src/assets/screenshots/market-data.png deleted file mode 100644 index 1a824fd..0000000 Binary files a/frontend/src/assets/screenshots/market-data.png and /dev/null differ diff --git a/frontend/src/assets/screenshots/trading.png b/frontend/src/assets/screenshots/trading.png deleted file mode 100644 index c00bc41..0000000 Binary files a/frontend/src/assets/screenshots/trading.png and /dev/null differ diff --git a/frontend/src/components/account-page.tsx b/frontend/src/components/account-page.tsx new file mode 100644 index 0000000..686b459 --- /dev/null +++ b/frontend/src/components/account-page.tsx @@ -0,0 +1,24 @@ +import type { ReactNode } from "react"; +import { cn } from "@/lib/utils"; +import { PageHeading } from "@/components/ui/page"; + +export function AccountPage({ + title, + description, + action, + children, + className, +}: { + title: string; + description: string; + action?: ReactNode; + children: ReactNode; + className?: string; +}) { + return ( +
+ + {children} +
+ ); +} diff --git a/frontend/src/components/api-keys/create-api-key-dialog.tsx b/frontend/src/components/api-keys/create-api-key-dialog.tsx new file mode 100644 index 0000000..5f22790 --- /dev/null +++ b/frontend/src/components/api-keys/create-api-key-dialog.tsx @@ -0,0 +1,270 @@ +import { useEffect, useRef, useState } from "react"; +import { Check, Copy, X } from "lucide-react"; +import { Dialog } from "radix-ui"; +import { toast } from "sonner"; +import { Button } from "@/components/ui/button"; +import { Checkbox } from "@/components/ui/checkbox"; +import { Input } from "@/components/ui/input"; +import { Label } from "@/components/ui/label"; +import { API_KEY_SCOPE_OPTIONS } from "@/lib/api-key-scopes"; +import { cn } from "@/lib/utils"; +import type { ApiKeyScope, CreatedApiKey } from "@/types"; + +type CreateApiKeyDialogProps = { + open: boolean; + onOpenChange: (open: boolean) => void; + onCreate: (label: string, scopes: ApiKeyScope[]) => Promise; +}; + +const DEFAULT_SCOPES = API_KEY_SCOPE_OPTIONS.map((scope) => scope.value); + +export function CreateApiKeyDialog({ + open, + onOpenChange, + onCreate, +}: CreateApiKeyDialogProps) { + const labelInputRef = useRef(null); + const secretInputRef = useRef(null); + const [label, setLabel] = useState(""); + const [scopes, setScopes] = useState(DEFAULT_SCOPES); + const [creating, setCreating] = useState(false); + const [createError, setCreateError] = useState(null); + const [createdKey, setCreatedKey] = useState(null); + const [copied, setCopied] = useState(false); + + useEffect(() => { + if (createdKey?.key) secretInputRef.current?.focus(); + }, [createdKey?.key]); + + const reset = () => { + setLabel(""); + setScopes(DEFAULT_SCOPES); + setCreating(false); + setCreateError(null); + setCreatedKey(null); + setCopied(false); + }; + + const close = () => { + reset(); + onOpenChange(false); + }; + + const handleOpenChange = (nextOpen: boolean) => { + if (!nextOpen && (creating || createdKey)) return; + if (!nextOpen) reset(); + onOpenChange(nextOpen); + }; + + const toggleScope = (scope: ApiKeyScope, checked: boolean) => { + setScopes((current) => + checked ? [...current, scope] : current.filter((item) => item !== scope), + ); + setCreateError(null); + }; + + const handleSubmit = async (event: React.FormEvent) => { + event.preventDefault(); + if (!label.trim() || scopes.length === 0 || creating) return; + + setCreating(true); + setCreateError(null); + try { + const key = await onCreate(label.trim(), scopes); + setCreatedKey(key); + setCopied(false); + } catch (error) { + setCreateError(error instanceof Error ? error.message : "Failed to create API key."); + } finally { + setCreating(false); + } + }; + + const copyKey = async () => { + if (!createdKey) return; + try { + await navigator.clipboard.writeText(createdKey.key); + setCopied(true); + toast.success("API key copied"); + } catch { + toast.error("Could not copy the API key"); + } + }; + + return ( + + + + (creating || createdKey) && event.preventDefault()} + onPointerDownOutside={(event) => (creating || createdKey) && event.preventDefault()} + onOpenAutoFocus={(event) => { + if (createdKey) return; + event.preventDefault(); + labelInputRef.current?.focus(); + }} + > + {createdKey ? ( +
+
+

Created successfully

+ + API key created + + + Copy the key now. PaperDrill will not show the full value again. + +
+ +
+
+

Key name

+

{createdKey.label}

+
+ +
+ +
+ event.currentTarget.select()} + ref={secretInputRef} + /> + +
+
+ +

+ Store this key in a secret manager or environment variable. Never include it in + client-side code or commit it to source control. +

+
+ +
+ +
+
+ ) : ( +
+
+
+ + Create API key + + + Name the key and choose only the access your client needs. + +
+ + + +
+ +
+
+ + { + setLabel(event.target.value); + setCreateError(null); + }} + maxLength={50} + placeholder="Market maker" + autoComplete="off" + className="h-10" + /> +

+ Use a name that identifies the bot or environment using this key. +

+
+ +
+ Permissions +

+ You can revoke this key at any time, but its permissions cannot be edited. +

+
+ {API_KEY_SCOPE_OPTIONS.map((scope) => { + const checked = scopes.includes(scope.value); + return ( + + ); + })} +
+
+ + {createError ? ( +

+ {createError} +

+ ) : scopes.length === 0 ? ( +

+ Choose at least one permission. +

+ ) : null} +
+ +
+ + + + +
+
+ )} +
+
+
+ ); +} diff --git a/frontend/src/components/app-layout.tsx b/frontend/src/components/app-layout.tsx index 7a02451..f785ac1 100644 --- a/frontend/src/components/app-layout.tsx +++ b/frontend/src/components/app-layout.tsx @@ -1,30 +1,18 @@ -import { Outlet, useLocation } from "react-router-dom"; +import { Outlet } from "react-router-dom"; import { Navbar } from "./navbar"; -import { MobileDisclaimer } from "./mobile-disclaimer"; import { SeoHead } from "@/components/seo-head"; -import { AuthProvider } from "@/context/AuthContext"; -import { MarketProvider } from "@/context/MarketContext"; +import { SkipLink } from "@/components/ui/skip-link"; export function AppLayout() { return ( - - - - - - ); -} - -function AppShell() { - const { pathname } = useLocation(); - const isDashboard = pathname.startsWith("/dashboard"); - - return ( -
+
- {!isDashboard && } -
- {!isDashboard && } + + +
diff --git a/frontend/src/components/app-sidebar.tsx b/frontend/src/components/app-sidebar.tsx deleted file mode 100644 index eb881f4..0000000 --- a/frontend/src/components/app-sidebar.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import { - ArrowUpRight, - BookOpen, - Database, - KeyRound, - LayoutDashboard, - Trophy, - WalletCards, -} from "lucide-react"; -import type { ComponentProps } from "react"; -import { Link } from "react-router-dom"; -import { BrandLogo } from "@/components/brand-logo"; -import { NavMain, type DashboardNavItem } from "@/components/nav-main"; -import { NavUser } from "@/components/nav-user"; -import { - Sidebar, - SidebarContent, - SidebarFooter, - SidebarHeader, - SidebarMenu, - SidebarMenuButton, - SidebarMenuItem, - SidebarRail, -} from "@/components/ui/sidebar"; - -const navigation: DashboardNavItem[] = [ - { title: "Overview", url: "/dashboard", icon: LayoutDashboard, end: true }, - { title: "API keys", url: "/dashboard/api-keys", icon: KeyRound }, - { title: "Balances", url: "/dashboard/balances", icon: WalletCards }, - { title: "Account data", url: "/dashboard/data", icon: Database }, -]; - -export function AppSidebar(props: ComponentProps) { - return ( - - - - - - -
- - - - - - Leaderboard - - - - - - - - Open trading - - - - - - - - Documentation - - - - -
-
- - - - -
- ); -} diff --git a/frontend/src/components/auth/auth-shell.tsx b/frontend/src/components/auth/auth-shell.tsx new file mode 100644 index 0000000..b123493 --- /dev/null +++ b/frontend/src/components/auth/auth-shell.tsx @@ -0,0 +1,52 @@ +import type { ReactNode } from "react"; + +const AUTH_CAPABILITIES = [ + { + title: "Trade", + description: "Use the terminal or API against the same live order book.", + }, + { + title: "Measure", + description: "Follow portfolio value, profit and loss, and every execution.", + }, + { + title: "Compete", + description: "Build a public record and compare your return globally.", + }, +] as const; + +export function AuthShell({ children }: { children: ReactNode }) { + return ( +
+ + +
+
{children}
+
+
+ ); +} diff --git a/frontend/src/components/chart/chart-toolbar.tsx b/frontend/src/components/chart/chart-toolbar.tsx index 3fd539f..b448d11 100644 --- a/frontend/src/components/chart/chart-toolbar.tsx +++ b/frontend/src/components/chart/chart-toolbar.tsx @@ -53,17 +53,17 @@ export function ChartToolbar({ const ActiveChartIcon = activeChartStyle.Icon; return ( -
-
+
+
@@ -81,7 +81,7 @@ export function ChartToolbar({ -
+
@@ -89,13 +89,13 @@ export function ChartToolbar({ type="button" variant="ghost" size="sm" - className="w-28 justify-between gap-1.5 px-2 text-xs focus-visible:border-transparent focus-visible:brightness-100 focus-visible:ring-0" + className="w-9 justify-center gap-1 px-1.5 text-xs focus-visible:border-transparent focus-visible:brightness-100 focus-visible:ring-0 sm:w-28 sm:justify-between sm:gap-1.5 sm:px-2" > - {activeChartStyle.label} + {activeChartStyle.label} - + @@ -145,6 +145,7 @@ export function ChartToolbar({ onClick={onReset} title="Reset chart" aria-label="Reset chart" + className="hidden sm:inline-flex" > @@ -155,6 +156,7 @@ export function ChartToolbar({ onClick={onFullscreen} title="Fullscreen" aria-label="Fullscreen" + className="hidden sm:inline-flex" > diff --git a/frontend/src/components/chart/chart.tsx b/frontend/src/components/chart/chart.tsx index 02974f9..0c6607f 100644 --- a/frontend/src/components/chart/chart.tsx +++ b/frontend/src/components/chart/chart.tsx @@ -1,8 +1,10 @@ import { Activity, CircleAlert } from "lucide-react"; -import { useEffect, useRef, useState } from "react"; +import { useEffect, useRef, useState, type KeyboardEvent, type ReactNode } from "react"; import type { Candle, OrderBook, Ticker } from "@/types"; import { type CandleInterval, useCandles } from "../../hooks/use-candles"; import { useMarket } from "@/context/MarketContext"; +import { useIsMobile } from "@/hooks/use-mobile"; +import { getChartPreferences, saveChartPreferences } from "@/lib/ux-preferences"; import { cn } from "@/lib/utils"; import { ChartToolbar } from "./chart-toolbar"; import { CHART_RANGES, type ChartRange, type ChartStyle } from "./chart-utils"; @@ -16,16 +18,45 @@ type ChartProps = { symbol: string; orderbook: OrderBook; ticker: Ticker | null; + mobileOrderbook?: ReactNode; + mobileTrades?: ReactNode; }; -type ChartTab = "chart" | "depth" | "info"; +type ChartTab = "chart" | "depth" | "book" | "trades" | "info"; -const TABS: { value: ChartTab; label: string }[] = [ +const DESKTOP_TABS: { value: ChartTab; label: string }[] = [ { value: "chart", label: "Chart" }, { value: "depth", label: "Depth" }, { value: "info", label: "Market info" }, ]; +const MOBILE_TABS: { value: ChartTab; label: string }[] = [ + { value: "chart", label: "Chart" }, + { value: "book", label: "Book" }, + { value: "trades", label: "Trades" }, + { value: "info", label: "Info" }, +]; + +const clockFormatter = new Intl.DateTimeFormat(undefined, { + hour: "2-digit", + minute: "2-digit", + second: "2-digit", + hour12: false, +}); + +const timeZoneFormatter = new Intl.DateTimeFormat(undefined, { + timeZoneName: "short", +}); + +function formatTimeZone(date: Date) { + const timeZoneName = timeZoneFormatter + .formatToParts(date) + .find((part) => part.type === "timeZoneName")?.value; + if (timeZoneName) return timeZoneName; + + return Intl.DateTimeFormat().resolvedOptions().timeZone.replaceAll("_", " "); +} + function Clock() { const [now, setNow] = useState(() => new Date()); @@ -36,26 +67,24 @@ function Clock() { return (
- - {now.toLocaleTimeString([], { - hour: "2-digit", - minute: "2-digit", - second: "2-digit", - hour12: false, - })} - - ({now.toLocaleTimeString([], { timeZoneName: "shortOffset" }).split(" ")[2]}) + + ({formatTimeZone(now)})
); } -export function Chart({ symbol, orderbook, ticker }: ChartProps) { +export function Chart({ symbol, orderbook, ticker, mobileOrderbook, mobileTrades }: ChartProps) { const panelRef = useRef(null); + const isMobile = useIsMobile(); const [tab, setTab] = useState("chart"); - const [interval, setInterval] = useState("1H"); - const [chartStyle, setChartStyle] = useState("candlestick"); + const [interval, setInterval] = useState( + () => getChartPreferences().interval, + ); + const [chartStyle, setChartStyle] = useState( + () => getChartPreferences().style, + ); const [range, setRange] = useState("All"); - const [showVolume, setShowVolume] = useState(true); + const [showVolume, setShowVolume] = useState(() => getChartPreferences().showVolume); const [hoveredCandle, setHoveredCandle] = useState(null); const [resetKey, setResetKey] = useState(0); const [goLiveKey, setGoLiveKey] = useState(0); @@ -64,11 +93,16 @@ export function Chart({ symbol, orderbook, ticker }: ChartProps) { const candle = hoveredCandle ?? candles[candles.length - 1] ?? null; const candleUp = !candle || Number(candle.close) >= Number(candle.open); const marketName = market ? `${market.baseAsset}/${market.quoteAsset}` : symbol.replace("_", "/"); + const tabs = isMobile ? MOBILE_TABS : DESKTOP_TABS; useEffect(() => { setHoveredCandle(null); }, [symbol, interval]); + useEffect(() => { + if (!tabs.some((item) => item.value === tab)) setTab("chart"); + }, [tab, tabs]); + const toggleFullscreen = () => { if (document.fullscreenElement) { document.exitFullscreen().catch(() => undefined); @@ -82,17 +116,55 @@ export function Chart({ symbol, orderbook, ticker }: ChartProps) { setResetKey((key) => key + 1); }; + const handleIntervalChange = (nextInterval: CandleInterval) => { + setInterval(nextInterval); + saveChartPreferences({ interval: nextInterval }); + }; + + const handleChartStyleChange = (nextStyle: ChartStyle) => { + setChartStyle(nextStyle); + saveChartPreferences({ style: nextStyle }); + }; + + const toggleVolume = () => { + setShowVolume((visible) => { + const nextVisible = !visible; + saveChartPreferences({ showVolume: nextVisible }); + return nextVisible; + }); + }; + + const handleTabKeyDown = (event: KeyboardEvent, index: number) => { + if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(event.key)) return; + event.preventDefault(); + let nextIndex = index; + if (event.key === "Home") nextIndex = 0; + else if (event.key === "End") nextIndex = tabs.length - 1; + else if (event.key === "ArrowRight") nextIndex = (index + 1) % tabs.length; + else nextIndex = (index - 1 + tabs.length) % tabs.length; + const nextTab = tabs[nextIndex]; + if (!nextTab) return; + setTab(nextTab.value); + document.getElementById(`chart-${nextTab.value}-tab`)?.focus(); + }; + return ( -
+
-
- {TABS.map((item) => ( +
+ {tabs.map((item, index) => ( - -
- -
- - - ); -} diff --git a/frontend/src/components/dashboard-page.tsx b/frontend/src/components/dashboard-page.tsx deleted file mode 100644 index 2ff284c..0000000 --- a/frontend/src/components/dashboard-page.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import type { ReactNode } from "react"; -import { cn } from "@/lib/utils"; - -export function DashboardPage({ - title, - description, - action, - children, - className, -}: { - title: string; - description: string; - action?: ReactNode; - children: ReactNode; - className?: string; -}) { - return ( -
-
-
-

{title}

-

{description}

-
- {action &&
{action}
} -
- {children} -
- ); -} diff --git a/frontend/src/components/docs/code-block.tsx b/frontend/src/components/docs/code-block.tsx deleted file mode 100644 index f3d729c..0000000 --- a/frontend/src/components/docs/code-block.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { useState, type ReactNode } from "react"; -import { Check, Copy } from "lucide-react"; -import { Button } from "@/components/ui/button"; - -function getText(node: ReactNode): string { - if (typeof node === "string" || typeof node === "number") return String(node); - if (Array.isArray(node)) return node.map(getText).join(""); - if (node && typeof node === "object" && "props" in node) { - const props = (node as { props: { children?: ReactNode; "data-source"?: string } }).props; - return props["data-source"] ?? getText(props.children); - } - return ""; -} - -export function CodeBlock({ children }: { children?: ReactNode }) { - const [copied, setCopied] = useState(false); - - const copy = async () => { - try { - await navigator.clipboard.writeText(getText(children).replace(/\n$/, "")); - setCopied(true); - window.setTimeout(() => setCopied(false), 1500); - } catch { - setCopied(false); - } - }; - - return ( -
- -
-				{children}
-			
-
- ); -} diff --git a/frontend/src/components/docs/docs-layout.tsx b/frontend/src/components/docs/docs-layout.tsx deleted file mode 100644 index 4dc119e..0000000 --- a/frontend/src/components/docs/docs-layout.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import { NavLink, Outlet } from "react-router-dom"; -import { docs } from "@/content/docs"; -import { cn } from "@/lib/utils"; - -function DocLink({ title, slug }: { title: string; slug: string }) { - return ( - - cn( - "block shrink-0 rounded-md px-3 py-2 text-sm transition-colors", - isActive - ? "bg-l2 font-medium text-high-emphasis" - : "text-medium-emphasis hover:bg-l2 hover:text-high-emphasis", - ) - } - > - {title} - - ); -} - -function DocsNav() { - const sections = docs.reduce<{ title: string; items: typeof docs }[]>((groups, doc) => { - const current = groups.at(-1); - if (current?.title === doc.section) { - current.items.push(doc); - } else { - groups.push({ title: doc.section, items: [doc] }); - } - return groups; - }, []); - - return sections.map((section) => ( -
-

- {section.title} -

- {section.items.map((doc) => ( - - ))} -
- )); -} - -export function DocsLayout() { - return ( -
- -
- -
- -
-
-
- ); -} diff --git a/frontend/src/components/docs/markdown-content.tsx b/frontend/src/components/docs/markdown-content.tsx deleted file mode 100644 index 7081b22..0000000 --- a/frontend/src/components/docs/markdown-content.tsx +++ /dev/null @@ -1,93 +0,0 @@ -import type { ComponentPropsWithoutRef } from "react"; -import { Link } from "react-router-dom"; -import hljs from "highlight.js/lib/core"; -import bash from "highlight.js/lib/languages/bash"; -import javascript from "highlight.js/lib/languages/javascript"; -import json from "highlight.js/lib/languages/json"; -import ReactMarkdown from "react-markdown"; -import remarkGfm from "remark-gfm"; -import { CodeBlock } from "./code-block"; - -hljs.registerLanguage("bash", bash); -hljs.registerLanguage("js", javascript); -hljs.registerLanguage("javascript", javascript); -hljs.registerLanguage("json", json); - -function MarkdownLink({ href = "", children, ...props }: ComponentPropsWithoutRef<"a">) { - const className = "font-medium text-primary underline underline-offset-4 hover:text-primary/80"; - - if (href.startsWith("/")) { - return {children}; - } - - return {children}; -} - -function MarkdownCode({ children, className, ...props }: ComponentPropsWithoutRef<"code">) { - const source = String(children).replace(/\n$/, ""); - const language = /language-([\w-]+)/.exec(className ?? "")?.[1]; - - if (!language || !hljs.getLanguage(language)) { - return ( - - {children} - - ); - } - - return ( - - ); -} - -export function MarkdownContent({ content }: { content: string }) { - return ( -
- ( -

{children}

- ), - h2: ({ children }) => ( -

{children}

- ), - h3: ({ children }) => ( -

{children}

- ), - p: ({ children }) =>

{children}

, - a: MarkdownLink, - ul: ({ children }) =>
    {children}
, - ol: ({ children }) =>
    {children}
, - pre: ({ children }) => {children}, - code: MarkdownCode, - blockquote: ({ children }) => ( -
{children}
- ), - table: ({ children }) => ( -
- {children}
-
- ), - th: ({ children }) => ( - - {children} - - ), - td: ({ children }) => ( - {children} - ), - }} - > - {content} -
-
- ); -} diff --git a/frontend/src/components/error-boundary.tsx b/frontend/src/components/error-boundary.tsx index 998f94b..738f8ce 100644 --- a/frontend/src/components/error-boundary.tsx +++ b/frontend/src/components/error-boundary.tsx @@ -29,7 +29,7 @@ export class ErrorBoundary extends Component { override render() { if (this.state.hasError) { return ( -
+

Something went wrong

@@ -49,9 +49,9 @@ export class ErrorBoundary extends Component { > Try Again - - - +
); diff --git a/frontend/src/components/home/market-pulse-chart.tsx b/frontend/src/components/home/market-pulse-chart.tsx new file mode 100644 index 0000000..ce548c8 --- /dev/null +++ b/frontend/src/components/home/market-pulse-chart.tsx @@ -0,0 +1,124 @@ +import { useId, useMemo } from "react"; +import { Skeleton } from "@/components/ui/skeleton"; +import { useCandles } from "@/hooks/use-candles"; +import { cn } from "@/lib/utils"; + +const CHART_WIDTH = 1000; +const CHART_HEIGHT = 300; +const CHART_PADDING_X = 8; +const CHART_PADDING_Y = 18; + +export function MarketPulseChart({ + symbol, + positive, + className, +}: { + symbol: string; + positive: boolean; + className?: string; +}) { + const gradientId = useId().replaceAll(":", ""); + const { candles, loading, error } = useCandles(symbol, "1H"); + const chart = useMemo(() => { + const closes = candles + .slice(-72) + .map((candle) => Number(candle.close)) + .filter(Number.isFinite); + + if (closes.length < 2) return null; + const min = Math.min(...closes); + const max = Math.max(...closes); + const range = max - min; + const drawableWidth = CHART_WIDTH - CHART_PADDING_X * 2; + const drawableHeight = CHART_HEIGHT - CHART_PADDING_Y * 2; + const points = closes.map((close, index) => { + const x = CHART_PADDING_X + (index / (closes.length - 1)) * drawableWidth; + const y = + range === 0 + ? CHART_HEIGHT / 2 + : CHART_PADDING_Y + ((max - close) / range) * drawableHeight; + return { x, y }; + }); + const line = points + .map((point, index) => `${index === 0 ? "M" : "L"}${point.x.toFixed(2)},${point.y.toFixed(2)}`) + .join(" "); + const first = points[0]; + const last = points[points.length - 1]; + if (!first || !last) return null; + + return { + line, + area: `${line} L${last.x.toFixed(2)},${CHART_HEIGHT} L${first.x.toFixed(2)},${CHART_HEIGHT} Z`, + last, + }; + }, [candles]); + + if (loading && !chart) { + return ; + } + + if (!chart) { + return ( +
+ {error ? "Price history is temporarily unavailable." : "Waiting for price history."} +
+ ); + } + + const lineColor = positive ? "var(--green-text)" : "var(--red-text)"; + + return ( +
+ + + + + + + + {[0.25, 0.5, 0.75].map((position) => ( + + ))} + + + + +
+ ); +} diff --git a/frontend/src/components/landing/announcement-bar.tsx b/frontend/src/components/landing/announcement-bar.tsx deleted file mode 100644 index 6d147ac..0000000 --- a/frontend/src/components/landing/announcement-bar.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import { useState } from "react"; -import { Button } from "../ui/button"; -import { Rocket, X } from "lucide-react"; -import { Link } from "react-router-dom"; - -const DISMISS_KEY = "announcement-dismissed"; - -const AnnouncementBar = () => { - const [dismissed, setDismissed] = useState(sessionStorage.getItem(DISMISS_KEY) === "true"); - - if (dismissed) return null; - - return ( -
- - - - - PaperDrill v0.4.0-beta - - {" "} - is live with portfolio analytics and global rankings. - - is live.{" "} - - What's new - - - -
- ); -}; - -export default AnnouncementBar; diff --git a/frontend/src/components/landing/cta-section.tsx b/frontend/src/components/landing/cta-section.tsx index 3ec6dce..a9d8be4 100644 --- a/frontend/src/components/landing/cta-section.tsx +++ b/frontend/src/components/landing/cta-section.tsx @@ -1,20 +1,33 @@ import { Link } from "react-router-dom"; import { Button } from "../ui/button"; -import { ArrowRight } from "lucide-react"; +import { useAuth } from "@/context/AuthContext"; export function CtaSection() { + const { user, loading } = useAuth(); + return ( -
-
-

- Risk nothing. Learn everything. -

-
- - + ) : ( + - + )}
diff --git a/frontend/src/components/landing/exchange-core.tsx b/frontend/src/components/landing/exchange-core.tsx new file mode 100644 index 0000000..34cb941 --- /dev/null +++ b/frontend/src/components/landing/exchange-core.tsx @@ -0,0 +1,30 @@ +import { landing } from "@/assets"; +import { LandingVisual } from "./landing-visual"; + +export default function ExchangeCoreSection() { + return ( +
+
+
+

+ Built for live competition. +

+

+ Every trader and bot meets on the same price-time priority order book, powered by a live + matching engine. +

+
+ +
+ +
+
+
+ ); +} diff --git a/frontend/src/components/landing/footer.tsx b/frontend/src/components/landing/footer.tsx index c30dc8a..fb51b9c 100644 --- a/frontend/src/components/landing/footer.tsx +++ b/frontend/src/components/landing/footer.tsx @@ -1,16 +1,16 @@ import { Link } from "react-router-dom"; import { BrandLogo } from "@/components/brand-logo"; +import { getLastTradePath } from "@/lib/ux-preferences"; export function Footer() { return ( -