Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 17 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# UniCard

> This is an Open Source of my personal project *[PayCard](https://github.com/devzeeh/PayCard)*

![GitHub Release](https://img.shields.io/github/v/release/devzeeh/unicard)
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/devzeeh/unicard)
[![MySQL](https://img.shields.io/badge/MySQL-8.0-4479A1?style=flat&logo=mysql&logoColor=blue)](https://www.mysql.com/)
![Status](https://img.shields.io/badge/Status-Development-blue)
![GitHub Created At](https://img.shields.io/github/created-at/devzeeh/unicard)
![GitHub last commit](https://img.shields.io/github/last-commit/devzeeh/unicard)
Expand All @@ -17,36 +15,35 @@

## Overview

**PayCard** is a cashless payment solution designed for retail stores and transportation. Built with affordable hardware and accessible technology as a school project.
**Unicard** is a cashless payment solution designed for retail stores and transportation. Built with affordable hardware and accessible technology as a school project.
> **Note:** This project is for educational purposes only and not intended for commercial use.

## Why PayCard?
## Why Unicard?

- **Fast Contactless Payments** - Utilizes RFID (ESP32 + RC522) for quick, tap-to-pay functionality.
- **Affordable Hardware** - Built using low-cost, readily available components.
- **Rewards & Discount Logic** - Includes a proof-of-concept for a 20% fare discounts (e.g., for PWD/Students).
- **Unified System** - A single card system designed to handle both retail (itemized) and transport (fare) transactions.
- **Analytics Dashboard** - A simple dashboard for viewing transaction history and user data.

## Features

- **Card Lifecycle Management** - Core functions to register, activate, load, and block RFID cards.
- **Dual Payment Logic** - Handles both itemized billing (for retail) and distance-based fare calculation (for transport).
- **Reward Points System** - A proof-of-concept for calculating 0.2% cashback points per transaction.
- **Email Receipts** - Automatically sends transaction details via SMTP (e.g., Gmail) after a payment.
- **Web Dashboard** - A simple web interface for users, merchants, and admins to review transaction logs.
- **Transaction Security** - Implements card-to-server authentication, balance verification, and basic audit logging.
- **Card Lifecycle Management** - Core functions to register, activate, load, and block UniCard.
- **Dual Payment Logic** - Handles both itemized billing (for retail) and distance-based fare calculation (for transport). (QR Code & RFID)
- **Reward Points System** - Calculates 0.2% cashback points per transaction.
- **Email Receipts** - Automatically sends transaction details to users registered email after a successful transaction.
- **Web Dashboard** - A simple web interface for users, merchants, and admins to review transaction logs, user data, and card details.
- **Transaction Security** - Ensures secure data transmission, robust session management, and OTP verification to protect user accounts and payment information.

## Tech Stack (MVP Stack)

| Component | Technology |
|-----------|-----------|
| **Backend** | Go 1.22+ |
| **Database** | MySQL 8.0+ |
| **Payments** | Stripe API |
| **Backend** | Go 1.25 |
| **Database** | MySQL |
| **Payments** | Stripe |
| **Hardware** | ESP32 + RC522 RFID |
| **Frontend** | HTML, Tailwind CSS, JavaScript |
| **Email** | SMTP (Gmail) |
| **Email** | SMTP |
| **Version Control** | Git & GitHub |

## Quick Start
Expand All @@ -56,16 +53,16 @@ A video demonstration will be available here once the project is finalized.

### Transaction Flow
```
User taps card ➔ Validates balance ➔ Deducts payment ➔ Earns points ➔ Receipt sent
Tap Card -> Validate Balance -> Deduct Payment -> Update Data -> Earn Rewards -> Send Receipt -> Update Balance.
```

### Sample Fare Receipt

![Sample Fare Receipt](assets/images/Fare%20Receipt.png)
![Sample Fare Receipt](frontend/assets/images/Fare%20Receipt.png)

### Sample Retail Receipt

![Sample Retail Receipt](assets/images/Retail%20Receipt.png)
![Sample Retail Receipt](frontend/assets/images/Retail%20Receipt.png)

## Acknowledgements

Expand Down Expand Up @@ -93,6 +90,6 @@ This project was made possible by the incredible work of the following communiti

<small>Copyright © 2025 devzeeh. All Rights Reserved.</small>
<br />
[Back to Top](#paycard)
[Back to Top](#UniCard)

</div>