Ethereum-based blockchain voucher system for event management by Katinrun Foundation. Create, distribute, and redeem digital vouchers using smart contracts.
- Overview
- Architecture
- Project Structure
- Prerequisites
- Installation
- Usage
- Smart Contracts
- Testing
- Deployment
- Components
- Contributing
- License
PKTF is an Ethereum-based private token system designed for the Katinrun Foundation to manage event vouchers through blockchain technology. The system consists of:
- Smart Contracts: Solidity-based ERC20-compatible token contracts with voucher functionality
- Voucher Creation: React-based admin interface for generating vouchers
- Voucher Redemption: Angular-based user interface for redeeming vouchers
- Backend Services: Node.js API servers handling voucher validation and wallet management
- Landing Page: Public-facing information portal
For detailed architecture information, read: Architecture Design of Ethereum-Based Private Katinrun Foundation Token
PKTF/
βββ contracts/ # Solidity smart contracts
β βββ PrivateKatinrunFoudation.sol
β βββ MintableWithVoucher.sol
β βββ ...
βββ migrations/ # Truffle deployment scripts
βββ test/ # Smart contract tests
βββ landing-page/ # React landing page
βββ voucher-react/ # React voucher creation app
βββ voucher-redeem/
βββ backend/ # Node.js API server
βββ frontend/ # Angular redemption app
- Node.js: >= 18.19.0
- npm: >= 9.0.0
- Truffle: For smart contract compilation and deployment
- Ganache: Local Ethereum blockchain for development
- MetaMask: Browser extension for Web3 interaction
git clone https://github.com/KatinrunFoundation/PKTF.git
cd PKTFnpm installcd landing-page
npm installcd voucher-react
npm installcd voucher-redeem/backend
npm installcd voucher-redeem/frontend
npm installnpm install -g ganache-cli
ganache-clinpm run compilenpm run migratecd landing-page
npm startAccess at: http://localhost:3000
cd voucher-react
npm startAccess at: http://localhost:3000
cd voucher-redeem/backend
npm startAPI available at: http://localhost:3001
cd voucher-redeem/frontend
npm startAccess at: http://localhost:4200
- PrivateKatinrunFoudation.sol: Main PKTF token contract
- MintableWithVoucher.sol: Extends token with voucher minting capabilities
- PrivateToken.sol: Base private token implementation
- PartialERC20.sol: ERC20 interface implementation
- ERC20-compatible token standard
- Voucher-based minting system
- Access control for token creation
- Migration support from legacy tokens
- Event emission for transparency
Run the complete test suite:
npm run testRun specific test file:
truffle test test/YourTest.js-
Configure your
.envfile with:MNEMONIC: Your wallet seed phraseINFURA_API_KEY: Your Infura API key
-
Deploy:
npm run migrate-kovanUpdate truffle-config.js with mainnet configuration and run:
truffle migrate --network mainnet- Built with React 18
- Styled with styled-components
- Responsive design with Rebass
- React 18 application
- Web3.js integration for blockchain interaction
- QR code generation for vouchers
- Semantic UI for interface
- Date/time picker for voucher expiration
- Express.js REST API
- Firebase Admin for authentication
- Web3 integration for on-chain verification
- Helmet for security
- CORS enabled
- Cron jobs for automated tasks
- Angular 18 application
- Firebase integration
- Web3 integration
- SweetAlert2 for notifications
- Bootstrap 5 UI framework
Edit truffle-config.js or truffle.js to:
- Configure network settings
- Set compiler versions
- Adjust gas limits
- Configure deployment accounts
Add your Firebase config to:
voucher-redeem/backend/- Service account credentialsvoucher-redeem/frontend/src/environments/- Firebase config
npm run compile- Compile smart contractsnpm run migrate- Deploy contracts locallynpm run test- Run contract testsnpm run migrate-kovan- Deploy to Kovan testnetnpm run console- Open Truffle consolenpm run version- Show Truffle version
npm start- Start development servernpm run build- Build for productionnpm test- Run testsnpm run eject- Eject from Create React App
npm start- Start development servernpm run build- Build for productionnpm test- Run unit testsnpm run lint- Lint codenpm run e2e- Run e2e tests
npm start- Start server
Contributions, issues, and feature requests are welcome!
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Feel free to check the issues page.
Katinrun Foundation
- GitHub: @KatinrunFoundation
Copyright Β© 2019-2025 Katinrun Foundation
This project is MIT licensed.
Give a star if this project helped you!
.png)
.png)