This server-side implementation is part of a POE Project for APDS7311, specifically designed for "SwiftPay", a secure and efficient payment processing platform. It leverages Node.js, Express.js, and MongoDB for seamless database operations.
- User registration with validation for name, ID number, account number, username, and password
- Secure password storage using Argon2
- Hashing and field-level encryption used to protect sensitive data
- Token-based authentication using JSON Web Tokens (JWT)
- Rate limiting and IP blocking for security against brute-force attacks
- Support for HTTPS encryption
- CORS enabled for cross-origin requests
- Helmet for security headers
- Express SSLify for HTTPS redirection
/customer/*
: Handles customer registration and logins/transaction/*
: Handles transaction-related operations/bankEmp/*
: Handles bank employee operations
- Node.js
- Express.js
- MongoDB
- Argon2id
- AES-256-CBC
- JSON Web Tokens (JWT)
- Express Brute
- Helmet
- Express SSLify
- CORS
- HTTPS
- SSL Certificate
- dotenv
- express-rate-limit
- express-slow-down
- mongoose
- nodemon
- validator
To set up and run the SwiftPay server, follow these steps:
- Clone the Repository: Clone the SwiftPay server repository from GitHub or your preferred version control system to a local directory on your machine.
- Install Dependencies: Navigate to the cloned repository directory and run
npm install
to install all the required dependencies specified in thepackage.json
file. - Start the Server: Once the dependencies are installed, start the server by running
node server.mjs
in your terminal or command prompt. - Server URL: The SwiftPay server will now be running on
https://localhost:3001
. - SSL Certificate: Ensure that the SSL certificates are properly configured and trusted by your system.
- Environment Variables: Set the required environment variables, such as
JWT_SECRET
, before running the server in production. - Database Connection: Ensure that MongoDB is installed and running on your system. Configure the MongoDB connection settings in the server code to match your MongoDB setup.
- Troubleshooting: Refer to the server logs for error messages and debugging information if you encounter any issues during setup or runtime.