Skip to content

sukrit-89/Limoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PockForge

Multi-wallet spending control on Stellar.


Overview

PockForge is a precision financial control system built on Stellar Soroban smart contracts. One wallet (owner) sets, enforces, and monitors spending limits for multiple wallets on-chain.

This is not a consumer app. It's an institutional control interface—deliberate, restrained, rules-driven.


Architecture

Contract   → Soroban smart contract (Rust)
Frontend   → Institutional control interface (Next.js 16 + React)
Network    → Stellar Testnet

Deployed Contract

Network: Stellar Testnet
Contract ID:

CBDT2KDQBCZDHNKPA7RADCNBCHJ2RIUYWA5O4RRE7GQXQFOD3YY5J4UC

Explorer:
View on Stellar Expert →


Contract Functions

Function Access Purpose
initialize(owner, balance) Owner One-time vault setup
set_allowance(wallet, limit) Owner Assign spending limits
spend(wallet, amount) Wallet Execute spend within allowance
get_balance() Public Read current vault balance
get_owner() Public Read vault owner address
get_remaining(wallet) Public Read wallet's remaining allowance

Frontend

Local Development:

cd frontend
npm install
npm run dev

URL: http://localhost:3000

Requirements:

Design Principles:

  • Institutional banking aesthetic
  • Restrained, not expressive
  • Authoritative typography (Inter + IBM Plex Mono)
  • Single accent color (warm amber)
  • Data-row/table structure
  • No decorative elements

This interface feels like internal compliance software, not a consumer app.


Development

Contract

Build:

stellar contract build

Deploy:

cd scripts
.\deploy.ps1

Test:

.\interact.ps1

Frontend

Dev Server:

npm run dev

Production Build:

npm run build

Environment:
Configure frontend/.env.local with:

NEXT_PUBLIC_CONTRACT_ID=<your_contract_id>
NEXT_PUBLIC_NETWORK=testnet
NEXT_PUBLIC_HORIZON_URL=https://horizon-testnet.stellar.org
NEXT_PUBLIC_SOROBAN_RPC_URL=https://soroban-testnet.stellar.org

Project Structure

PockForge/
├── contract/
│   ├── src/
│   │   └── lib.rs              # Smart contract implementation
│   ├── Cargo.toml
│   └── Cargo.lock
│
├── frontend/
│   ├── app/
│   │   ├── page.tsx            # Main application
│   │   ├── layout.tsx          # Root layout
│   │   └── globals.css         # Institutional design system
│   ├── components/
│   │   ├── WalletConnect.tsx   # Freighter integration
│   │   ├── VaultDashboard.tsx  # State overview
│   │   ├── AllowanceManager.tsx# Owner controls
│   │   └── SpendInterface.tsx  # Spend execution
│   ├── lib/
│   │   ├── stellar.ts          # Contract integration
│   │   └── wallet.ts           # Wallet utilities
│   └── package.json
│
├── scripts/
│   ├── deploy.ps1              # Automated deployment
│   ├── interact.ps1            # Contract testing CLI
│   ├── build.ps1               # Build utilities
│   └── verify.ps1              # Contract verification
│
└── README.md

Design System

Color Palette:

Background:   #0A0E14  /* Near-black base */
Surface:      #141414  /* Elevated panels */
Border:       #2A2A2A  /* Subtle separation */
Text:         #E8E8E8  /* Off-white primary */
Accent:       #C49A6C  /* Warm amber (rationed) */
Success:      #6B9B6E  /* Muted green */
Error:        #D64545  /* Muted red */

Typography:

  • Display/Body: Inter (utilitarian sans-serif)
  • Data/Numbers: IBM Plex Mono (tabular figures)
  • Scale: Restrained hierarchy, WCAG AA compliant

Motion:

  • Transitions: 150ms max
  • Purposeful only (state changes, confirmations)
  • No decorative animations
  • No idle motion

Testing

Local Testing Flow:

  1. Deploy contract to Testnet using scripts\deploy.ps1
  2. Start frontend: npm run dev
  3. Install Freighter wallet extension
  4. Connect wallet to Testnet
  5. Test operations:
    • View vault state
    • Set allowances (owner only)
    • Execute spends (within allowance)
    • Monitor real-time updates

Contract Testing:

cd contract
cargo test --quiet

License

MIT


Built for Stellar Yellow Belt Challenge
Multi-wallet spending control with institutional precision.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors