https://github.com/devdhera/bsp-employee-portal
Suite of BSP Applications
https://github.com/devdhera/bsp-employee-portal
Last synced: about 1 year ago
JSON representation
Suite of BSP Applications
- Host: GitHub
- URL: https://github.com/devdhera/bsp-employee-portal
- Owner: DevDHera
- License: mit
- Created: 2018-04-18T14:16:29.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-01T15:59:55.000Z (over 3 years ago)
- Last Synced: 2025-02-06T04:43:56.206Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 459 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BSP - Employee Portal
>Banking System Prototype aka BSP is a initiative to make a change in Sri Lankas current banking facilities.
### System Overview
Employee Portal is a Feature Rich Alternative for existing Banking Portals. A good UI is hard to find in the current Bank System and this promises to change it.
### Technologies Used
* Node.js
* Express.js
* Passport.js
* Pusher
* CanvasJS
* Nodemailer
* Bcrypt
### Steps To Run
1. Install the modules.
```bash
npm install
```
2. Simply Run the App.
```bash
npm start
```
### Sample Codings
When creating a project in MEAN lot of us get lost not knowing how to achive a task.
This is my good will of show casing places we can all improve.
#### Mail Sending Through Node Apps
```javascript
const output = `
Thank You for Opening a account in BSP
Your Online Presence is as follows
- Name: ${req.body.firstName} ${req.body.lastName}
- Handle: ${handle}
- Email: ${password}
Important
Please make sure to use Handle when you log in...
`; // create reusable transporter object using the default SMTP transport
let transporter = nodemailer.createTransport({
host: keys.smtpHost,
port: keys.smtpPort,
secure: false, // true for 465, false for other ports
auth: {
user: keys.smtpUser, // generated ethereal user
pass: keys.smtpPass // generated ethereal password
},
tls: {
//ciphers: 'SSLv3',
rejectUnauthorized: false
}
});
// setup email data with unicode symbols
let mailOptions = {
from: `"BSP" <${keys.smtpUser}>`, // sender address
to: `${req.body.email}`, // list of receivers
subject: 'BSP BANKING', // Subject line
text: 'Welcome to BSP', // plain text body
html: output // html body
};
// send mail with defined transport object
transporter.sendMail(mailOptions, (error, info) => {
if (error) {
return console.log(error);
}
console.log('Message sent: %s', info.messageId);
// Preview only available when sending through an Ethereal account
console.log('Preview URL: %s', nodemailer.getTestMessageUrl(info));
```
### Tasks To Achive
* [x] Protect Routes
* [x] Optimized Local Strategy
* [x] Pusher Intergration
* [ ] Pusher problem solve