Skip to content

cryptuon/sarpoy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Sarpoy

🌐 Site Β· πŸ“š Docs Β· πŸ”¬ Cryptuon Research

Active development. Sarpoy is under active development. APIs, schemas, and on-chain layouts may change between releases. Production use at your own risk. Issues and PRs welcome.

Sarpoy is a Solana-native puzzle arena where creators launch challenge bots backed by on-chain prize pools and solvers pay per message to uncover each bot's hidden objective. The project is split into a backend service (sarpoy-api) built with FastAPI + TortoiseORM and a modern SPA frontend (sarpoy-ui) powered by Nuxt 3, Vue 3, and Tailwind CSS.

Why Sarpoy

  • On-chain incentives: Prize pools and payouts move through a Solana program so creators and solvers get cryptographic assurances.
  • Conversational puzzles: Each bot enforces rising message costs, creating a game-theoretic meta as solvers trade SOL for clues.
  • Composable platform: An API-first approach makes it easy to build new clients, automation, and analytics on top of the same core.

Component Overview

Component Path Responsibilities Status
sarpoy-api sarpoy-api/src/sarpoy_api/ FastAPI service, TortoiseORM models, Solana RPC/program integration, wallet authentication Core routes, auth, and Solana client implemented; services and background workers partial
sarpoy-ui sarpoy-ui/ Nuxt 3 SPA, wallet-connect, chat UX, leaderboards, create puzzle Scaffolding complete
Solana Program sarpoy-api/programs/sarpoy/ Escrow deposits, message-fee accounting, reward settlement Implemented and compiles

Tech Stack

  • Backend: FastAPI, TortoiseORM, SQLite (dev), Pydantic v2, Solana RPC (solders, anchorpy). Dependencies and virtualenv are managed with uv.
  • Frontend: Nuxt 3 + Vue 3 + Vite, Tailwind CSS, @solana/web3.js, Solana wallet adapters.
  • On-chain: Anchor 0.29.0, Solana SDK 1.18.

Quick Start

Backend API

cd sarpoy-api
uv sync
cp .env.example .env   # configure Solana RPC and program ID
uv run uvicorn sarpoy_api.main:app --reload

Frontend UI

cd sarpoy-ui
npm install
npm run dev

Solana Program

cd sarpoy-api/programs/sarpoy
anchor build
anchor deploy --provider.cluster devnet

Current Features

Backend API (sarpoy-api/)

  • Wallet Authentication: Nonce-based signature verification with JWT tokens
  • Bot Management: Create, list, and fetch bots (sample data + on-chain integration)
  • Chat Sessions: Message history with cost tracking
  • Solana Integration: SarpoyClient class for on-chain program interaction
  • Database: SQLite with Aerich migrations (ready for PostgreSQL)

Solana Program (programs/sarpoy/)

  • Instructions:
    • initialize_bot β€” Create bot PDA + treasury, lock initial pot
    • send_message β€” Transfer SOL, update message cost
    • submit_solution β€” Creator verifies, transfers pot to winner
    • close_bot β€” Refund remaining to creator (if unsolved)
  • Economics: Configurable base cost and cost multiplier per bot
  • PDA Accounts: Bot and treasury accounts with proper seed derivation

Frontend UI (sarpoy-ui/)

  • Pages:
    • / β€” Homepage with stats, featured puzzles, how it works
    • /bots β€” Browse and search puzzles
    • /bots/[id] β€” Interactive chat interface
    • /create β€” Create new puzzle with SOL economics
    • /leaderboard β€” Top solvers and creators
  • Components: WalletConnectButton, Chat interface, Bot cards
  • Composables: useSolana() for wallet ops, useApi() for backend

Directory Structure

sarpoy/
β”œβ”€β”€ sarpoy-api/
β”‚   β”œβ”€β”€ programs/sarpoy/       # Anchor Solana program
β”‚   β”‚   β”œβ”€β”€ Cargo.toml
β”‚   β”‚   └── src/lib.rs
β”‚   β”œβ”€β”€ src/sarpoy_api/
β”‚   β”‚   β”œβ”€β”€ api/               # FastAPI routes
β”‚   β”‚   β”œβ”€β”€ core/              # Config, Solana client
β”‚   β”‚   β”œβ”€β”€ schemas/           # Pydantic models
β”‚   β”‚   β”œβ”€β”€ services/          # Auth, sample data
β”‚   β”‚   └── db/                # Tortoise models
β”‚   └── migrations/            # Aerich migrations
β”œβ”€β”€ sarpoy-ui/                 # Nuxt 3 application
β”‚   β”œβ”€β”€ pages/                 # Route views
β”‚   β”œβ”€β”€ components/            # Vue components
β”‚   β”œβ”€β”€ composables/           # useSolana, useApi
β”‚   β”œβ”€β”€ layouts/               # Default layout
β”‚   └── assets/css/            # Tailwind styles
└── docs/                      # Architecture docs

Roadmap

  • Phase 0: Design and plan
  • Phase 1: Implement Solana program
  • Phase 1: Implement backend API with wallet auth
  • Phase 1: Scaffold Nuxt UI
  • Phase 2: Deploy program to devnet
  • Phase 2: Connect UI to on-chain data
  • Phase 2: Add production database (PostgreSQL)
  • Phase 2: Add analytics and monitoring

Documentation

Full docs live at https://docs.cryptuon.com/sarpoy/. Source markdown is in this repo:

  • docs/architecture.md β€” Component breakdown and data flows
  • docs/sarpoy-api.md β€” Backend stack and API reference
  • docs/sarpoy-ui.md β€” UX flows and state management
  • docs/roadmap.md β€” Phased delivery plan

Contributing

This is an early-stage, actively-developed project. Bug reports, design feedback, and PRs are all welcome via the issue tracker.


Part of Cryptuon Research

sarpoy is one of 20 open-source blockchain-infrastructure projects from Cryptuon Research β€” blockchain theory, shipped as protocols.

Related projects: Mentat Β· Njord Β· SolanaLM

Docs: docs.cryptuon.com/sarpoy Β· Contact: contact@cryptuon.com

Releases

No releases published

Packages

 
 
 

Contributors