Skip to content

Online Tax Payment System with encryption algorithms.

Notifications You must be signed in to change notification settings

mustafamengutay/safepay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SafePay - Online Tax Payment System

Online Tax Payment System (OTPS) has three actors Sysadmin, Staff, and User. Sysadmin is responsible for introducing users to the system. Staff is responsible for entering/updating users’ tax records, calculating taxes, and sending users invoices for payment. The user receives invoices and pays. Users’ records are stored encrypted by DES. DES secret key is created/updated periodically by Staff. The server has a public/private RSA key pair. RSA digital signature is used when sending DES-encrypted invoices. RSA key pair is created/updated by Staff. The hash function (48 bits) used for the digital signature is obtained by XOR of plaintext blocks. Payments while travelling DES-encrypted are protected from tampering with by message authentication code (MAC).

Run Locally

Clone the project

  git clone https://github.com/mustafamengutay/safepay.git

Go to the project directory

  cd safepay-main

Install dependencies

  npm i
  npm run i-server

Start the server

  npm run dev

Environment Variables

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

MONGO_URI

API Reference

General

Login

  POST /login
Body Type Description
email string Required
password string Required

User

Get taxes

  GET /v1/user/taxes

Send the gross salary to the system

  PATCH /v1/user/gross-salary
Body Type Description
grossSalary number Required

Pay taxes

  POST /v1/user/tax-payment
Body Type Description
grossSalary number Required

Staff

Calculate taxes

  POST /v1/staff/tax-calculation
Body Type Description
userId string Required

Admin

Create a User

  POST /v1/admin/user
Body Type Description
name string Required
surname string Required
email string Required
password string Required

Create a Staff

  POST /v1/admin/staff
Body Type Description
email string Required
password string Required

Create an Admin

  POST /v1/admin/admin
Body Type Description
email string Required
password string Required

Tech Stack

Client: Loading...

Server: TypeScript, Node, Express, MongoDB

TODO

  • Add caching layer
  • Implement security-based algorithms (DES, RSA, etc.).

Releases

No releases published

Packages

No packages published