Architecture
How the web app, API routes, Prisma database, LLM engine, wallet layer, and future Solana programs fit together.
Last updated July 2, 2026
Current app architecture
Web app
Marketplace, docs, run, submit, and staking surfaces.
API routes
Skills, execution, staking, rate limits, and validation.
Database
Prisma index for skills, executions, and protocol stats.
LLM adapter
Provider routing with Cloudflare Workers AI and safe fallback.
Solana programs
Registry, receipts, staking pool, and fee router planned for production.
| Layer | Technology |
|---|---|
| Framework | Next.js 14 App Router and TypeScript. |
| Database | Prisma with SQLite locally. |
| Wallet | @solana/wallet-adapter with Phantom support. |
| LLM | Cloudflare Workers AI through an OpenAI-compatible server-side adapter. |
| Styling | Tailwind CSS design tokens with light and dark themes. |
| Deployment | Vercel or Docker. |
Future Solana program layer
- Skill Registry Program for canonical on-chain skill metadata and status.
- Staking Pool Program for $SKRN deposits, reward accounting, and claims.
- Execution Log Program for compact execution receipt accounts.
- Fee Router Program for atomic split between builder, stakers, and treasury.