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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
jobs:
build-docs:
name: 'Build docs'
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v4'
- uses: 'actions/setup-node@v6'
with:
cache: 'npm'
cache-dependency-path: 'docs/package-lock.json'
node-version: 24
- run: 'npm ci'
working-directory: 'docs'
- run: 'npm run format:check'
working-directory: 'docs'
- run: 'npm run build'
working-directory: 'docs'
name: 'Build docs'
'on':
pull_request: null
...
51 changes: 51 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# From https://vitepress.dev/guide/deploy#github-pages.
concurrency:
cancel-in-progress: false
group: 'pages'
jobs:
build:
runs-on: 'ubuntu-latest'
steps:
- name: 'Checkout'
uses: 'actions/checkout@v4'
with:
fetch-depth: null
- name: 'Setup Node'
uses: 'actions/setup-node@v6'
with:
cache: 'npm'
cache-dependency-path: 'docs/package-lock.json'
node-version: 24
- name: 'Setup Pages'
uses: 'actions/configure-pages@v4'
- name: 'Install dependencies'
run: 'npm ci'
working-directory: 'docs'
- name: 'Build with VitePress'
run: 'npm run build'
working-directory: 'docs'
- name: 'Upload artifact'
uses: 'actions/upload-pages-artifact@v3'
with:
path: 'docs/.vitepress/dist'
deploy:
environment:
name: 'github-pages'
url: '${{ steps.deployment.outputs.page_url }}'
name: 'Deploy'
needs: 'build'
runs-on: 'ubuntu-latest'
steps:
- id: 'deployment'
name: 'Deploy to GitHub Pages'
uses: 'actions/deploy-pages@v4'
name: 'Deploy VitePress site to GitHub Pages'
'on':
push:
branches:
- 'main'
permissions:
contents: 'read'
id-token: 'write'
pages: 'write'
...
20 changes: 20 additions & 0 deletions .github/workflows/quick-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
jobs:
quick-lint:
name: 'Quick lint'
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v4'
- uses: 'actions/setup-node@v6'
with:
cache: 'npm'
cache-dependency-path: 'docs/package-lock.json'
node-version: 24
- run: 'npm ci'
working-directory: 'docs'
- run: 'npm run format:check'
working-directory: 'docs'
name: 'Quick lint'
'on':
pull_request: null
...
18 changes: 18 additions & 0 deletions .github/workflows/semantic-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
jobs:
semantic-pr:
name: 'Validate PR title'
runs-on: 'ubuntu-latest'
steps:
- name: 'Validate semantic PR title'
uses: 'amannn/action-semantic-pull-request@v5'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
name: 'Semantic PR'
'on':
pull_request_target:
types:
- 'edited'
- 'opened'
- 'synchronize'
...
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ target
test-ledger
.turbo

dropset-alpha/
22 changes: 22 additions & 0 deletions Dockerfile
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for?

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM rust:latest

# Install Solana CLI and platform tools
RUN sh -c "$(curl -sSfL https://release.solana.com/stable/install)"

# Add Solana to PATH permanently
ENV PATH="/root/.local/share/solana/install/active_release/bin:${PATH}"

# Verify solana is found then install platform tools
RUN solana --version && \
cargo install cargo-build-sbf

# Set working directory
WORKDIR /app

# Copy repo in
COPY . .

# Build the program
RUN cargo build-sbf

CMD ["cargo", "test"]
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.PHONY: docs
.PHONY: docs-build
.PHONY: docs-links
.PHONY: docs-prettier
.PHONY: docs-prod

# Build the docs locally
docs:
cd docs && npm install \
&& rm -rf .vitepress/cache .vitepress/dist node_modules/.vite \
&& npx vitepress dev --open

# Build the docs for production
docs-build:
cd docs \
&& rm -rf .vitepress/cache .vitepress/dist node_modules/.vite \
&& npm ci \
&& npx vitepress build

# Check for any broken links
docs-links: docs-build
lychee --config cfg/lychee.toml --include-fragments \
--root-dir docs/.vitepress/dist 'docs/.vitepress/dist/**/*.html'

# Format docs with Prettier
docs-prettier:
cd docs && npm install && npx prettier --write .

# Serve docs in production mode
docs-prod: docs-build
cd docs && (sleep 1 && open http://localhost:4173 &) && npx vitepress preview
17 changes: 17 additions & 0 deletions cfg/lychee.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Lychee link checker configuration.
# Run via: make docs-links

# Ignore localhost links (used in examples).
exclude = [
"http://localhost",
"https://localhost",
]

# Don't fail on these status codes (some sites block bots).
accept = [200, 206, 429]

# Timeout per request in seconds.
timeout = 20

# Max retries per link.
max_retries = 3
3 changes: 3 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.vitepress/cache
.vitepress/dist
127 changes: 127 additions & 0 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
export default {
title: "Dropset",
description:
"Courtesy of Distributed Atomic State Machine Algorithms Corporation (DASMAC)",
head: [
[
"link",
{
rel: "icon",
href: "/favicon-light.png",
media: "(prefers-color-scheme: light)",
},
],
[
"link",
{
rel: "icon",
href: "/favicon-dark.png",
media: "(prefers-color-scheme: dark)",
},
],
["link", { rel: "apple-touch-icon", href: "/favicon-light.png" }],
["meta", { property: "og:site_name", content: "DASMAC" }],
["meta", { property: "og:type", content: "website" }],
["meta", { property: "og:url", content: "https://docs.dropset.io/" }],
["meta", { property: "og:title", content: "Dropset Docs" }],
[
"meta",
{
property: "og:description",
content:
"Courtesy of Distributed Atomic State Machine Algorithms Corporation (DASMAC)",
},
],
[
"meta",
{
property: "og:image",
content: "https://docs.dropset.io/dasmac-banner.png",
},
],
["meta", { name: "twitter:card", content: "summary_large_image" }],
["meta", { name: "twitter:title", content: "Dropset Docs" }],
[
"meta",
{
name: "twitter:description",
content:
"Courtesy of Distributed Atomic State Machine Algorithms Corporation (DASMAC)",
},
],
[
"meta",
{
name: "twitter:image",
content: "https://docs.dropset.io/dasmac-banner.png",
},
],
],
srcDir: "src",
themeConfig: {
outline: "deep",
editLink: {
pattern:
"https://github.com/DASMAC-com/dropset-alpha/blob/main/docs/src/:path",
text: "Contribute to this page",
},
sidebar: [
{ text: "Welcome", link: "/" },
{
collapsed: false,
text: "Introduction",
items: [
{ text: "What is Dropset?", link: "/introduction/what-is-dropset" },
{ text: "Core Concepts", link: "/introduction/core-concepts" },
],
},
{
collapsed: false,
text: "Architecture",
items: [
{ text: "Overview", link: "/architecture/overview" },
{
text: "Program Structure",
link: "/architecture/program-structure",
},
{ text: "On-Chain Accounts", link: "/architecture/accounts" },
],
},
{
collapsed: false,
text: "Program Reference",
items: [
{ text: "Instruction Cards", link: "/program/instructions" },
{ text: "Order Book Visualizer", link: "/program/order-book-viz" },
],
},
{
collapsed: false,
text: "Quickstart",
items: [
{ text: "Getting Started", link: "/quickstart/getting-started" },
],
},
{
collapsed: false,
text: "TypeScript SDK",
items: [
{ text: "Overview", link: "/sdk/overview" },
{ text: "Connect to a Market", link: "/sdk/connect-to-market" },
{ text: "Post an Order", link: "/sdk/post-order" },
{ text: "Price Utilities", link: "/sdk/price-utils" },
],
},
{
collapsed: false,
text: "Benchmarks",
items: [{ text: "CU Cost Explorer", link: "/benchmarks/" }],
},
{
collapsed: false,
text: "Services",
items: [{ text: "Faucet, Maker & Taker", link: "/services/overview" }],
},
],
},
};
Loading
Loading