Skip to content

ACOB-DEV/Trivela

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trivela

Trivela is a Stellar Soroban–based campaign and rewards platform. It lets campaign operators create on-chain campaigns, register participants, award points via smart contracts, and let users claim rewards—all on the Stellar network. The project is built for the Stellar Wave on Drips and is designed for open-source contributors.


What Trivela Does

  • Campaigns – Create and manage reward campaigns with on-chain configuration (Soroban).
  • Rewards contract – Tracks user points, credits (by admin/campaign), and claims.
  • Campaign contract – Stores campaign active flag and participant registration.
  • Backend API – REST API for campaign metadata, health checks, and integration.
  • Frontend – React app to list campaigns and (when wired) connect wallets and interact with contracts.

Use cases: loyalty points, drip campaigns, bounties, and any flow where you need on-chain rewards + off-chain campaign metadata.


Project Structure

Trivela/
├── contracts/           # Soroban (Rust) smart contracts
│   ├── rewards/         # Points balance, credit, claim
│   └── campaign/        # Campaign active flag, participant list
├── backend/             # Node.js Express API
├── frontend/            # React + Vite + Stellar SDK
├── Cargo.toml           # Rust workspace
├── package.json         # npm workspaces (backend + frontend)
└── README.md

Prerequisites


Git setup (maintainers)

If you cloned or created this repo without git:

./scripts/setup-git.sh
git add . && git commit -m "chore: initial Trivela scaffold"
git branch -M main && git push -u origin main

Use a Personal Access Token (PAT) with repo scope when pushing over HTTPS, or switch to SSH: git remote set-url origin git@github.com:FinesseStudioLab/Trivela.git.


Quick Start

1. Clone and install

git clone https://github.com/FinesseStudioLab/Trivela.git
cd Trivela
npm install

2. Build and run contracts (Soroban)

# Build both contracts
cd contracts/rewards && stellar contract build
cd ../campaign && stellar contract build

# Or with cargo (no Stellar CLI)
cargo build --target wasm32-unknown-unknown --release -p trivela-rewards-contract
cargo build --target wasm32-unknown-unknown --release -p trivela-campaign-contract

Deploy to testnet (after configuring an identity):

stellar contract deploy --wasm target/wasm32-unknown-unknown/release/trivela_rewards_contract.wasm --source alice --network testnet
stellar contract deploy --wasm target/wasm32-unknown-unknown/release/trivela_campaign_contract.wasm --source alice --network testnet

3. Run backend

cp backend/.env.example backend/.env
npm run dev:backend

API: http://localhost:3001 (health: http://localhost:3001/health).

4. Run frontend

npm run dev:frontend

App: http://localhost:5173 (proxies /api to the backend).


Testing

# Rust contracts
cargo test --workspace

# Backend (when tests exist)
npm run test:backend

Tech Stack

Layer Stack
Smart contracts Rust, Soroban SDK
Backend Node.js, Express
Frontend React, Vite, @stellar/stellar-sdk
Network Stellar (testnet/mainnet), Soroban RPC

Creating the 50 contributor issues (maintainers)

After the repo is pushed, create labels and open all 50 issues in GitHub in one go:

node scripts/create-github-issues.js

This reads PAT from .env.local, creates the repo labels, then creates each issue from docs/issues-data.json. Requires Node 18+ and a PAT with repo scope.

Contributing

We welcome contributions, especially from the Stellar and Drip community. Please read CONTRIBUTING.md and check the open issues for labeled tasks (backend, frontend, smart-contract, good first issue, etc.).


Resources


License

Apache-2.0. See LICENSE for details.

About

Campaign & rewards platform on Stellar Soroban — smart contracts, API, and React frontend. Built for Stellar Wave on Drips.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 44.9%
  • CSS 25.1%
  • Rust 21.2%
  • Shell 6.8%
  • HTML 2.0%