Full-stack reference implementation of the “Rather Strategy Protocol” on Stacks. The repository bundles:
- A Next.js 14 front-end (Chakra UI + Stacks.js) for the marketplace, liquidity dashboard, and admin tooling.
- A suite of Clarity contracts (NFT collection, marketplace, SIP-010 token/strategy, and liquidity pool) managed with Clarinet.
The codebase targets the Stacks testnet by default and is designed for fast iteration on devnet.
This project has been created for the Stacks Vibe Coding Hackathon.
├── AGENTS.md # Contributor guide for AI/dev teammates
├── README.md # You are here
├── clarity/ # Clarity workspace (contracts, tests, deployments)
├── front-end/ # Next.js application
└── turbo.json, package.json, etc.
Complementary documentation:
- front-end/README.md – UI architecture, env vars, scripts, diagram.
- clarity/README.md – Contract overview, deployment flow, diagram.
- Node.js 18+
- npm (comes with Node)
- Clarinet CLI ≥ 1.10
- A funded Stacks deployer (for testnet deployments)
npm install # installs workspace root deps (Turbo, etc.)
cd clarity && npm install # installs Clarinet TypeScript tooling
cd ../front-end && npm installFront-end requires an .env file (see front-end/.env.example) with at minimum:
NEXT_PUBLIC_STACKS_NETWORK=testnet
NEXT_PUBLIC_PLATFORM_HIRO_API_KEY=... # optional for devnet helpers
NEXT_PUBLIC_TESTNET_DEPLOYER=... # principal that deployed contractsClarity deployments use clarity/settings/Testnet.toml—replace the mnemonic there if you deploy from a different wallet.
# 1. (optional) open a terminal for smart-contract checks
cd clarity
clarinet check
# 2. start the Next.js app
cd ../front-end
npm run devVisit http://localhost:3000. Switch between devnet/testnet in the navbar and connect either the built-in devnet wallet switcher or your Stacks wallet extension.
- Clarity:
cd clarity && npm test(vitest + Clarinet SDK) - Front-end: currently no automated tests; rely on manual smoke testing.
- Formatting/Lint: project uses ESLint/Prettier defaults; run
npm run lintinsidefront-endif configured.
-
Fund the deployer from the Stacks testnet faucet.
-
Update
clarity/deployments/default.testnet-plan.yamlif you need new contract names (Stacks does not allow overwriting). -
Apply the plan:
cd clarity clarinet deployments check -p deployments/default.testnet-plan.yaml clarinet deployments apply --testnet -p deployments/default.testnet-plan.yaml -
Record the resulting principals and update front-end env variables (
NEXT_PUBLIC_TESTNET_*). -
Restart
npm run devso the UI picks up the new configuration.
- Review contract logic with a qualified auditor.
- Add unit/integration tests for both contracts and UI.
- Harden wallet/post-condition handling for mainnet.
- Mirror deployment plan for mainnet and update env vars accordingly.
See the per-package READMEs for deeper details and architecture diagrams.
- Stacks Hacker House 2025
- DocuSign Envelope ID: EFC4C849-C0F9-499E-94AD-9633D0C3B3BE