Reffinity is a referral tracking engine that tracks invitations via your wallet and rewards you based on your activity. Using Smart Contracts on the blockchain we store who referred who, how many points they have gained for different referral actions, and trigger rewards when you reach a milestone.
- Sam Spencer - Developer
- Aryan Pandit - Developer
- Peter Bou-Farah - Developer
Creating smart contracts that:
- Track and store referees and who they refered to
- Track each referees points and increase it based on activities
- Trigger rewards for the community when milestones are hit
- Prevent abuse by transparently displaying transactions and refferals on blockchain
Create a Web App that:
- Interacts with the smart contracts to interperet the trusted data in a meaningful way
- Acts as the off-chain "Real World" area, storing information like account information and rewards
- Performs any buisness logic that combines user input, the smart contract data, and external information
Create a UI that:
- Presents the referals and points in a meaningful and understandable way
- Interacts with a users wallet (ideally with metamask) to perform any transactions
- Allows users to create referal links and share them with others
- Allows the user to view their status, and change any settings with their account
- Is accessible and usable
Frontend:
- Next.js coupled with a https://ui.shadcn.com/ based component library
Backend:
- Node.js with a PostgreSQL DB
Sepolia Testnet:
- Runing our custom smart contracts
External
- MetaMask Wallet - to proccess transactions to the testnet
- JSON-RPC Bridge - API Bridge between our appication and the Sepolia network
- Indexer - graphs the blockchain data and transforms it into SQL-like datasets
- Connecting the smart contracts with the web app
- Securely handling the wallets of users
- Immutablility of the blockchain ( ensuring once we go from tests to more permenent solutions we are sure)
- As a group having elements away from traditional programing methods and working with the blockchain for the first time
- Node.js setup
- Solidity
- Link handling with the web app api
- Initial Smart Contract setup with basic functionality
- Connecting Node.js app to the smart contract
referral-system/
├── packages/
│ ├── shared/ # Shared types and utilities
│ ├── smart-contracts/ # Solidity contracts + ZK circuits
│ │ ├── contracts/ # Smart contracts
│ │ ├── circuits/ # Circom ZK circuits
│ │ └── test/ # Contract tests
│ └── subgraph/ # The Graph indexing
├── services/
│ ├── api/ # Backend API (Node.js + PostgreSQL)
│ │ ├── src/controllers/ # API endpoints
│ │ └── src/middlewares/ # Auth, validation
│ │ ├── src/models/ # Data Models
│ │ ├── src/routes/ # API Routes with OpenAPI documentation
│ │ ├── src/services/ # Business logic
│ └── web/ # Frontend (Next.js + React)
│ ├── app/ # App router pages
│ ├── components/ # UI components
│ └── services/ # API clients, blockchain
└── infra/
└── docker-compose.yaml # Optional global infrastructure
For first time setup you need to setup metamask wallet for the app
For running the app go to setup.md
TODO
See CONTRIBUTION.md to learn about contributions guidelines.
See CODE_OF_CONDUCT.md to learn about the code of conduct.
See the LICENSE file to learn more about this project's licensing.