CUTcoin is a comprehensive digital campus currency system designed for Chinhoyi University of Technology. The platform enables students to make cashless transactions across campus, merchants to accept digital payments, and administrators to oversee the entire ecosystem.
The system consists of three main components:
- Student Mobile App - For students to manage their CUTcoin wallets and make transactions
- Merchant Dashboard - For campus merchants to process transactions and manage their accounts
- Admin Dashboard - For university administrators to oversee the system, manage users, and generate reports
CUTcoin aims to create a seamless digital payment experience within the campus ecosystem, reducing the need for cash transactions and providing better financial tracking for all stakeholders.
The CUTcoin system follows a microservices architecture with the following components:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Student App │ │ Merchant Panel │ │ Admin Panel │
│ (Flutter) │ │ (Next.js) │ │ (Next.js) │
└────────┬────────┘ └────────┬────────┘ └────────┬────────┘
│ │ │
└───────────────┬───────┴───────────────┬───────┘
│ │
┌────────▼────────┐ ┌────────▼────────┐
│ API Gateway │ │ Authentication │
│ (Express.js) │◄────┤ Service │
└────────┬────────┘ └─────────────────┘
│
┌───────────────┼───────────────┐
│ │ │
┌────────▼────────┐ ┌─▼─┐ ┌───────▼────────┐
│ Transaction │ │ │ │ User Service │
│ Service │◄───┤DB │◄───┤ │
└─────────────────┘ └───┘ └─────────────────┘
▲ ▲ ▲
│ │ │
┌────────┴────────┐ ┌─┴─┐ ┌───────┴────────┐
│ Payment │ │ │ │ Notification │
│ Gateway │◄───┤DB │◄───┤ Service │
└─────────────────┘ └───┘ └─────────────────┘
- Frontend Applications: React Native for the student mobile app, Next.js for the merchant and admin dashboards
- Backend Services: Node.js/Express.js RESTful API services
- Database: PostgreSQL for relational data storage
- Authentication: JWT-based authentication system
- Payment Processing: Integration with Paynow payment gateway
- Notifications: Push notifications and email alerts
-
User Authentication
-
Student ID-based registration and login
-
Two-factor authentication
-
Password recovery
-
Wallet Management
-
View CUTcoin balance
-
Transaction history
-
Fund wallet via mobile money or bank transfer
-
Transactions
-
Scan QR codes to pay merchants
-
Peer-to-peer transfers to other students
-
Request money from other users
-
View and filter transaction history
-
Profile Management
-
Update personal information
-
Change password and security settings
-
Notification preferences
-
Notifications
-
Transaction alerts
-
Low balance warnings
-
Promotional offers from campus merchants
-
Authentication System
-
Secure login with merchant credentials
-
Two-factor authentication
-
Password reset functionality
-
Dashboard Overview
-
Transaction summary and statistics
-
Recent transaction activity
-
Pending transactions requiring action
-
Transaction Management
-
View all transactions with filtering and search
-
Process deposits and withdrawals
-
Confirm or reject pending transactions
-
Generate transaction reports
-
Wallet Management
-
View current balance
-
Deposit funds via Paynow
-
Transaction history
-
Profile Management
-
Update business information
-
Manage contact details
-
Security settings
-
Settings
-
Notification preferences
-
Account security options
-
Change password
-
User Management
-
Manage student accounts
-
Manage merchant accounts
-
Create and manage admin users
-
User verification and approval
-
Transaction Oversight
-
Monitor all system transactions
-
Investigate disputed transactions
-
Cancel or reverse transactions when necessary
-
Generate comprehensive transaction reports
-
System Configuration
-
Set transaction fees and limits
-
Configure exchange rates
-
Manage payment gateway integrations
-
System maintenance settings
-
Analytics and Reporting
-
Transaction volume analytics
-
User growth metrics
-
Revenue reports
-
Merchant performance analysis
-
Content Management
-
System announcements
-
Terms of service and policies
-
FAQ management
- Node.js - JavaScript runtime
- Express.js - Web application framework
- PostgreSQL - Relational database
- Sequelize - ORM for database interactions
- JWT - Authentication mechanism
- Paynow API - Payment gateway integration
- Nodemailer - Email notifications
- Next.js - React framework
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - UI component library
- Recharts - Charting library
- Lucide React - Icon library
- React Hook Form - Form validation
- Zod - Schema validation
- Flutter - Cross-platform mobile framework
- GET-X - State management
- GET-X - Navigation library
- DIO - HTTP client
- Node.js (v16 or later)
- npm or yarn
- PostgreSQL (v13 or later)
- Flutter development environment (for mobile app)
- Paynow merchant account
- Clone the repository
git clone https://github.com/your-organization/cutcoin-api.git
cd cutcoin-api
- Install dependencies
npm install
- Set up environment variables
cp .env.example .env
Edit the .env file with your database credentials and other configuration settings.
- Run database migrations
npm run migrate
- Seed the database with initial data
npm run seed
- Start the development server
npm run dev
- Clone the repository
git clone https://github.com/your-organization/cutcoin-merchant.git
cd cutcoin-merchant
- Install dependencies
npm install
- Set up environment variables
cp .env.example .env.local
Edit the .env.local file with your API URL and other configuration settings.
- Start the development server
npm run dev
- Build for production
npm run build
- Clone the repository
git clone https://github.com/your-organization/cutcoin-mobile.git
cd cutcoin-mobile
- Install dependencies
flutter pub get
- Set up environment variables
cp .env.example .env
Edit the .env file with your API URL and other configuration settings.
- Start the development server
flutter run
- Clone the repository
git clone https://github.com/your-organization/cutcoin-admin.git
cd cutcoin-admin
- Install dependencies
npm install
- Set up environment variables
cp .env.example .env.local
Edit the .env.local file with your API URL and other configuration settings.
- Start the development server
npm run dev
- Build for production
npm run build
The CUTcoin API follows RESTful principles and is organized into the following main endpoints:
POST /api/auth/login- User loginPOST /api/auth/register- User registrationPOST /api/auth/verify-otp- Verify OTP for two-factor authenticationPOST /api/auth/refresh-token- Refresh authentication tokenPOST /api/auth/forgot-password- Request password resetPOST /api/auth/reset-password- Reset password with code
POST /api/merchant-auth/login- Merchant loginPOST /api/merchant-auth/register- Merchant registrationPOST /api/merchant-auth/verify-otp- Verify merchant OTPGET /api/merchant/profile- Get merchant profilePUT /api/merchant/profile- Update merchant profileGET /api/merchant/dashboard/stats- Get dashboard statisticsGET /api/merchant/transactions- Get merchant transactionsGET /api/merchant/transactions/pending- Get pending transactionsPOST /api/merchant/transactions/deposit/merchant-confirm- Confirm depositPOST /api/merchant/transactions/withdraw/merchant-confirm- Confirm withdrawal
POST /api/payments/merchant/deposit-funds- Initiate merchant depositGET /api/payments/merchant/deposits- Get merchant depositsGET /api/payments/merchant/deposits/:id- Get specific depositPOST /api/payments/webhooks/paynow/return- Paynow return webhook
GET /api/users/profile- Get user profilePUT /api/users/profile- Update user profileGET /api/users/wallet/balance- Get wallet balanceGET /api/users/transactions- Get user transactions
POST /api/transactions/transfer- Create P2P transferPOST /api/transactions/payment- Create payment to merchantGET /api/transactions/:id- Get transaction details
For detailed API documentation, refer to the API Documentation (replace with actual documentation URL).
- Download the CUTcoin app from the App Store or Google Play
- Register using your student ID and university email
- Verify your account through the OTP sent to your email
- Set up your security preferences
- Navigate to the Wallet section
- Tap "Add Funds"
- Select your preferred payment method (mobile money, bank transfer, etc.)
- Follow the prompts to complete the payment
- To pay a merchant, tap "Pay" on the home screen
- Scan the merchant's QR code or enter their merchant ID
- Enter the amount and confirm the payment
- Verify the transaction with your PIN or biometrics
- Tap "Send" on the home screen
- Enter the recipient's student ID or scan their QR code
- Enter the amount and add a note (optional)
- Confirm the transfer with your PIN or biometrics
- Visit the CUTcoin Merchant website
- Click "Register" and fill out the merchant application form
- Verify your account through the OTP sent to your email
- Complete your business profile
- From the dashboard, generate a unique QR code for your business
- Display the QR code at your point of sale
- When a student scans your QR code and makes a payment, you'll receive a notification
- Confirm the payment in the "Pending Transactions" section
- Navigate to "Deposit Funds" in the sidebar
- Enter the amount you wish to deposit
- Click "Proceed to Payment"
- Complete the payment through Paynow
- Once confirmed, the funds will be added to your CUTcoin wallet
- Navigate to "Wallet" in the sidebar
- Click "Withdraw Funds"
- Enter the amount and your bank details
- Confirm the withdrawal request
- Funds will be transferred to your bank account within 1-3 business days
- Navigate to the "Users" section
- View, search, and filter users by type (student, merchant, admin)
- Click on a user to view detailed information
- Approve, suspend, or delete user accounts as needed
- Navigate to the "Transactions" section
- View all system transactions with advanced filtering options
- Click on a transaction to view details
- Handle disputed transactions and issue refunds if necessary
- Navigate to the "Settings" section
- Configure transaction fees, limits, and exchange rates
- Manage payment gateway integrations
- Set up system-wide notifications and announcements
The backend API can be deployed to any Node.js-compatible hosting service:
-
Vercel
-
Connect your GitHub repository
-
Configure environment variables
-
Deploy with automatic CI/CD
-
Heroku
-
heroku create cutcoin-api -
git push heroku main -
Configure environment variables through the Heroku dashboard
-
AWS Elastic Beanstalk
-
Create a new application
-
Upload your code or connect to your repository
-
Configure environment variables and scaling options
The Next.js applications can be deployed to:
-
Vercel
-
Connect your GitHub repository
-
Configure environment variables
-
Deploy with automatic CI/CD
-
Netlify
-
Connect your GitHub repository
-
Configure build settings and environment variables
-
Deploy with automatic CI/CD
The React Native application can be deployed to:
-
App Store (iOS)
-
Generate an iOS build using Expo or React Native CLI
-
Create an App Store Connect account
-
Submit your app for review
-
Google Play Store (Android)
-
Generate an Android APK or AAB using Expo or React Native CLI
-
Create a Google Play Developer account
-
Submit your app for review
The CUTcoin system implements several security measures:
- Authentication: JWT-based authentication with token expiration and refresh mechanisms
- Authorization: Role-based access control for different user types
- Data Protection: Encryption of sensitive data in transit and at rest
- Input Validation: Server-side validation of all user inputs
- Rate Limiting: Protection against brute force attacks
- Audit Logging: Comprehensive logging of all system activities
- Two-Factor Authentication: Optional 2FA for enhanced account security
We welcome contributions to the CUTcoin project! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please ensure your code follows our coding standards and includes appropriate tests.
This project is licensed under the MIT License - see the LICENSE file for details.
- Project Coordinator: [Name] - [email@example.com]
- Technical Lead: [Name] - [email@example.com]
- Support: [support@cutcoin.example.com]
© 2025 Chinhoyi University of Technology. All rights reserved.