├── .gitignore ├── views ├── Staff │ ├── studentReport.ejs │ ├── login.ejs │ ├── resetPassword.ejs │ ├── forgotPassword.ejs │ ├── dashboard.ejs │ ├── timetable.ejs │ ├── selectClass.ejs │ ├── selectClassReport.ejs │ └── selectClassAttendance.ejs ├── Includes │ ├── navbar.ejs │ ├── end.ejs │ ├── begin.ejs │ ├── admin_end.ejs │ ├── staff_end.ejs │ ├── student_end.ejs │ ├── messages.ejs │ ├── student_nav.ejs │ ├── staff_nav.ejs │ └── admin_nav.ejs ├── Student │ ├── login.ejs │ ├── resetPassword.ejs │ ├── forgotPassword.ejs │ ├── selectAttendance.ejs │ ├── dashboard.ejs │ ├── timetable.ejs │ └── attendance.ejs ├── error404.ejs ├── Admin │ ├── login.ejs │ ├── register.ejs │ ├── resetPassword.ejs │ ├── forgotPassword.ejs │ ├── Department │ │ ├── addDept.ejs │ │ ├── getDept.ejs │ │ └── setDept.ejs │ ├── passwordSettings.ejs │ ├── dashboard.ejs │ ├── Student │ │ ├── deptSelect.ejs │ │ └── getStudent.ejs │ ├── Staff │ │ ├── selectStaff.ejs │ │ └── getStaff.ejs │ ├── infoSettings.ejs │ ├── Course │ │ ├── getCourse.ejs │ │ ├── deptSelect.ejs │ │ └── addCourse.ejs │ └── Class │ │ ├── getClass.ejs │ │ └── addClass.ejs ├── error403.ejs ├── landing.ejs └── index.ejs ├── docs ├── usecase.jpg ├── db_design.png ├── er_model.png ├── architecture.png └── CMSNSIT_Report.pdf ├── public ├── CSS │ ├── main.css │ ├── admin-profile.css │ ├── error404.css │ ├── admin-dashboard.css │ └── student-dashboard.css └── JS │ └── attendance.js ├── controllers └── home.js ├── routes ├── home.js ├── student.js ├── staff.js └── admin.js ├── database ├── mysql.js ├── seed │ └── timetable.js └── cms.sql ├── package.json ├── LICENSE ├── app.js ├── middlewares ├── adminAuth.js ├── staffAuth.js └── studentAuth.js └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env -------------------------------------------------------------------------------- /views/Staff/studentReport.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/usecase.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vishal1003/CUMS_DBMS/HEAD/docs/usecase.jpg -------------------------------------------------------------------------------- /docs/db_design.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vishal1003/CUMS_DBMS/HEAD/docs/db_design.png -------------------------------------------------------------------------------- /docs/er_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vishal1003/CUMS_DBMS/HEAD/docs/er_model.png -------------------------------------------------------------------------------- /docs/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vishal1003/CUMS_DBMS/HEAD/docs/architecture.png -------------------------------------------------------------------------------- /docs/CMSNSIT_Report.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vishal1003/CUMS_DBMS/HEAD/docs/CMSNSIT_Report.pdf -------------------------------------------------------------------------------- /public/CSS/main.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-bottom: 30px; 3 | position: relative; 4 | min-height: 100%; 5 | } 6 | 7 | a { 8 | transition: background 0.2s, color 0.2s; 9 | } 10 | 11 | a:hover, 12 | a:focus { 13 | text-decoration: none; 14 | } 15 | 16 | .hidden { 17 | display: none; 18 | } -------------------------------------------------------------------------------- /views/Includes/navbar.ejs: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /controllers/home.js: -------------------------------------------------------------------------------- 1 | exports.getIndex = (req, res, next) => { 2 | res.render('index'); 3 | }; 4 | 5 | exports.getLanding = (req, res, next) => { 6 | res.render('landing'); 7 | } 8 | 9 | exports.getError403 = (req, res, next) => { 10 | res.render('error403'); 11 | } 12 | 13 | exports.getError404 = (req, res, next) => { 14 | res.render('error404'); 15 | } 16 | -------------------------------------------------------------------------------- /public/CSS/admin-profile.css: -------------------------------------------------------------------------------- 1 | .display-2 { 2 | font-size: 2.75rem; 3 | font-weight: 600; 4 | line-height: 1.5; 5 | } 6 | .mask { 7 | position: absolute; 8 | top: 0; 9 | left: 0; 10 | width: 100%; 11 | height: 100%; 12 | transition: all .15s ease; 13 | } 14 | 15 | @media screen and (prefers-reduced-motion: reduce) { 16 | .mask { 17 | transition: none; 18 | } 19 | } -------------------------------------------------------------------------------- /routes/home.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const homeController = require('../controllers/home'); 3 | 4 | const router = express.Router(); 5 | router.get('/', homeController.getLanding); 6 | 7 | router.get('/index', homeController.getIndex); 8 | 9 | router.get('/unauthorized', homeController.getError403); 10 | 11 | // should be in last 12 | router.use('/', homeController.getError404); 13 | 14 | module.exports = router; 15 | -------------------------------------------------------------------------------- /public/CSS/error404.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Trocchi; 3 | font-size: 50px; 4 | color: steelblue; 5 | text-align: center; 6 | } 7 | 8 | #container { 9 | margin: 100px; 10 | display: align-self; 11 | flex-flow: row wrap; 12 | align-items: center; 13 | } 14 | 15 | 16 | #middle { 17 | margin-top: -90px; 18 | font-size: 250px; 19 | font-weight: bold; 20 | } 21 | 22 | #bottom { 23 | font-size: 30px; 24 | } 25 | 26 | #errormsg { 27 | font-size: small; 28 | display: block; 29 | } -------------------------------------------------------------------------------- /database/mysql.js: -------------------------------------------------------------------------------- 1 | const mysql = require('mysql'); 2 | 3 | module.exports = class Mysql { 4 | static connect() { 5 | // establish connection 6 | const db = mysql.createConnection({ 7 | host: process.env.DB_HOST, 8 | user: process.env.DB_USER, 9 | password: process.env.DB_PASS, 10 | database: 'cumsdbms', 11 | }); 12 | // connect to database 13 | db.connect((err) => { 14 | if (err) { 15 | throw err; 16 | } 17 | console.log('Mysql Connected'); 18 | }); 19 | return db; 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /views/Includes/end.ejs: -------------------------------------------------------------------------------- 1 | 4 | 7 | 10 |