Skip to content

Sdevzx/donate-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Donate

Donate System with Websocket + Node + React.js

คำเตือน: โปรเจกต์นี้จัดทำขึ้นเพื่อวัตถุประสงค์ในการศึกษาเท่านั้น (For Educational Purposes Only) ไม่แนะนำให้นำไปใช้งานจริงโดยไม่มีการตรวจสอบความปลอดภัยเพิ่มเติม

Features

  • Real-time Alerts: แจ้งเตือนการโดเนทแบบ Real-time ผ่าน Websocket
  • TTS (Text-to-Speech): ระบบอ่านข้อความโดเนทอัตโนมัติ
  • Profanity Filter: ระบบกรองคำหยาบภาษาไทย
  • Slip Verification: ตรวจสอบสลิปธนาคารอัตโนมัติผ่าน SLIPOK API
  • TrueWallet Voucher: รองรับการเติมเงินผ่านซองอั้งเปา TrueMoney Wallet
  • QR PromptPay: สร้าง QR Code PromptPay สำหรับการรับเงิน

Tools

Websocket (Backend) Nodejs (Backend) React.js (Frontend)

Installation

  1. Clone the repository
  2. Install dependencies:
    npm install
  3. Setup Database (Prisma):
    npx prisma generate
    npx prisma migrate dev

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

DATABASE_HOST="localhost"
DATABASE_PORT=3306
DATABASE_USER="root"
DATABASE_PASSWORD=""
DATABASE_NAME="donate"
SLIPOK_APIKEY=""
SLIPOK_SLIPID=""
REC_FULLNAME="นาย สมชาย สุขใจ"

Running the Server

# Development mode
npm run dev

# Production mode
npm start

API

/api/donate (Donate)

{
  "id": "TOPIC ID",
  "name": "Anonymous",
  "amount": 10,
  "message": "{Messages}"
}

/api/topup/qrpromptpay (Get QrPromptPay)

{
    "amount": 10
}

/api/topup/verifySlip API ตรวจสอบความถูกต้องชองสลิป ด้วย SLIPOK API และ ตรวจชื่อผู้รับ body Type form-data

    key: "image" value: {File}

/api/topup/truewalletredem API เติมเงินผ่าน อั้งเปา True Money Wallet body type raw json

data: {
    "voucher_code": {Vocher Url}
}

Authors

Badges

Apache License 2.0

About

Donate System with Websocket + Node + Reactjs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors