├── .gitignore ├── public ├── img │ ├── event1.jpg │ ├── event2.jpg │ ├── event3.jpg │ ├── team-1.png │ ├── team.jpg │ ├── video.png │ ├── brand-yt.png │ ├── events.jpeg │ ├── favicon.png │ ├── meeting.jpg │ ├── slider1.jpg │ ├── slider2.jpg │ ├── slider3.jpg │ ├── about1-team.png │ ├── error-404.png │ ├── hero-steve.jpg │ ├── home-hero.jpeg │ ├── logo-footer.jpg │ ├── upcoming.jpeg │ ├── departments.jpeg │ ├── circle-cropped.png │ ├── hero-department.jpg │ ├── Registration-Form.png │ ├── contact-confirmation.png │ ├── dept_page_carousel_1.png │ ├── dept_page_carousel_2.png │ ├── dept_page_carousel_3.png │ ├── dept_page_carousel_4.png │ ├── dept_page_carousel_5.png │ ├── dept_page_carousel_6.png │ ├── dept_page_carousel_7.png │ ├── about2-time-management.png │ ├── department_achievements.png │ ├── spinner.svg │ └── footer-bg.svg ├── fonts │ ├── LineIcons.eot │ ├── LineIcons.ttf │ ├── LineIcons.woff │ └── LineIcons.woff2 ├── js │ ├── scrolling-nav.js │ ├── plugins.js │ ├── toggle.js │ └── app.js └── css │ ├── slick.css │ └── tingle.min.css ├── postcss.config.js ├── utils ├── CatchAsync.js └── errorHandler.js ├── tailwind_src.css ├── views └── layouts │ ├── auth │ ├── partials │ │ ├── head.ejs │ │ ├── scripts.ejs │ │ └── links.ejs │ └── password-reset-email.ejs │ ├── home │ ├── partials │ │ ├── archive │ │ │ ├── head.ejs │ │ │ └── links.ejs │ │ ├── scripts.ejs │ │ └── head-links.ejs │ ├── sections │ │ ├── footer-credits.ejs │ │ ├── magazine-form.ejs │ │ ├── brands.ejs │ │ ├── event-description.ejs │ │ ├── suggest-event.ejs │ │ ├── all-departments.ejs │ │ ├── home-about-us.ejs │ │ ├── vision.ejs │ │ ├── contact-form.ejs │ │ ├── feedback-form.ejs │ │ ├── event-registration.ejs │ │ ├── navbar.ejs │ │ ├── event-organizers.ejs │ │ ├── event-hosts.ejs │ │ ├── event-sponsors.ejs │ │ ├── video-stats.ejs │ │ ├── features.ejs │ │ ├── about-us.ejs │ │ ├── event-timeline.ejs │ │ └── top3-department.ejs │ ├── credits.ejs │ ├── departments_page.ejs │ ├── event-page.ejs │ ├── department_page.ejs │ ├── event-landing.ejs │ └── home-new.ejs │ ├── dashboard │ ├── sections │ │ ├── dashboard-styles.css │ │ ├── scripts.ejs │ │ ├── head.ejs │ │ ├── key-gen.ejs │ │ ├── department-edit-form.ejs │ │ ├── profile-form.ejs │ │ ├── header.ejs │ │ ├── external-links.ejs │ │ ├── contact-form.ejs │ │ └── stat-card.ejs │ ├── events.ejs │ ├── profile.ejs │ ├── event-participants.ejs │ ├── messages.ejs │ ├── participant-events.ejs │ ├── participants.ejs │ ├── all-messages.ejs │ ├── board.ejs │ ├── key-gen.ejs │ └── department.ejs │ └── error-404.ejs ├── tailwind.config.js ├── .env.example ├── models ├── regKey.js ├── newsletter.js ├── event-suggestion.js ├── magazine-reciever.js ├── internship.js ├── dept.js ├── participant.js ├── contact.js ├── feedback.js ├── event.js └── staff.js ├── routes ├── index.js ├── dashboard │ ├── board.js │ ├── mag-subs.js │ ├── participant.js │ ├── profile.js │ ├── key-generate.js │ ├── contact.js │ ├── internship.js │ ├── index.js │ ├── department.js │ └── events.js ├── department.js ├── home.js ├── event.js └── auth.js ├── src └── styles.css ├── LICENSE ├── package.json ├── seeds ├── event_seed.js ├── staff_seed.js ├── department_seed.js └── participant_seed.js ├── controllers ├── dashboardCont │ ├── board.js │ ├── keyGenerate.js │ ├── magazine.js │ ├── index.js │ └── profile.js └── deptCont.js └── server.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | package-lock.json 4 | .vscode -------------------------------------------------------------------------------- /public/img/event1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/event1.jpg -------------------------------------------------------------------------------- /public/img/event2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/event2.jpg -------------------------------------------------------------------------------- /public/img/event3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/event3.jpg -------------------------------------------------------------------------------- /public/img/team-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/team-1.png -------------------------------------------------------------------------------- /public/img/team.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/team.jpg -------------------------------------------------------------------------------- /public/img/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/video.png -------------------------------------------------------------------------------- /public/img/brand-yt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/brand-yt.png -------------------------------------------------------------------------------- /public/img/events.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/events.jpeg -------------------------------------------------------------------------------- /public/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/favicon.png -------------------------------------------------------------------------------- /public/img/meeting.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/meeting.jpg -------------------------------------------------------------------------------- /public/img/slider1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/slider1.jpg -------------------------------------------------------------------------------- /public/img/slider2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/slider2.jpg -------------------------------------------------------------------------------- /public/img/slider3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/slider3.jpg -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /public/fonts/LineIcons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/fonts/LineIcons.eot -------------------------------------------------------------------------------- /public/fonts/LineIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/fonts/LineIcons.ttf -------------------------------------------------------------------------------- /public/img/about1-team.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/about1-team.png -------------------------------------------------------------------------------- /public/img/error-404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/error-404.png -------------------------------------------------------------------------------- /public/img/hero-steve.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/hero-steve.jpg -------------------------------------------------------------------------------- /public/img/home-hero.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/home-hero.jpeg -------------------------------------------------------------------------------- /public/img/logo-footer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/logo-footer.jpg -------------------------------------------------------------------------------- /public/img/upcoming.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/upcoming.jpeg -------------------------------------------------------------------------------- /public/fonts/LineIcons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/fonts/LineIcons.woff -------------------------------------------------------------------------------- /public/fonts/LineIcons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/fonts/LineIcons.woff2 -------------------------------------------------------------------------------- /public/img/departments.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/departments.jpeg -------------------------------------------------------------------------------- /public/img/circle-cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/circle-cropped.png -------------------------------------------------------------------------------- /public/img/hero-department.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/hero-department.jpg -------------------------------------------------------------------------------- /public/img/Registration-Form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/Registration-Form.png -------------------------------------------------------------------------------- /public/img/contact-confirmation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/contact-confirmation.png -------------------------------------------------------------------------------- /public/img/dept_page_carousel_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/dept_page_carousel_1.png -------------------------------------------------------------------------------- /public/img/dept_page_carousel_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/dept_page_carousel_2.png -------------------------------------------------------------------------------- /public/img/dept_page_carousel_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/dept_page_carousel_3.png -------------------------------------------------------------------------------- /public/img/dept_page_carousel_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/dept_page_carousel_4.png -------------------------------------------------------------------------------- /public/img/dept_page_carousel_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/dept_page_carousel_5.png -------------------------------------------------------------------------------- /public/img/dept_page_carousel_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/dept_page_carousel_6.png -------------------------------------------------------------------------------- /public/img/dept_page_carousel_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/dept_page_carousel_7.png -------------------------------------------------------------------------------- /public/img/about2-time-management.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/about2-time-management.png -------------------------------------------------------------------------------- /public/img/department_achievements.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LastComrade/Event-Management-System/HEAD/public/img/department_achievements.png -------------------------------------------------------------------------------- /utils/CatchAsync.js: -------------------------------------------------------------------------------- 1 | // Ignore this file its still in the development proccess 2 | 3 | module.exports = (func) => { 4 | return (req, res, next) => { 5 | func(req, res, next).catch(next); 6 | }; 7 | }; 8 | -------------------------------------------------------------------------------- /tailwind_src.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); 2 | 3 | @tailwind base; 4 | @tailwind components; 5 | @tailwind utilities; -------------------------------------------------------------------------------- /views/layouts/auth/partials/head.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | E-Cell | GNDEC 6 | 7 | 8 | -------------------------------------------------------------------------------- /views/layouts/home/partials/archive/head.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | E-Cell | GNDEC 6 | 7 | 8 | -------------------------------------------------------------------------------- /views/layouts/dashboard/sections/dashboard-styles.css: -------------------------------------------------------------------------------- 1 | .header-right { 2 | width: calc(100% - 3.5rem); 3 | } 4 | 5 | .sidebar:hover { 6 | width: 16rem; 7 | } 8 | 9 | @media only screen and (min-width: 768px) { 10 | .header-right { 11 | width: calc(100% - 16rem); 12 | } 13 | } -------------------------------------------------------------------------------- /views/layouts/home/sections/footer-credits.ejs: -------------------------------------------------------------------------------- 1 |
2 |

3 | Designed & Developed By Technical Team, E-Cell. 5 |

6 |
-------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | purge: [], 3 | darkMode: "class", // or 'media' or 'class' 4 | theme: { 5 | fontFamily: { 6 | mont: ['montserrat', "sans-serif"] 7 | }, 8 | 9 | extend: {}, 10 | }, 11 | variants: { 12 | extend: {}, 13 | }, 14 | plugins: [], 15 | }; 16 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | PORT = 2 | DB_URL = 3 | EMAIL_ID = 4 | EMAIL_PASSWORD = 5 | DB_PASSWORD_FOR_KOANRK123456 = 6 | JWT_ACCOUNT_ACTIVATION_SECRET = 7 | JWT_SECRET = 8 | JWT_RESET_PASSWORD_SECRET = 9 | SESSION_SECRET = 10 | event_spreadsheet_id = 11 | magazineRecievers_spreadsheet_id = 12 | client_email = 13 | private_key = 14 | magazineRecieverSheet = -------------------------------------------------------------------------------- /models/regKey.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | const RegisterKeySchema = mongoose.Schema({ 4 | key: { 5 | type: String, 6 | unique: true, 7 | required: true 8 | }, 9 | used: { 10 | type: Boolean, 11 | default: false 12 | }, 13 | usedBy: { 14 | type: String, 15 | default: "" 16 | } 17 | }, 18 | { 19 | timestamps: true, 20 | } 21 | ) 22 | 23 | module.exports = mongoose.model("RegisterKey", RegisterKeySchema); -------------------------------------------------------------------------------- /models/newsletter.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | const Schema = mongoose.Schema; 3 | 4 | const NewsletterSchema = Schema( 5 | { 6 | email: { 7 | type: String, 8 | required: true, 9 | }, 10 | 11 | subscribe: { 12 | type: Boolean, 13 | default: true, 14 | } 15 | }, 16 | { timestamps: true } 17 | ); 18 | 19 | module.exports = mongoose.model("Newsletter", NewsletterSchema); 20 | -------------------------------------------------------------------------------- /routes/index.js: -------------------------------------------------------------------------------- 1 | const router = require("express").Router(); 2 | const auth = require("./auth"); 3 | const department = require("./department"); 4 | const eventRoutes = require("./event"); 5 | const dashboard = require("./dashboard"); 6 | const home = require("./home"); 7 | 8 | router.use("/", auth); 9 | router.use("/", department); 10 | router.use("/", eventRoutes); 11 | router.use("/", dashboard); 12 | router.use("/", home); 13 | 14 | // Exporting routes 15 | module.exports = router; 16 | -------------------------------------------------------------------------------- /src/styles.css: -------------------------------------------------------------------------------- 1 | /* ./your-css-folder/styles.css */ 2 | @tailwind base; 3 | @tailwind components; 4 | @tailwind utilities; 5 | 6 | input:focus-within ~ label, 7 | input:not(:placeholder-shown) ~ label { 8 | @apply transform scale-75 -translate-y-6; 9 | } 10 | 11 | input:focus-within ~ label { 12 | @apply text-blue-500; 13 | } 14 | 15 | .outline input:focus-within ~ label, 16 | .outline input:not(:placeholder-shown) ~ label { 17 | @apply transform scale-75 -translate-y-4 z-0 ml-3 px-1 py-0; 18 | } -------------------------------------------------------------------------------- /routes/dashboard/board.js: -------------------------------------------------------------------------------- 1 | const router = require("express").Router(); // Router is a function in the express which can be used to return an array of routes and methods 2 | const dboardCont = require("../../controllers/dashboardCont/index"); // Controller functions for staff-login routes 3 | const authMid = require("../../middleware/auth"); 4 | 5 | router 6 | .route("/dashboard/board") 7 | .get(authMid.authRequired, authMid.staffCheck, dboardCont.boardIndex); 8 | 9 | // Exporting routes 10 | module.exports = router; 11 | -------------------------------------------------------------------------------- /models/event-suggestion.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | const Schema = mongoose.Schema; 3 | 4 | const eventSuggestion = Schema( 5 | { 6 | name: { 7 | type: String, 8 | required: true, 9 | }, 10 | 11 | email: { 12 | type: String, 13 | required: true, 14 | }, 15 | 16 | description: { 17 | type: String, 18 | required: true, 19 | } 20 | }, 21 | { timestamps: true } 22 | ); 23 | 24 | module.exports = mongoose.model("EventSuggestion", eventSuggestion); 25 | -------------------------------------------------------------------------------- /models/magazine-reciever.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | 3 | const MagazineRecieverSchema = mongoose.Schema( 4 | { 5 | email: { 6 | type: String, 7 | required: true, 8 | unique: true 9 | }, 10 | subscribed: { 11 | type: Boolean, 12 | default: true 13 | }, 14 | sheet_position: { 15 | type: String, 16 | default: "0" 17 | }, 18 | }, 19 | { 20 | timestamps: true, 21 | } 22 | ); 23 | 24 | module.exports = mongoose.model("MagazineReciever", MagazineRecieverSchema); -------------------------------------------------------------------------------- /routes/dashboard/mag-subs.js: -------------------------------------------------------------------------------- 1 | const router = require("express").Router(); // Router is a function in the express which can be used to return an array of routes and methods 2 | const dboardCont = require("../../controllers/dashboardCont"); // Controller functions for staff-login routes 3 | const authMid = require("../../middleware/auth"); 4 | 5 | router 6 | .route("/dashboard/magazine-subscribers") 7 | .get(authMid.authRequired, authMid.staffCheck, authMid.teamLeaderLevelAuth, dboardCont.magazineSubsIndex); 8 | 9 | // Exporting routes 10 | module.exports = router; 11 | -------------------------------------------------------------------------------- /public/img/spinner.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /routes/department.js: -------------------------------------------------------------------------------- 1 | const router = require("express").Router(); 2 | const validate = require("../middleware/validation"); 3 | const deptCont = require("../controllers/deptCont"); 4 | 5 | router.route("/departments").get(deptCont.allIndex); 6 | 7 | router 8 | .route("/department-create-101") 9 | .get(deptCont.index) 10 | .post(validate.deptCreate, deptCont.createDept); 11 | 12 | router.route("/departments/:name").get(deptCont.finder); 13 | 14 | router 15 | .route("/departments/:name/internship-register") 16 | .post(validate.internshipRegister, deptCont.internshipRegister); 17 | 18 | // Exporting routes 19 | module.exports = router; 20 | -------------------------------------------------------------------------------- /routes/dashboard/participant.js: -------------------------------------------------------------------------------- 1 | const router = require("express").Router(); // Router is a function in the express which can be used to return an array of routes and methods 2 | const dboardCont = require("../../controllers/dashboardCont"); // Controller functions for staff-login routes 3 | const authMid = require("../../middleware/auth"); 4 | 5 | router 6 | .route("/dashboard/participants") 7 | .get( 8 | authMid.authRequired, 9 | authMid.staffCheck, 10 | dboardCont.participantsRetriver 11 | ); 12 | 13 | router 14 | .route("/dashboard/participants/:id") 15 | .get(authMid.authRequired, authMid.staffCheck, dboardCont.pidEventRetriver); 16 | 17 | // Exporting routes 18 | module.exports = router; 19 | -------------------------------------------------------------------------------- /models/internship.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | const Schema = mongoose.Schema; 3 | 4 | const InternshipSchema = Schema( 5 | { 6 | name: { 7 | type: String, 8 | required: true, 9 | }, 10 | preferred_dept_1: { 11 | type: String, 12 | default: "No Preference" 13 | }, 14 | preferred_dept_2: { 15 | type: String, 16 | default: "No Preference" 17 | }, 18 | email: { 19 | type: String, 20 | required: true, 21 | }, 22 | description: { 23 | type: String, 24 | reuired: true, 25 | }, 26 | }, 27 | { 28 | timestamps: true, 29 | } 30 | ); 31 | 32 | module.exports = mongoose.model("Internship", InternshipSchema); 33 | -------------------------------------------------------------------------------- /routes/dashboard/profile.js: -------------------------------------------------------------------------------- 1 | const router = require("express").Router(); // Router is a function in the express which can be used to return an array of routes and methods 2 | const dboardCont = require("../../controllers/dashboardCont"); // Controller functions for staff-login routes 3 | const authMid = require("../../middleware/auth"); 4 | const validate = require("../../middleware/validation"); 5 | 6 | router 7 | .route("/dashboard/profile") 8 | .get(authMid.authRequired, authMid.staffCheck, dboardCont.profileIndex); 9 | 10 | router 11 | .route("/dashboard/profile/edit") 12 | .post( 13 | authMid.authRequired, 14 | authMid.staffCheck, 15 | validate.profileUpdate, 16 | dboardCont.profileEdit 17 | ); 18 | 19 | // Exporting routes 20 | module.exports = router; 21 | -------------------------------------------------------------------------------- /models/dept.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | const Schema = mongoose.Schema; 3 | 4 | const DeptSchema = Schema( 5 | { 6 | name: { 7 | type: String, 8 | required: true, 9 | }, 10 | tagline: { 11 | type: String, 12 | required: true, 13 | }, 14 | description: { 15 | type: String, 16 | required: true, 17 | }, 18 | pic: { 19 | type: String, 20 | required: true, 21 | }, 22 | members: [ 23 | { 24 | type: mongoose.Schema.Types.ObjectId, 25 | ref: "Staff", 26 | }, 27 | ], 28 | recruiting: { 29 | type: Boolean, 30 | default: false, 31 | }, 32 | }, 33 | { timestamps: true } 34 | ); 35 | 36 | module.exports = mongoose.model("Department", DeptSchema); 37 | -------------------------------------------------------------------------------- /routes/home.js: -------------------------------------------------------------------------------- 1 | const router = require("express").Router(); 2 | const validate = require("../middleware/validation"); 3 | const homeCont = require("../controllers/homeCont"); 4 | 5 | router.route("/").get(homeCont.index).post(validate.contact, homeCont.contact); 6 | 7 | router.route("/newsletter-sub").post(validate.newsletter, homeCont.newsletter); 8 | 9 | router 10 | .route("/monthly-magazine") 11 | .post(validate.magazineEmail, homeCont.registerMagazineEmail); 12 | 13 | router 14 | .route("/monthly-magazine/unsubscribe/:id") 15 | .post(validate.magazine, homeCont.unSubMagazineEmail); 16 | 17 | router.route("/credits").get(homeCont.creditIndex); 18 | 19 | router.route("/feedback").post(validate.contact, homeCont.feedback); 20 | 21 | // Exporting routes 22 | module.exports = router; 23 | -------------------------------------------------------------------------------- /public/js/scrolling-nav.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | $('a.scroll-page[href*="#"]:not([href="#"])').on("click", function () { 3 | if ( 4 | location.pathname.replace(/^\//, "") == 5 | this.pathname.replace(/^\//, "") && 6 | location.hostname == this.hostname 7 | ) { 8 | var target = $(this.hash); 9 | target = target.length 10 | ? target 11 | : $("[name=" + this.hash.slice(1) + "]"); 12 | if (target.length) { 13 | $("html, body").animate( 14 | { scrollTop: target.offset().top - 60 }, 15 | 1200, 16 | "easeInOutExpo" 17 | ); 18 | return false; 19 | } 20 | } 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /routes/dashboard/key-generate.js: -------------------------------------------------------------------------------- 1 | const router = require("express").Router(); // Router is a function in the express which can be used to return an array of routes and methods 2 | const dboardCont = require("../../controllers/dashboardCont"); // Controller functions for staff-login routes 3 | const authMid = require("../../middleware/auth"); 4 | 5 | // protected route to genetrate the register key 6 | router 7 | .route("/dashboard/generate-key") 8 | .get(authMid.authRequired, authMid.staffCheck, authMid.presidentLevelAuth, dboardCont.registerKeyIndex); 9 | 10 | router 11 | .route("/dashboard/generate-key/create") 12 | .get( 13 | authMid.authRequired, 14 | authMid.staffCheck, 15 | authMid.presidentLevelAuth, 16 | dboardCont.registerKeyGenerator 17 | ); 18 | 19 | // Exporting routes 20 | module.exports = router; 21 | -------------------------------------------------------------------------------- /models/participant.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | const Schema = mongoose.Schema; 3 | 4 | const ParticipantSchema = Schema( 5 | { 6 | name: { 7 | type: String, 8 | required: true, 9 | }, 10 | email: { 11 | type: String, 12 | required: true, 13 | unique: true 14 | }, 15 | college_name: { 16 | type: String, 17 | required: true, 18 | }, 19 | linkedin_account: { 20 | type: String, 21 | required: true, 22 | }, 23 | registered_events: [{ 24 | type: mongoose.Schema.Types.ObjectId, 25 | ref: "Event" 26 | }], 27 | }, 28 | { timestamps: true } 29 | ); 30 | 31 | module.exports = mongoose.model("Participant", ParticipantSchema); 32 | -------------------------------------------------------------------------------- /views/layouts/dashboard/sections/scripts.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /routes/event.js: -------------------------------------------------------------------------------- 1 | const router = require("express").Router(); 2 | const validate = require("../middleware/validation"); 3 | const eventCont = require("../controllers/eventCont"); 4 | 5 | router.route("/events").get(eventCont.eventIndex); 6 | 7 | router.route("/events/live/all").get(eventCont.liveEventsRetriver); 8 | 9 | router.route("/events/ongoing/all").get(eventCont.ongoingEventsRetriver); 10 | 11 | router.route("/events/upcoming/all").get(eventCont.upcomingEventsRetriver); 12 | 13 | router.route("/events/archived/all").get(eventCont.archivedEventsRetriver); 14 | 15 | router 16 | .route("/events-suggestion") 17 | .post(validate.eventSuggestion, eventCont.eventSuggest); 18 | 19 | router 20 | .route("/events/:name") 21 | .get(eventCont.finder) 22 | .post(validate.participantRegister, eventCont.registerParticipant); 23 | 24 | // Exporting routes 25 | module.exports = router; 26 | -------------------------------------------------------------------------------- /routes/dashboard/contact.js: -------------------------------------------------------------------------------- 1 | const router = require("express").Router(); // Router is a function in the express which can be used to return an array of routes and methods 2 | const dboardCont = require("../../controllers/dashboardCont"); // Controller functions for staff-login routes 3 | const authMid = require("../../middleware/auth"); 4 | 5 | router 6 | .route("/dashboard/contact-messages") 7 | .get( 8 | authMid.authRequired, 9 | authMid.staffCheck, 10 | dboardCont.contactMessageIndex 11 | ); 12 | 13 | router 14 | .route("/dashboard/contact-messages/all") 15 | .get(authMid.authRequired, authMid.staffCheck, dboardCont.allContactMessages); 16 | 17 | router 18 | .route("/dashboard/contact-messages/:id") 19 | .get(authMid.authRequired, authMid.staffCheck, authMid.teamLeaderLevelAuth, dboardCont.idContactMessage); 20 | 21 | // Exporting routes 22 | module.exports = router; 23 | -------------------------------------------------------------------------------- /public/js/plugins.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | var method; 3 | var noop = function () {}; 4 | var methods = [ 5 | "assert", 6 | "clear", 7 | "count", 8 | "debug", 9 | "dir", 10 | "dirxml", 11 | "error", 12 | "exception", 13 | "group", 14 | "groupCollapsed", 15 | "groupEnd", 16 | "info", 17 | "log", 18 | "markTimeline", 19 | "profile", 20 | "profileEnd", 21 | "table", 22 | "time", 23 | "timeEnd", 24 | "timeline", 25 | "timelineEnd", 26 | "timeStamp", 27 | "trace", 28 | "warn", 29 | ]; 30 | var length = methods.length; 31 | var console = (window.console = window.console || {}); 32 | while (length--) { 33 | method = methods[length]; 34 | if (!console[method]) { 35 | console[method] = noop; 36 | } 37 | } 38 | })(); 39 | -------------------------------------------------------------------------------- /routes/dashboard/internship.js: -------------------------------------------------------------------------------- 1 | const router = require("express").Router(); // Router is a function in the express which can be used to return an array of routes and methods 2 | const dboardCont = require("../../controllers/dashboardCont"); // Controller functions for staff-login routes 3 | const authMid = require("../../middleware/auth"); 4 | 5 | router 6 | .route("/dashboard/internship-applications") 7 | .get( 8 | authMid.authRequired, 9 | authMid.staffCheck, 10 | dboardCont.internshipApplicationIndex 11 | ); 12 | 13 | router 14 | .route("/dashboard/internship-applications/all") 15 | .get( 16 | authMid.authRequired, 17 | authMid.staffCheck, 18 | dboardCont.allInternshipMessages 19 | ); 20 | 21 | router 22 | .route("/dashboard/internship-applications/:id") 23 | .get( 24 | authMid.authRequired, 25 | authMid.staffCheck, 26 | authMid.teamLeaderLevelAuth, 27 | dboardCont.idInternshipMessage 28 | ); 29 | 30 | // Exporting routes 31 | module.exports = router; 32 | -------------------------------------------------------------------------------- /models/contact.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); // Using mongoose open-source npm package to work with mongoDB DataBase 2 | const Schema = mongoose.Schema; // Using Schema class to create models and saving that models into the DB 3 | 4 | // Schema is like an instance of the model that has to saved into the DB 5 | 6 | // Contact Schema 7 | const contactSchema = new Schema( 8 | { 9 | // Name is stored with type of string and it cant be undefined 10 | name: { 11 | type: String, 12 | required: true, 13 | }, 14 | 15 | // Same for email 16 | email: { 17 | type: String, 18 | required: true, 19 | }, 20 | 21 | // Same for message 22 | message: { 23 | type: String, 24 | required: true, 25 | }, 26 | }, 27 | { timestamps: true } 28 | ); 29 | 30 | // creating the model of the schema and then exporting it 31 | module.exports = mongoose.model("Contact", contactSchema); 32 | -------------------------------------------------------------------------------- /models/feedback.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); // Using mongoose open-source npm package to work with mongoDB DataBase 2 | const Schema = mongoose.Schema; // Using Schema class to create models and saving that models into the DB 3 | 4 | // Schema is like an instance of the model that has to saved into the DB 5 | 6 | // Contact Schema 7 | const feedbackSchema = new Schema( 8 | { 9 | // Name is stored with type of string and it cant be undefined 10 | name: { 11 | type: String, 12 | required: true, 13 | }, 14 | 15 | // Same for email 16 | email: { 17 | type: String, 18 | required: true, 19 | }, 20 | 21 | // Same for message 22 | message: { 23 | type: String, 24 | required: true, 25 | }, 26 | }, 27 | { timestamps: true } 28 | ); 29 | 30 | // creating the model of the schema and then exporting it 31 | module.exports = mongoose.model("Feedback", feedbackSchema); 32 | -------------------------------------------------------------------------------- /views/layouts/home/partials/scripts.ejs: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /routes/dashboard/index.js: -------------------------------------------------------------------------------- 1 | const router = require("express").Router(); 2 | const dboardCont = require("../../controllers/dashboardCont/index"); 3 | const authMid = require("../../middleware/auth"); 4 | const contact = require("./contact"); 5 | const events = require("./events"); 6 | const board = require("./board"); 7 | const department = require("./department"); 8 | const internship = require("./internship"); 9 | const keyGenerate = require("./key-generate"); 10 | const magSubs = require("./mag-subs"); 11 | const participant = require("./participant"); 12 | const profile = require("./profile"); 13 | 14 | // Staff Dashboard 15 | router 16 | .route("/dashboard") 17 | .get(authMid.authRequired, authMid.staffCheck, dboardCont.staffDashboard); 18 | 19 | router.use("/", contact); 20 | router.use("/", events); 21 | router.use("/", board); 22 | router.use("/", department); 23 | router.use("/", internship); 24 | router.use("/", keyGenerate); 25 | router.use("/", magSubs); 26 | router.use("/", participant); 27 | router.use("/", profile); 28 | 29 | // Exporting routes 30 | module.exports = router; 31 | 32 | -------------------------------------------------------------------------------- /public/img/footer-bg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Konark Lohat 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /routes/dashboard/department.js: -------------------------------------------------------------------------------- 1 | const router = require("express").Router(); // Router is a function in the express which can be used to return an array of routes and methods 2 | const dboardCont = require("../../controllers/dashboardCont"); // Controller functions for staff-login routes 3 | const authMid = require("../../middleware/auth"); 4 | const validate = require("../../middleware/validation"); 5 | 6 | router 7 | .route("/dashboard/department") 8 | .get( 9 | authMid.authRequired, 10 | authMid.staffCheck, 11 | authMid.teamLeaderLevelAuth, 12 | dboardCont.departmentRetriver 13 | ); 14 | 15 | router 16 | .route("/dashboard/departments/:name") 17 | .delete( 18 | authMid.authRequired, 19 | authMid.staffCheck, 20 | authMid.presidentLevelAuth, 21 | dboardCont.departmentDeleter 22 | ); 23 | 24 | router 25 | .route("/dashboard/department/:id/edit") 26 | .get(authMid.authRequired, authMid.staffCheck, dboardCont.editDeptInfo) 27 | .post( 28 | authMid.authRequired, 29 | authMid.staffCheck, 30 | authMid.teamLeaderLevelAuth, 31 | validate.deptCreate, 32 | dboardCont.updateDept 33 | ); 34 | 35 | // Exporting routes 36 | module.exports = router; 37 | -------------------------------------------------------------------------------- /views/layouts/home/sections/magazine-form.ejs: -------------------------------------------------------------------------------- 1 |
3 |
4 |
5 |
6 |

7 | Subscribe to our 8 | Monthly Magazine 9 |

10 |
11 |
12 |
13 | 22 |
23 |
24 |
25 |
26 |
27 | -------------------------------------------------------------------------------- /routes/auth.js: -------------------------------------------------------------------------------- 1 | const router = require("express").Router(); 2 | const validate = require("../middleware/validation"); 3 | const staffCont = require("../controllers/staffCont"); 4 | const authMid = require("../middleware/auth"); 5 | 6 | router 7 | .route("/staff-register") 8 | .get(staffCont.staffRegisterPage) 9 | .post(validate.staffRegister, staffCont.staffRegister); 10 | 11 | router 12 | .route("/staff-login") 13 | .get(staffCont.staffLoginPage) 14 | .post(validate.staffLogin, staffCont.staffLogin); 15 | 16 | router 17 | .route("/staff-password-register") 18 | .post(validate.staffPasswordRegister, staffCont.staffPasswordRegister); 19 | 20 | router.route("/staff-logout").get(authMid.authRequired, staffCont.staffLogout); 21 | 22 | router 23 | .route("/forgot-password") 24 | .get(staffCont.staffPasswordResetPage) 25 | .post(validate.email, staffCont.forgotPassword); 26 | 27 | router.route("/staff-account/activation/:token").get(staffCont.staffActivation); 28 | 29 | router 30 | .route("/password-reset/:token") 31 | .get(staffCont.staffActualPasswordResetPage) 32 | .post( 33 | validate.updatePassword, 34 | staffCont.resetPasswordTokenCheck, 35 | staffCont.updatePassword 36 | ); 37 | 38 | // Exporting routes 39 | module.exports = router; 40 | -------------------------------------------------------------------------------- /views/layouts/home/sections/brands.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 | 9 | 12 | 15 | 18 | 21 |
22 |
23 |
24 |
25 |
-------------------------------------------------------------------------------- /public/css/slick.css: -------------------------------------------------------------------------------- 1 | .slick-slider{position:relative;display:block;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-touch-callout:none;-khtml-user-select:none;-ms-touch-action:pan-y;touch-action:pan-y;-webkit-tap-highlight-color:transparent}.slick-list{position:relative;display:block;overflow:hidden;margin:0;padding:0}.slick-list:focus{outline:none}.slick-list.dragging{cursor:pointer;cursor:hand}.slick-slider .slick-track,.slick-slider .slick-list{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.slick-track{position:relative;top:0;left:0;display:block;margin-left:auto;margin-right:auto}.slick-track:before,.slick-track:after{display:table;content:''}.slick-track:after{clear:both}.slick-loading .slick-track{visibility:hidden}.slick-slide{display:none;float:left;height:100%;min-height:1px}[dir=rtl] .slick-slide{float:right}.slick-slide img{display:block}.slick-slide.slick-loading img{display:none}.slick-slide.dragging img{pointer-events:none}.slick-initialized .slick-slide{display:block}.slick-loading .slick-slide{visibility:hidden}.slick-vertical .slick-slide{display:block;height:auto;border:1px solid transparent}.slick-arrow.slick-hidden{display:none} -------------------------------------------------------------------------------- /views/layouts/dashboard/events.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%- include("./sections/head.ejs") %> 6 | 7 | 8 | 9 | 10 |
11 |
13 | 14 | 15 | <%- include("./sections/header.ejs") %> 16 | 17 | 18 | 19 | <%- include("./sections/sidebar.ejs") %> 20 | 21 | 22 |
23 | 24 | <%- include("./sections/stat-card.ejs") %> 25 | 26 | 27 | 28 | <%- include("./sections/member-table.ejs") %> 29 | 30 | 31 | 32 | <%- include("./sections/external-links.ejs") %> 33 | 34 |
35 |
36 |
37 | 38 | 39 | <%- include("./sections/scripts.ejs") %> 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /views/layouts/dashboard/profile.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%- include("./sections/head.ejs") %> 6 | 7 | 8 | 9 | 10 |
11 |
13 | 14 | 15 | <%- include("./sections/header.ejs") %> 16 | 17 | 18 | 19 | <%- include("./sections/sidebar.ejs") %> 20 | 21 | 22 |
23 | 24 | <%- include("./sections/stat-card.ejs") %> 25 | 26 | 27 | 28 | <%- include("./sections/profile-form.ejs") %> 29 | 30 | 31 | 32 | <%- include("./sections/external-links.ejs") %> 33 | 34 |
35 |
36 |
37 | 38 | 39 | <%- include("./sections/scripts.ejs") %> 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /views/layouts/dashboard/event-participants.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%- include("./sections/head.ejs") %> 6 | 7 | 8 | 9 | 10 |
11 |
13 | 14 | 15 | <%- include("./sections/header.ejs") %> 16 | 17 | 18 | 19 | <%- include("./sections/sidebar.ejs") %> 20 | 21 | 22 |
23 | 24 | <%- include("./sections/stat-card.ejs") %> 25 | 26 | 27 | 28 | <%- include("./sections/member-table.ejs") %> 29 | 30 | 31 | 32 | <%- include("./sections/external-links.ejs") %> 33 | 34 |
35 |
36 |
37 | 38 | 39 | <%- include("./sections/scripts.ejs") %> 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /views/layouts/dashboard/messages.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%- include("./sections/head.ejs") %> 6 | 7 | 8 | 9 | 10 |
11 |
13 | 14 | 15 | <%- include("./sections/header.ejs") %> 16 | 17 | 18 | 19 | <%- include("./sections/sidebar.ejs") %> 20 | 21 | 22 |
23 | 24 | <%- include("./sections/stat-card.ejs") %> 25 | 26 | 27 | 28 | <%- include("./sections/all-messages.ejs") %> 29 | 30 | 31 | 32 | <%- include("./sections/external-links.ejs") %> 33 | 34 |
35 |
36 |
37 | 38 | 39 | <%- include("./sections/scripts.ejs") %> 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /views/layouts/dashboard/participant-events.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%- include("./sections/head.ejs") %> 6 | 7 | 8 | 9 | 10 |
11 |
13 | 14 | 15 | <%- include("./sections/header.ejs") %> 16 | 17 | 18 | 19 | <%- include("./sections/sidebar.ejs") %> 20 | 21 | 22 |
23 | 24 | <%- include("./sections/stat-card.ejs") %> 25 | 26 | 27 | 28 | <%- include("./sections/member-table.ejs") %> 29 | 30 | 31 | 32 | <%- include("./sections/external-links.ejs") %> 33 | 34 |
35 |
36 |
37 | 38 | 39 | <%- include("./sections/scripts.ejs") %> 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /views/layouts/dashboard/participants.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%- include("./sections/head.ejs") %> 6 | 7 | 8 | 9 | 10 |
11 |
13 | 14 | 15 | <%- include("./sections/header.ejs") %> 16 | 17 | 18 | 19 | <%- include("./sections/sidebar.ejs") %> 20 | 21 | 22 |
23 | 24 | <%- include("./sections/stat-card.ejs") %> 25 | 26 | 27 | 28 | <%- include("./sections/member-table.ejs") %> 29 | 30 | 31 | 32 | <%- include("./sections/external-links.ejs") %> 33 | 34 |
35 |
36 |
37 | 38 | 39 | <%- include("./sections/scripts.ejs") %> 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /views/layouts/dashboard/all-messages.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%- include("./sections/head.ejs") %> 6 | 7 | 8 | 9 | 10 |
11 |
13 | 14 | 15 | <%- include("./sections/header.ejs") %> 16 | 17 | 18 | 19 | <%- include("./sections/sidebar.ejs") %> 20 | 21 | 22 |
23 | 24 | 25 | <%- include("./sections/stat-card.ejs") %> 26 | 27 | 28 | 29 | <%- include("./sections/messages.ejs") %> 30 | 31 | 32 | 33 | <%- include("./sections/external-links.ejs") %> 34 | 35 |
36 |
37 |
38 | 39 | 40 | <%- include("./sections/scripts.ejs") %> 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ecell-website", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "build-css": "postcss ./src/styles.css -o ./public/css/styles.css", 8 | "dev": "nodemon server.js", 9 | "start": "node server.js", 10 | "prod": "postcss ./public/css/styles.css -o ./public/css/styles1.css" 11 | }, 12 | "keywords": [], 13 | "author": "", 14 | "license": "ISC", 15 | "dependencies": { 16 | "autoprefixer": "^10.2.5", 17 | "bcrypt": "^5.0.1", 18 | "connect-flash": "^0.1.1", 19 | "cookie-parser": "^1.4.5", 20 | "cors": "^2.8.5", 21 | "ejs": "^3.1.6", 22 | "ejs-mate": "^3.0.0", 23 | "express": "^4.17.1", 24 | "express-jwt": "^6.0.0", 25 | "express-session": "^1.17.2", 26 | "googleapis": "^82.0.0", 27 | "joi": "^17.4.0", 28 | "jsonwebtoken": "^8.5.1", 29 | "moment": "^2.29.1", 30 | "mongoose": "^5.12.10", 31 | "nodemailer": "^6.6.1", 32 | "path": "^0.12.7", 33 | "sanitize-html": "^2.4.0", 34 | "uuid": "^8.3.2" 35 | }, 36 | "devDependencies": { 37 | "@fullhuman/postcss-purgecss": "^4.0.3", 38 | "cssnano": "^5.0.7", 39 | "dotenv": "^10.0.0", 40 | "nodemon": "^2.0.12", 41 | "postcss": "^8.3.6", 42 | "postcss-cli": "^8.3.1", 43 | "tailwindcss": "^2.2.7" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /views/layouts/auth/partials/scripts.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 15 | 16 | 17 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /views/layouts/dashboard/board.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%- include("./sections/head.ejs") %> 6 | 7 | 8 | 9 | 10 | 11 |
12 |
14 | 15 | 16 | <%- include("./sections/header.ejs") %> 17 | 18 | 19 | 20 | <%- include("./sections/sidebar.ejs") %> 21 | 22 | 23 |
24 | 25 | <%- include("./sections/stat-card.ejs") %> 26 | 27 | 28 | 29 | <%- include("./sections/member-table.ejs") %> 30 | 31 | 32 | 33 | <%- include("./sections/external-links.ejs") %> 34 | 35 |
36 |
37 |
38 | 39 | 40 | <%- include("./sections/scripts.ejs") %> 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /views/layouts/dashboard/sections/head.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%= title %> 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | -------------------------------------------------------------------------------- /utils/errorHandler.js: -------------------------------------------------------------------------------- 1 | // Creating a ErrorHandler class in JS 2 | 3 | class ErrorHandler { 4 | // Constructor is a function in JS which runs everytime the object of that class is created that's why the name constructor :P 5 | // Taking two arguments - status, message 6 | constructor(message) { 7 | // this refers to the object 8 | // this.status = status; 9 | this.message = message; 10 | } 11 | 12 | // Static functions are used to optimise the memmory that is utilized in the error handling 13 | // And these function can only be called or used as a method on that particular class 14 | // Error handlers have their self explanatory name and operations 15 | 16 | static validationError(message = "All fields are required") { 17 | const validateErr = new ErrorHandler(message); 18 | return validateErr.message; 19 | } 20 | 21 | static notFoundError(message = "Not Found") { 22 | const notFoundErr = new ErrorHandler(message); 23 | return notFoundErr.message; 24 | } 25 | 26 | static serverError(message = "Something went wrong") { 27 | const serverErr = new ErrorHandler(message); 28 | return serverErr.message; 29 | } 30 | 31 | static forbidden(message = "Not authorized") { 32 | const forbiddenErr = new ErrorHandler(message); 33 | return forbiddenErr.message; 34 | } 35 | } 36 | 37 | module.exports = ErrorHandler; 38 | -------------------------------------------------------------------------------- /views/layouts/dashboard/key-gen.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%- include("./sections/head.ejs") %> 6 | 7 | 8 | 9 | 10 | 11 |
12 |
14 | 15 | 16 | <%- include("./sections/header.ejs") %> 17 | 18 | 19 | 20 | <%- include("./sections/sidebar.ejs") %> 21 | 22 | 23 |
24 | 25 | <%- include("./sections/stat-card.ejs") %> 26 | 27 | 28 | 29 | <%- include("./sections/key-gen.ejs") %> 30 | 31 | 32 | 33 | <%- include("./sections/member-table.ejs") %> 34 | 35 | 36 | 37 | <%- include("./sections/external-links.ejs") %> 38 | 39 |
40 |
41 |
42 | 43 | 44 | <%- include("./sections/scripts.ejs") %> 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /views/layouts/home/partials/head-links.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%= title %> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 30 | 31 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /models/event.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | const Schema = mongoose.Schema; 3 | 4 | const EventSchema = Schema( 5 | { 6 | name: { 7 | type: String, 8 | required: true, 9 | }, 10 | event_poster: { 11 | type: String, 12 | required: true, 13 | }, 14 | event_pic: { 15 | type: String, 16 | required: true, 17 | }, 18 | sheetID: { 19 | type: Number, 20 | default: 0, 21 | }, 22 | description: { 23 | type: String, 24 | required: true, 25 | }, 26 | tagline: { 27 | type: String, 28 | required: true, 29 | }, 30 | category: { 31 | type: String, 32 | required: true, 33 | }, 34 | featured: { 35 | type: Boolean, 36 | default: false, 37 | }, 38 | registration_starts: { 39 | type: Date, 40 | required: true, 41 | }, 42 | registration_ends: { 43 | type: Date, 44 | required: true, 45 | }, 46 | event_starts: { 47 | type: Date, 48 | required: true, 49 | }, 50 | event_ends: { 51 | type: Date, 52 | required: true, 53 | }, 54 | result_declaration: { 55 | type: Date, 56 | default: 0000 - 00 - 00, 57 | }, 58 | organizers: [Object], 59 | hosts: [Object], 60 | sponsors: [Object], 61 | participants: [ 62 | { 63 | type: mongoose.Schema.Types.ObjectId, 64 | ref: "Participant", 65 | }, 66 | ], 67 | }, 68 | { timestamps: true } 69 | ); 70 | 71 | module.exports = mongoose.model("Event", EventSchema); 72 | -------------------------------------------------------------------------------- /views/layouts/home/sections/event-description.ejs: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |
7 | dots 8 |
9 |
10 | video 11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |

20 | <%= foundEvent.name %> 21 |

22 |
23 |

24 | <%= foundEvent.description %> 25 |

26 |
27 | 27th Nov. 29 | 2021 30 |
31 |
32 |
33 |
34 |
35 | 36 | 37 |
-------------------------------------------------------------------------------- /seeds/event_seed.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"), 2 | Event = require("../models/event"), 3 | events = require("./event_seed.json"); 4 | 5 | const DBaddress = 6 | process.env.DB_URL || "mongodb://localhost:27017/ecell-website"; 7 | 8 | /* 9 | run "node ./seeds/event_seed.js" 10 | to seed the events collection 11 | 12 | make sure to seed participant too, use "node ./seeds/participant_seed.js" 13 | */ 14 | 15 | mongoose.connect(DBaddress, { 16 | useNewUrlParser: true, 17 | useCreateIndex: true, 18 | useUnifiedTopology: true, 19 | useFindAndModify: false, 20 | }); 21 | 22 | (async () => { 23 | await Event.deleteMany({}, (err, deletedEvents) => { 24 | if (err) { 25 | console.log(err); 26 | console.log( 27 | "An error occured while dropping the events collection" 28 | ); 29 | return process.exit(0); 30 | } else { 31 | console.log(deletedEvents); 32 | console.log("Events collection has been cleared"); 33 | (async () => { 34 | await Event.insertMany(events, (err, seededEvents) => { 35 | if (err) { 36 | console.log(err); 37 | console.log( 38 | "An error occured while seeding the events collection" 39 | ); 40 | return process.exit(0); 41 | } else { 42 | console.log("Events collection has been seeded"); 43 | return process.exit(0); 44 | } 45 | }); 46 | })(); 47 | } 48 | }); 49 | })(); -------------------------------------------------------------------------------- /seeds/staff_seed.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"), 2 | Staff = require("../models/staff"), 3 | staff_seed = require("./staff_seed.json"); 4 | 5 | const DBaddress = 6 | process.env.DB_URL || "mongodb://localhost:27017/ecell-website"; 7 | 8 | /* 9 | run "node ./seeds/participant_seed.js" 10 | to seed the participants collection 11 | 12 | make sure to seed departments too, use "node ./seeds/department_seed.js" 13 | */ 14 | 15 | mongoose.connect(DBaddress, { 16 | useNewUrlParser: true, 17 | useCreateIndex: true, 18 | useUnifiedTopology: true, 19 | useFindAndModify: false, 20 | }); 21 | 22 | (async () => { 23 | await Staff.deleteMany({}, (err, deletedStaff) => { 24 | if (err) { 25 | console.log(err); 26 | console.log( 27 | "An error occured while dropping the staffs collection" 28 | ); 29 | return process.exit(0); 30 | } else { 31 | console.log(deletedStaff); 32 | console.log("Staffs collection has been cleared"); 33 | (async () => { 34 | await Staff.insertMany(staff_seed, (err, seededStaff) => { 35 | if (err) { 36 | console.log(err); 37 | console.log( 38 | "An error occured while seeding the staffs collection" 39 | ); 40 | return process.exit(0); 41 | } else { 42 | console.log("Staffs collection has been seeded"); 43 | return process.exit(0); 44 | } 45 | }); 46 | })(); 47 | } 48 | }); 49 | })(); -------------------------------------------------------------------------------- /seeds/department_seed.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"), 2 | Department = require("../models/dept"), 3 | departments = require("./dept_seed.json"); 4 | 5 | const DBaddress = 6 | process.env.DB_URL || "mongodb://localhost:27017/ecell-website"; 7 | 8 | /* 9 | run "node ./seeds/department_seed.js" 10 | to seed the departments collection 11 | 12 | make sure to seed staff too, use "node ./seeds/staff_seed.js" 13 | */ 14 | 15 | mongoose.connect(DBaddress, { 16 | useNewUrlParser: true, 17 | useCreateIndex: true, 18 | useUnifiedTopology: true, 19 | useFindAndModify: false, 20 | }); 21 | 22 | (async () => { 23 | await Department.deleteMany({}, (err, deletedDepts) => { 24 | if (err) { 25 | console.log(err); 26 | console.log( 27 | "An error occured while dropping the departments collection" 28 | ); 29 | return process.exit(0); 30 | } else { 31 | console.log(deletedDepts); 32 | console.log("Departments collection has been cleared"); 33 | (async () => { 34 | await Department.insertMany(departments, (err, seededDepts) => { 35 | if (err) { 36 | console.log(err); 37 | console.log( 38 | "An error occured while seeding the departments collection" 39 | ); 40 | return process.exit(0); 41 | } else { 42 | console.log("Departments collection has been seeded"); 43 | return process.exit(0); 44 | } 45 | }); 46 | })(); 47 | } 48 | }); 49 | })(); -------------------------------------------------------------------------------- /views/layouts/home/sections/suggest-event.ejs: -------------------------------------------------------------------------------- 1 |
3 |
4 |
5 |
6 |

Have an event idea?

7 |

8 | Let us know your idea 9 |

10 |
11 |
12 |
13 | 28 |
29 |
30 |
-------------------------------------------------------------------------------- /seeds/participant_seed.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"), 2 | Participant = require("../models/participant"), 3 | participants = require("./participant_seed.json"); 4 | 5 | const DBaddress = 6 | process.env.DB_URL || "mongodb://localhost:27017/ecell-website"; 7 | 8 | /* 9 | run "node ./seeds/participant_seed.js" 10 | to seed the participants collection 11 | 12 | make sure to seed events too, use "node ./seeds/event_seed.js" 13 | */ 14 | 15 | mongoose.connect(DBaddress, { 16 | useNewUrlParser: true, 17 | useCreateIndex: true, 18 | useUnifiedTopology: true, 19 | useFindAndModify: false, 20 | }); 21 | 22 | (async () => { 23 | await Participant.deleteMany({}, (err, deletedParticipants) => { 24 | if (err) { 25 | console.log(err); 26 | console.log( 27 | "An error occured while dropping the participants collection" 28 | ); 29 | return process.exit(0); 30 | } else { 31 | console.log(deletedParticipants); 32 | console.log("Participants collection has been cleared"); 33 | (async () => { 34 | await Participant.insertMany(participants, (err, seededParticipant) => { 35 | if (err) { 36 | console.log(err); 37 | console.log( 38 | "An error occured while seeding the participants collection" 39 | ); 40 | return process.exit(0); 41 | } else { 42 | console.log("Participants collection has been seeded"); 43 | return process.exit(0); 44 | } 45 | }); 46 | })(); 47 | } 48 | }); 49 | })(); -------------------------------------------------------------------------------- /routes/dashboard/events.js: -------------------------------------------------------------------------------- 1 | const router = require("express").Router(); // Router is a function in the express which can be used to return an array of routes and methods 2 | const dboardCont = require("../../controllers/dashboardCont"); // Controller functions for staff-login routes 3 | const authMid = require("../../middleware/auth"); 4 | const validate = require("../../middleware/validation"); 5 | 6 | router 7 | .route("/dashboard/events") 8 | .get(authMid.authRequired, authMid.staffCheck, dboardCont.eventsIndex); 9 | 10 | // For event create functionality 11 | // get -> To render the event create form/page 12 | // post -> For creating a new event in database and googlesheets 13 | router 14 | .route("/dashboard/event-create") 15 | .get(authMid.authRequired, authMid.staffCheck, authMid.onlyEventManagement, dboardCont.createEventIndex) 16 | .post( 17 | authMid.authRequired, 18 | authMid.staffCheck, 19 | authMid.onlyEventManagement, 20 | validate.eventCreate, 21 | dboardCont.createEvent 22 | ); 23 | 24 | router 25 | .route("/dashboard/events/:name") 26 | // .get(authMid.authRequired, authMid.staffCheck); 27 | .get(authMid.authRequired, authMid.staffCheck, authMid.onlyEventManagement, dboardCont.eventDeleter); 28 | 29 | router 30 | .route("/dashboard/events/:name/participants") 31 | .get( 32 | authMid.authRequired, 33 | authMid.staffCheck, 34 | dboardCont.eventParticipantsList 35 | ); 36 | 37 | router 38 | .route("/dashboard/events/:id/edit") 39 | .get(authMid.authRequired, authMid.staffCheck, authMid.onlyEventManagement, dboardCont.editEventInfo) 40 | .post( 41 | authMid.authRequired, 42 | authMid.staffCheck, 43 | authMid.onlyEventManagement, 44 | validate.eventCreate, 45 | dboardCont.updateEvent 46 | ); 47 | 48 | // Exporting routes 49 | module.exports = router; 50 | -------------------------------------------------------------------------------- /views/layouts/home/sections/all-departments.ejs: -------------------------------------------------------------------------------- 1 | 2 |
4 |
5 |

Our Departments

6 | 7 |
8 | 9 |
10 |
11 |
12 | <% for (const dept of deptData) { %> 13 |
16 | 17 |
18 |

<%= dept.name %>

19 |

20 | <%= dept.description.substring(0, 150) %>... 21 |

22 |
23 |
24 | Explore 27 |
28 |
29 |
30 | <% } %> 31 |
32 |
33 |
-------------------------------------------------------------------------------- /views/layouts/home/sections/home-about-us.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |

About Us

9 |
10 |

The Entrepreneurship Cell (E-Cell) GNDEC was initiated in September 2020 with a 11 | vision to promote ‘Entrepreneurship’ among the students of GNDEC, Ludhiana and to build an 12 | exhaustive resource pool to aid potential student entrepreneurs. The Entrepreneurship Cell 13 | (E-Cell) is a non-profit organization run by students of GNDEC,Ludhiana. We aim manifesting 14 | the latent entrepreneurial spirit of young students and corporate. We at E-Cell host various 15 | workshops,speaker sessions, competitions and innovation event for aspiring entrepreneurs.

16 | 19 |
20 |
21 |
22 |
24 | about 25 |
26 |
27 |
28 |
29 |
-------------------------------------------------------------------------------- /views/layouts/home/sections/vision.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | Technical 5 |
6 |
7 |
8 | 9 |

Vision

10 |
11 |

12 | <% if (title.length > "E-Cell | Departments".length && title.substring(0, 20) === "E-Cell | Departments") { %> 13 | <%= foundDept.description %> 14 | <% } else if (title === "E-Cell | Home") { %> 15 | The nature of being an entrepreneur means that you fully embrace ambiguity 16 | and are comfortable with being challenged regularly. 17 | To develop, support and deliver the entrepreneurship 18 | spirit among students in their quest to achieve success 19 | in establishing their venture at all junctures. <% } %> 20 |

21 | 25 |
26 |
27 |
-------------------------------------------------------------------------------- /views/layouts/error-404.ejs: -------------------------------------------------------------------------------- 1 | <%- include("./home/partials/archive/head.ejs") %> 2 | <%- include("./home/partials/archive/links.ejs") %> 3 | 4 | 5 |
6 |
7 |
8 |
9 | E-Cell, GNDEC 10 |
11 |
12 |

Error
404

13 |

Page not found!

14 |

Invalid URL
OR
The page you requested is no longer available.

15 |
16 |
17 | Go Back 18 |
19 |
20 |
21 | 22 | 23 |
24 |
25 |
26 |
27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /views/layouts/home/sections/contact-form.ejs: -------------------------------------------------------------------------------- 1 |
3 |
4 |
5 |
6 |

Contact Us

7 |

8 | We will reply as soon as possible. 9 |

10 |
11 |
12 |
13 | 27 |
28 |
29 |
-------------------------------------------------------------------------------- /views/layouts/home/sections/feedback-form.ejs: -------------------------------------------------------------------------------- 1 |
3 |
4 |
5 |
6 |

Feedback Form

7 |

8 | Your Feedback is most valuable to us. 9 |

10 |
11 |
12 |
13 | 27 |
28 |
29 |
-------------------------------------------------------------------------------- /views/layouts/home/sections/event-registration.ejs: -------------------------------------------------------------------------------- 1 | 2 |
4 |
5 |
6 |
7 |

Register for this event

8 |

9 | We would love to have you. 10 |

11 |
12 |
13 |
14 | 31 |
32 |
33 |
-------------------------------------------------------------------------------- /views/layouts/home/partials/archive/links.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 32 | 33 | 34 | 35 | 36 | 49 | -------------------------------------------------------------------------------- /controllers/dashboardCont/board.js: -------------------------------------------------------------------------------- 1 | const Staff = require("../../models/staff"); 2 | const ErrorHandler = require("../../utils/errorHandler"); 3 | const jwt = require("jsonwebtoken"); 4 | const Event = require("../../models/event"); 5 | const Dept = require("../../models/dept"); 6 | const Participant = require("../../models/participant"); 7 | 8 | const board = { 9 | boardIndex: async (req, res, next) => { 10 | try { 11 | const token = req.cookies.jwt_token; 12 | jwt.verify(token, process.env.JWT_SECRET, async (err, decodedToken) => { 13 | if (err) { 14 | console.log(err); 15 | next(ErrorHandler.forbidden()); 16 | } else if (decodedToken) { 17 | let staff; 18 | if (res.locals.staff && res.locals.staff.role === "member") { 19 | staff = await Staff.find() 20 | .select( 21 | "-password -_id -resetPasswordLink -registerPasswordToken -key -password -createdAt -updatedAt -email" 22 | ) 23 | .populate("department", "name"); 24 | } else { 25 | staff = await Staff.find() 26 | .select( 27 | "-password -_id -resetPasswordLink -registerPasswordToken -key -password -createdAt -updatedAt" 28 | ) 29 | .populate("department", "name"); 30 | } 31 | // console.log("This should be the array of the staff", staff); 32 | const eventCount = await Event.countDocuments(); 33 | const deptCount = await Dept.countDocuments(); 34 | const participantCount = await Participant.countDocuments(); 35 | const staffCount = staff.length; 36 | return res.render("layouts/dashboard/board", { 37 | error: req.flash("error"), 38 | success: req.flash("success"), 39 | staffData: staff, 40 | staffCount, 41 | eventCount, 42 | deptCount, 43 | participantCount, 44 | title: "Dashboard | Board", 45 | }); 46 | } 47 | }); 48 | } catch (err) { 49 | console.log(err); 50 | next(ErrorHandler.serverError()); 51 | } 52 | }, 53 | }; 54 | 55 | module.exports = board; 56 | -------------------------------------------------------------------------------- /public/js/toggle.js: -------------------------------------------------------------------------------- 1 | // Dark mode toggle algorithm and JS Code 2 | const switchToggle = document.querySelector("#switch-toggle"); // Selecting the toggle switch button to make changes to it 3 | let isDarkmode = false; // Initializing a variable to store it in the dark mode 4 | 5 | // Constant variable containing html code for dark icon of the toggler 6 | const darkIcon = ` 7 | 8 | `; 9 | 10 | // Constant variable containing html code for light icon of the toggler 11 | const lightIcon = ` 12 | 13 | `; 14 | 15 | const body = document.querySelector("body"); // to select the body tag 16 | 17 | // To toggle the value of dark mode and setting it in the local storage 18 | function toggleTheme() { 19 | isDarkmode = !isDarkmode; 20 | localStorage.setItem("isDarkmode", isDarkmode); 21 | switchTheme(); 22 | } 23 | 24 | // To switch the theme of the website from dark to light or vice - versa 25 | function switchTheme() { 26 | if (JSON.parse(localStorage.getItem("isDarkmode"))) { 27 | switchToggle.classList.remove("bg-yellow-500", "-translate-x-2"); 28 | switchToggle.classList.add("bg-gray-700", "translate-x-full"); 29 | setTimeout(() => { 30 | switchToggle.innerHTML = darkIcon; 31 | }, 250); 32 | body.classList.add("dark"); 33 | } else { 34 | switchToggle.classList.add("bg-yellow-500", "-translate-x-2"); 35 | switchToggle.classList.remove("bg-gray-700", "translate-x-full"); 36 | setTimeout(() => { 37 | switchToggle.innerHTML = lightIcon; 38 | }, 250); 39 | body.classList.remove("dark"); 40 | } 41 | } 42 | switchTheme(); -------------------------------------------------------------------------------- /views/layouts/auth/partials/links.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 34 | 35 | 36 | 37 | 38 | 51 | -------------------------------------------------------------------------------- /views/layouts/dashboard/sections/key-gen.ejs: -------------------------------------------------------------------------------- 1 |
2 | <% if (key.length > 0) { %> 3 |
4 |
5 | ALERT: Copy this key. It will be removed, when the page is refereshed. 6 |
7 |
<%= key %>
8 |
9 | <% } %> 10 |
12 | 18 | 19 |

Generate a new key

20 |

You can generate a new key, which is used when a member tries to register on this website. This key is highly confidential. Please, share it wisely.

21 | 28 |
29 |
-------------------------------------------------------------------------------- /controllers/dashboardCont/keyGenerate.js: -------------------------------------------------------------------------------- 1 | const Staff = require("../../models/staff"); 2 | const ErrorHandler = require("../../utils/errorHandler"); 3 | const jwt = require("jsonwebtoken"); 4 | const Event = require("../../models/event"); 5 | const Dept = require("../../models/dept"); 6 | const Participant = require("../../models/participant"); 7 | const registerKey = require("../../models/regKey"); 8 | const Magazines = require("../../models/magazine-reciever"); 9 | const Contact = require("../../models/contact"); 10 | const uuid = require("uuid"); 11 | const Internship = require("../../models/internship"); 12 | const magazineReciever = require("../../models/magazine-reciever"); 13 | const moment = require("moment"); 14 | const { google } = require("googleapis"); 15 | const RegKey = require("../../models/regKey"); 16 | 17 | const keyGenerate = { 18 | registerKeyIndex: async (req, res, next) => { 19 | try { 20 | const staffCount = await Staff.countDocuments(); 21 | const eventCount = await Event.countDocuments(); 22 | const deptCount = await Dept.countDocuments(); 23 | const participantCount = await Participant.countDocuments(); 24 | const keys = await RegKey.find().sort({createdAt: -1}); 25 | return res.render("layouts/dashboard/key-gen", { 26 | error: req.flash("error"), 27 | success: req.flash("success"), 28 | key: req.flash("key"), 29 | title: "Dashboard | Key Generation", 30 | staffCount, 31 | eventCount, 32 | deptCount, 33 | participantCount, 34 | keys, 35 | moment, 36 | }); 37 | } catch (err) { 38 | console.log(err); 39 | req.flash("error", "Something went wrong! Please try later"); 40 | return res.redirect("/dashboard/generate-key"); 41 | } 42 | }, 43 | 44 | registerKeyGenerator: async (req, res, next) => { 45 | try { 46 | const newRegisterKey = new registerKey({ 47 | key: uuid.v4(), 48 | }); 49 | newRegisterKey.save(); 50 | req.flash("success", "Registration key generated successfully"); 51 | req.flash("key", newRegisterKey.key); 52 | return res.redirect("/dashboard/generate-key"); 53 | // console.log(newRegisterKey); 54 | } catch (err) { 55 | console.log(err); 56 | req.flash("error", "Something went wrong! Please try later"); 57 | return res.redirect("/dashboard/generate-key"); 58 | } 59 | }, 60 | }; 61 | 62 | module.exports = keyGenerate; 63 | -------------------------------------------------------------------------------- /controllers/dashboardCont/magazine.js: -------------------------------------------------------------------------------- 1 | const Staff = require("../../models/staff"); 2 | const ErrorHandler = require("../../utils/errorHandler"); 3 | const jwt = require("jsonwebtoken"); 4 | const Event = require("../../models/event"); 5 | const Dept = require("../../models/dept"); 6 | const Participant = require("../../models/participant"); 7 | const registerKey = require("../../models/regKey"); 8 | const Magazines = require("../../models/magazine-reciever"); 9 | const Contact = require("../../models/contact"); 10 | const uuid = require("uuid"); 11 | const Internship = require("../../models/internship"); 12 | const magazineReciever = require("../../models/magazine-reciever"); 13 | const moment = require("moment"); 14 | const { google } = require("googleapis"); 15 | const RegKey = require("../../models/regKey"); 16 | 17 | const magazine = { 18 | magazineSubsIndex: async (req, res, next) => { 19 | try { 20 | const token = req.cookies.jwt_token; 21 | jwt.verify(token, process.env.JWT_SECRET, async (err, decodedToken) => { 22 | if (err) { 23 | console.log(err); 24 | next(ErrorHandler.forbidden()); 25 | } else if (decodedToken) { 26 | const staffCount = await Staff.countDocuments(); 27 | const eventCount = await Event.countDocuments(); 28 | const deptCount = await Dept.countDocuments(); 29 | const participantCount = await Participant.countDocuments(); 30 | // const magazineSubs = await magazineReciever.find({ 31 | // subscribed: true, 32 | // }); 33 | let magazineSubs; 34 | if (res.locals.staff && res.locals.staff.role !== "member") { 35 | magazineSubs = await magazineReciever.find({ 36 | subscribed: true, 37 | }); 38 | } else { 39 | magazineSubs = await magazineReciever 40 | .find({ 41 | subscribed: true, 42 | }) 43 | .select("-email"); 44 | } 45 | return res.render("layouts/dashboard/all-messages", { 46 | error: req.flash("error"), 47 | success: req.flash("success"), 48 | staffCount, 49 | eventCount, 50 | deptCount, 51 | participantCount, 52 | title: "Dashboard | Magazine Subscribers", 53 | magazineSubs, 54 | moment, 55 | }); 56 | } 57 | }); 58 | } catch (err) { 59 | console.log(err); 60 | next(ErrorHandler.serverError()); 61 | } 62 | }, 63 | }; 64 | 65 | module.exports = magazine; 66 | -------------------------------------------------------------------------------- /views/layouts/home/sections/navbar.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /controllers/dashboardCont/index.js: -------------------------------------------------------------------------------- 1 | const Staff = require("../../models/staff"); 2 | const ErrorHandler = require("../../utils/errorHandler"); 3 | const jwt = require("jsonwebtoken"); 4 | const Event = require("../../models/event"); 5 | const Dept = require("../../models/dept"); 6 | const Participant = require("../../models/participant"); 7 | const registerKey = require("../../models/regKey"); 8 | const Magazines = require("../../models/magazine-reciever"); 9 | const Contact = require("../../models/contact"); 10 | const uuid = require("uuid"); 11 | const Internship = require("../../models/internship"); 12 | const magazineReciever = require("../../models/magazine-reciever"); 13 | const moment = require("moment"); 14 | const { google } = require("googleapis"); 15 | const RegKey = require("../../models/regKey"); 16 | 17 | // Board 18 | const board = require("./board"); 19 | // Contact 20 | const contact = require("./contact"); 21 | // Internship 22 | const internship = require("./internship"); 23 | // Magazine 24 | const magazine = require("./magazine"); 25 | // Events 26 | const event = require("./event"); 27 | // Departments 28 | const department = require("./department"); 29 | // Participants 30 | const participant = require("./participant"); 31 | // Key Generation 32 | const keyGenerate = require("./keyGenerate"); 33 | // Profile 34 | const profile = require("./profile"); 35 | 36 | const dboardCont = { 37 | // Dashboard Index 38 | staffDashboard: async (req, res, next) => { 39 | try { 40 | if (res.locals.staff && res.locals.staff.role === "admin") { 41 | const eventCount = await Event.countDocuments(); 42 | const deptCount = await Dept.countDocuments(); 43 | const participantCount = await Participant.countDocuments(); 44 | const staffCount = await Staff.countDocuments(); 45 | return res.render("layouts/dashboard/dashboard", { 46 | error: req.flash("error"), 47 | success: req.flash("success"), 48 | staffCount, 49 | eventCount, 50 | deptCount, 51 | participantCount, 52 | title: "Dashboard | Home", 53 | }); 54 | } else { 55 | return res.redirect("/dashboard/board"); 56 | } 57 | } catch (err) { 58 | console.log(err); 59 | req.flash("error", "Something went wrong. Please try again later"); 60 | return res.redirect("/dashboard"); 61 | // next(ErrorHandler.serverError()); 62 | } 63 | }, 64 | ...board, 65 | ...contact, 66 | ...internship, 67 | ...magazine, 68 | ...event, 69 | ...department, 70 | ...participant, 71 | ...keyGenerate, 72 | ...profile, 73 | }; 74 | 75 | module.exports = dboardCont; 76 | -------------------------------------------------------------------------------- /views/layouts/home/sections/event-organizers.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |

Organizers

7 |
8 |
9 | 10 | <% let count = 0 %> 11 | <% for (const org of foundEvent.organizers) { %> 12 | <% if (org.name !== "" && org.name) { %> 13 |
15 |
16 |
17 | 20 |
21 | 38 |
39 |
40 |
41 |

42 | <%= org.name %> 43 |

44 |

45 | <%= org.designation %> 46 |

47 |
48 |
49 |
50 | <% } else { %> 51 | <% count = count + 1 %> 52 | <% } %> 53 | <% } %> 54 |
55 |
56 | <% if (count === 4) { %> 57 |
58 | No data available 59 |
60 | <% } %> 61 |
62 |
-------------------------------------------------------------------------------- /views/layouts/home/sections/event-hosts.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |

Hosts

7 |
8 |
9 | 10 | <% let count = 0 %> 11 | <% for (const host of foundEvent.hosts) { %> 12 | <% if (host.name !== "" && host.name) { %> 13 |
15 |
16 |
17 | 20 |
21 | 38 |
39 |
40 |
41 |

42 | <%= host.name %> 43 |

44 |

45 | <%= host.designation %> 46 |

47 |
48 |
49 |
50 | <% } else { %> 51 | <% count = count + 1 %> 52 | <% } %> 53 | <% } %> 54 |
55 |
56 | <% if (count === 4) { %> 57 |
58 | No data available 59 |
60 | <% } %> 61 |
62 |
-------------------------------------------------------------------------------- /views/layouts/home/sections/event-sponsors.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |

Sponsors

7 |
8 |
9 | 10 | <% let count = 0 %> 11 | <% for (const sponsor of foundEvent.sponsors) { %> 12 | <% if (sponsor.name !== "" && sponsor.name) { %> 13 |
15 |
16 |
17 | 20 |
21 | 38 |
39 |
40 |
41 |

42 | <%= sponsor.name %> 43 |

44 |

45 | <%= sponsor.designation %> 46 |

47 |
48 |
49 |
50 | <% } else { %> 51 | <% count = count + 1 %> 52 | <% } %> 53 | <% } %> 54 |
55 |
56 | <% if (count === 4) { %> 57 |
58 | No data available 59 |
60 | <% } %> 61 |
62 |
-------------------------------------------------------------------------------- /models/staff.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | const ErrorHandler = require("../utils/errorHandler"); 3 | const Schema = mongoose.Schema; 4 | const bcrypt = require("bcrypt"); 5 | 6 | // Everything is same as contactSchema but the unique property as true in the username property 7 | // defines that no username in the DB can be same 8 | 9 | const staffSchema = new Schema( 10 | { 11 | firstname: { 12 | type: String, 13 | required: true, 14 | }, 15 | lastname: { 16 | type: String, 17 | required: true, 18 | }, 19 | description: { 20 | type: String, 21 | }, 22 | email: { 23 | type: String, 24 | required: true, 25 | unique: true, 26 | }, 27 | password: { 28 | type: String, 29 | required: true, 30 | }, 31 | 32 | // Department will be verified in the registration middleware 33 | department: [ 34 | { 35 | type: mongoose.Schema.Types.ObjectId, 36 | ref: "Department", 37 | }, 38 | ], 39 | designation: { 40 | type: String, 41 | default: "Active Member", 42 | }, 43 | sl_li: { 44 | type: String, 45 | default: "https://www.linkedin.com/company/ecellgndec/" 46 | }, 47 | sl_ig: { 48 | type: String, 49 | default: "https://www.instagram.com/ecell.gndec/" 50 | }, 51 | sl_fb: { 52 | type: String, 53 | default: "https://www.facebook.com/E-Cell-GNDEC-100549411816777/" 54 | }, 55 | profile_pic_url: { 56 | type: String, 57 | default: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQE9tG_NFfmLde3aA3q3p2yib1KJslRRNlJQg&usqp=CAU", 58 | }, 59 | key: { 60 | type: String, 61 | required: true, 62 | }, 63 | accActive: { 64 | type: Boolean, 65 | default: true, 66 | }, 67 | resetPasswordLink: { 68 | type: String, 69 | default: "", 70 | }, 71 | registerPasswordToken: { 72 | type: String, 73 | default: "", 74 | }, 75 | role: { 76 | type: String, 77 | default: "member", 78 | }, 79 | }, 80 | { 81 | timestamps: true, 82 | } 83 | ); 84 | 85 | staffSchema.virtual("fullname").get(function () { 86 | return this.firstname + " " + this.lastname; 87 | }); 88 | 89 | staffSchema.pre("save", async function (next) { 90 | try { 91 | const salt = await bcrypt.genSalt(10); 92 | const hashedPassword = await bcrypt.hash(this.password, salt); 93 | this.password = hashedPassword; 94 | next(); 95 | } catch (err) { 96 | next(ErrorHandler.serverError()); 97 | } 98 | }); 99 | 100 | module.exports = mongoose.model("Staff", staffSchema); 101 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | // If we are not in production then use .env file 2 | if (process.env.NODE_ENV !== "production") { 3 | require("dotenv").config(); 4 | } 5 | 6 | const express = require("express"); 7 | const path = require("path"); 8 | const ejsMate = require("ejs-mate"); 9 | const cors = require("cors"); 10 | const mongoose = require("mongoose"); 11 | const routes = require("./routes/index"); 12 | const ErrorHandler = require("./utils/errorHandler"); 13 | const cookieParser = require("cookie-parser"); 14 | const session = require("express-session"); 15 | const flash = require("connect-flash"); 16 | const port = process.env.PORT || 3000; 17 | 18 | // Cors policy option for safety of routes in production 19 | const corsOptions = { 20 | origin: "*", 21 | method: ["GET", "POST"], 22 | }; 23 | 24 | // Getting DB Url from the .env file of the local DB 25 | const DB_URL = process.env.DB_URL; 26 | 27 | // Creating a mongoose connection 28 | mongoose.connect(DB_URL, { 29 | useNewUrlParser: true, 30 | useCreateIndex: true, 31 | useUnifiedTopology: true, 32 | useFindAndModify: false, 33 | }); 34 | 35 | // To open the connection to our website 36 | const db = mongoose.connection; 37 | db.on("error", console.error.bind(console, "connection error:")); 38 | db.once("open", () => { 39 | console.log("Database Connected!"); 40 | }); 41 | 42 | // express() return a factory function, which is then assigned to the app variable 43 | const app = express(); 44 | 45 | // Setting ejs as a template engine for our website 46 | app.engine("ejs", ejsMate); 47 | app.set("view engine", "ejs"); 48 | app.set("views", path.join(__dirname, "views")); 49 | 50 | // Middlewares 51 | app.use(cors(corsOptions)); // Cors 52 | app.use(express.json()); // To process the requests and parse them into json 53 | app.use(express.urlencoded({ extended: true })); // If you want to operate data requests through classic way 54 | app.use(express.static(path.join(__dirname, "public"))); // Setting up the public folder 55 | app.use(cookieParser()); 56 | app.use( 57 | session({ 58 | secret: process.env.SESSION_SECRET, 59 | resave: false, 60 | saveUninitialized: false, 61 | cookie: { maxAge: 1000 * 10 * 60 }, 62 | }) 63 | ); 64 | app.use(flash()); 65 | 66 | // Routes Middleware 67 | app.use("/", routes); // For all routes 68 | 69 | // Error handling middleware to handle all the errors from the controllers or middlewares 70 | app.use((err, req, res, next) => { 71 | if (typeof(err) === "string") { 72 | res.json({ 73 | message: err, 74 | }); 75 | } else { 76 | return ErrorHandler.serverError(); 77 | } 78 | }); 79 | 80 | // For 404 Page Not Found route! 81 | app.get("*", (req, res) => { 82 | res.render("layouts/error-404"); 83 | }); 84 | 85 | // Creating server with a port number of 3000 locally 86 | app.listen(port, () => console.log(`Server is running on port ${port}`)); 87 | -------------------------------------------------------------------------------- /controllers/dashboardCont/profile.js: -------------------------------------------------------------------------------- 1 | const Staff = require("../../models/staff"); 2 | const ErrorHandler = require("../../utils/errorHandler"); 3 | const jwt = require("jsonwebtoken"); 4 | const Event = require("../../models/event"); 5 | const Dept = require("../../models/dept"); 6 | const Participant = require("../../models/participant"); 7 | const registerKey = require("../../models/regKey"); 8 | const Magazines = require("../../models/magazine-reciever"); 9 | const Contact = require("../../models/contact"); 10 | const uuid = require("uuid"); 11 | const Internship = require("../../models/internship"); 12 | const magazineReciever = require("../../models/magazine-reciever"); 13 | const moment = require("moment"); 14 | const { google } = require("googleapis"); 15 | const RegKey = require("../../models/regKey"); 16 | 17 | const profile = { 18 | profileIndex: async (req, res, next) => { 19 | try { 20 | // console.log(res.locals.staff.id) 21 | if (res.locals.staff) { 22 | const staffData = await Staff.findOne({ 23 | _id: res.locals.staff.id, 24 | }).select( 25 | "firstname lastname description sl_li sl_ig sl_fb profile_pic_url" 26 | ); 27 | // console.log(staff); 28 | const staffCount = await Staff.countDocuments(); 29 | const eventCount = await Event.countDocuments(); 30 | const deptCount = await Dept.countDocuments(); 31 | const participantCount = await Participant.countDocuments(); 32 | return res.render("layouts/dashboard/profile", { 33 | error: req.flash("error"), 34 | success: req.flash("success"), 35 | key: req.flash("key"), 36 | title: "Dashboard | Profile", 37 | staffCount, 38 | eventCount, 39 | deptCount, 40 | participantCount, 41 | staffData, 42 | }); 43 | } else { 44 | req.flash("error", "Something went wrong! Please try later"); 45 | return res.redirect("/staff-login"); 46 | } 47 | } catch (err) { 48 | console.log(err); 49 | req.flash("error", "Something went wrong! Please try later"); 50 | return res.redirect("/dashboard/profile"); 51 | } 52 | }, 53 | 54 | profileEdit: async (req, res, next) => { 55 | try { 56 | // console.log("This is t", req.body); 57 | const { 58 | firstname, 59 | lastname, 60 | description, 61 | profile_pic_url, 62 | sl_li, 63 | sl_ig, 64 | sl_fb, 65 | } = req.body; 66 | if (res.locals.staff) { 67 | await Staff.findByIdAndUpdate( 68 | { _id: res.locals.staff.id }, 69 | { 70 | firstname, 71 | lastname, 72 | description, 73 | profile_pic_url, 74 | sl_li, 75 | sl_ig, 76 | sl_fb, 77 | } 78 | ); 79 | return res.redirect("/dashboard/profile"); 80 | } else { 81 | req.flash("error", "Something went wrong! Please try later"); 82 | return res.redirect("/dashboard"); 83 | } 84 | } catch (err) { 85 | console.log(err); 86 | req.flash("error", "Something went wrong! Please try later"); 87 | return res.redirect("/dashboard/profile"); 88 | } 89 | }, 90 | }; 91 | 92 | module.exports = profile; 93 | -------------------------------------------------------------------------------- /views/layouts/home/sections/video-stats.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 | dots 7 |
8 |
9 | video 10 |
11 |
13 | 15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |

Cool facts about our 25 | organization

26 |
27 |

We at Entrepreneurship Cell, GNDEC always try to aim for perfection in our events, and guiding budding entrepreneurs. Get a chance work with the innovative, creative, and hardworking individuals

28 |
29 |
30 |
32 |
33 | 5K+ 34 |

Participants

35 |
36 |
37 |
39 |
40 | 20+ 41 |

Events

42 |
43 |
44 |
46 |
47 | 100+ 48 |

Members

49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
-------------------------------------------------------------------------------- /controllers/deptCont.js: -------------------------------------------------------------------------------- 1 | const Department = require("../models/dept"); 2 | const Internship = require("../models/internship"); 3 | const ErrorHandler = require("../utils/errorHandler"); 4 | 5 | const deptCont = { 6 | index: async (req, res, next) => { 7 | return res.render("layouts/home/department_page"); 8 | }, 9 | 10 | allIndex: async (req, res, next) => { 11 | try { 12 | const deptData = await Department.find().select("name description pic"); 13 | // console.log(deptData); 14 | return res.render("layouts/home/departments_page", { 15 | title: "E-Cell | Departments", 16 | deptData, 17 | }); 18 | } catch (err) { 19 | console.log(err); 20 | return res.redirect("/"); 21 | } 22 | }, 23 | 24 | finder: async (req, res, next) => { 25 | try { 26 | Department.findOne({ name: req.params.name }) 27 | .populate("members") 28 | .exec((err, foundDept) => { 29 | if (err) { 30 | console.log(err); 31 | // next(ErrorHandler.serverError()); 32 | return res.redirect("/"); 33 | } else if (!foundDept) { 34 | // next(ErrorHandler.notFoundError()); 35 | return res.render("layouts/error-404"); 36 | } else { 37 | // console.log(foundDept); 38 | return res.render("layouts/home/department_page", { 39 | foundDept, 40 | title: `E-Cell | Departments | ${foundDept.name}`, 41 | }); 42 | } 43 | }); 44 | } catch (err) { 45 | console.log(err); 46 | return res.redirect("/departments"); 47 | } 48 | }, 49 | 50 | createDept: async (req, res, next) => { 51 | try { 52 | const { name, tagline, description, recruiting, members } = req.body; 53 | await Department.findOne({ name }, async (err, existingDept) => { 54 | if (err) { 55 | // next(ErrorHandler.serverError()); 56 | return res.redirect("/"); 57 | } else if (existingDept) { 58 | return res.status(200).json({ 59 | message: "Entered department already exists", 60 | }); 61 | } else { 62 | let newDept = new Department({ 63 | name, 64 | tagline, 65 | description, 66 | recruiting, 67 | members, 68 | }); 69 | await newDept.save(); 70 | return res.status(200).json({ 71 | message: "Successfully Created the department", 72 | }); 73 | } 74 | }); 75 | } catch (err) { 76 | console.log(err); 77 | // next(ErrorHandler.serverError()); 78 | // req.flash("err", "Something went wrong. Please try again"); 79 | return res.redirect("/"); 80 | } 81 | }, 82 | 83 | internshipRegister: async (req, res, next) => { 84 | try { 85 | // console.log(req.body); 86 | const internshipForm = new Internship(req.body); 87 | console.log(req.body); 88 | await internshipForm.save(); 89 | // return res.send("Done!"); 90 | return res.status(200).json({ 91 | message: "Internship form submitted successfully", 92 | }); 93 | } catch (err) { 94 | console.log(err); 95 | // next(ErrorHandler.serverError()); 96 | // req.flash("err", "Something went wrong. Please try again"); 97 | return res.redirect("/"); 98 | } 99 | }, 100 | }; 101 | 102 | module.exports = deptCont; 103 | -------------------------------------------------------------------------------- /public/css/tingle.min.css: -------------------------------------------------------------------------------- 1 | .tingle-modal *{box-sizing:border-box}.tingle-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;display:flex;visibility:hidden;flex-direction:column;align-items:center;overflow:hidden;-webkit-overflow-scrolling:touch;background:rgba(0,0,0,.9);opacity:0;cursor:url("data:image/svg+xml,%3Csvg width='19' height='19' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.514.535l-6.42 6.42L2.677.536a1.517 1.517 0 00-2.14 0 1.517 1.517 0 000 2.14l6.42 6.419-6.42 6.419a1.517 1.517 0 000 2.14 1.517 1.517 0 002.14 0l6.419-6.42 6.419 6.42a1.517 1.517 0 002.14 0 1.517 1.517 0 000-2.14l-6.42-6.42 6.42-6.418a1.517 1.517 0 000-2.14 1.516 1.516 0 00-2.14 0z' fill='%23FFF' fill-rule='nonzero'/%3E%3C/svg%3E"),auto}@supports ((-webkit-backdrop-filter:blur(12px)) or (backdrop-filter:blur(12px))){.tingle-modal{-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}}.tingle-modal--confirm .tingle-modal-box{text-align:center}.tingle-modal--noOverlayClose{cursor:default}.tingle-modal--noClose .tingle-modal__close{display:none}.tingle-modal__close{position:fixed;top:2.5rem;right:2.5rem;z-index:1000;padding:0;width:2rem;height:2rem;border:none;background-color:transparent;color:#fff;cursor:pointer}.tingle-modal__close svg *{fill:currentColor}.tingle-modal__closeLabel{display:none}.tingle-modal__close:hover{color:#fff}.tingle-modal-box{position:relative;flex-shrink:0;margin-top:auto;margin-bottom:auto;width:60%;border-radius:4px;background:#fff;opacity:1;cursor:auto;will-change:transform,opacity}.tingle-modal-box__content{padding:3rem 3rem}.tingle-modal-box__footer{padding:1.5rem 2rem;width:auto;border-bottom-right-radius:4px;border-bottom-left-radius:4px;background-color:#f5f5f5;cursor:auto}.tingle-modal-box__footer::after{display:table;clear:both;content:""}.tingle-modal-box__footer--sticky{position:fixed;bottom:-200px;z-index:10001;opacity:1;transition:bottom .3s ease-in-out .3s}.tingle-enabled{position:fixed;right:0;left:0;overflow:hidden}.tingle-modal--visible .tingle-modal-box__footer{bottom:0}.tingle-modal--visible{visibility:visible;opacity:1}.tingle-modal--visible .tingle-modal-box{animation:scale .2s cubic-bezier(.68,-.55,.265,1.55) forwards}.tingle-modal--overflow{overflow-y:scroll;padding-top:8vh}.tingle-btn{display:inline-block;margin:0 .5rem;padding:1rem 2rem;border:none;background-color:grey;box-shadow:none;color:#fff;vertical-align:middle;text-decoration:none;font-size:inherit;font-family:inherit;line-height:normal;cursor:pointer;transition:background-color .4s ease}.tingle-btn--primary{background-color:#3498db}.tingle-btn--danger{background-color:#e74c3c}.tingle-btn--default{background-color:#34495e}.tingle-btn--pull-left{float:left}.tingle-btn--pull-right{float:right}@media (max-width :540px){.tingle-modal{top:0;display:block;padding-top:60px;width:100%}.tingle-modal-box{width:auto;border-radius:0}.tingle-modal-box__content{overflow-y:scroll}.tingle-modal--noClose{top:0}.tingle-modal--noOverlayClose{padding-top:0}.tingle-modal-box__footer .tingle-btn{display:block;float:none;margin-bottom:1rem;width:100%}.tingle-modal__close{top:0;right:0;left:0;display:block;width:100%;height:60px;border:none;background-color:#2c3e50;box-shadow:none;color:#fff}.tingle-modal__closeLabel{display:inline-block;vertical-align:middle;font-size:1.6rem;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.tingle-modal__closeIcon{display:inline-block;margin-right:.8rem;width:1.6rem;vertical-align:middle;font-size:0}}@keyframes scale{0%{opacity:0;transform:scale(.9)}100%{opacity:1;transform:scale(1)}} -------------------------------------------------------------------------------- /views/layouts/home/sections/features.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |

Our goals and objectives, to build a 8 | good 9 | entrepreneurship community

10 |
11 |
12 |
13 |
14 |
16 |
17 |
19 | 20 |
21 |
22 |

Events

23 |

All upcoming events, webinars and activities with their dates, details and enrollment procedures can be found here

24 | Learn More 26 |
27 |
28 |
29 |
31 |
32 |
34 | 35 |
36 |
37 |

Departments

38 |

E-Cell offers various Departments for you to explore and work in them by 39 | flaunting your skills and creativity, with excellent people.

40 | Explore 42 |
43 |
44 |
45 |
47 |
48 |
50 | 51 |
52 |
53 |

Staff Dashboard

54 |

This functionality is exclusively for E-Cell faculty members to login at their ends and manage their organization.

55 | Visit 57 |
58 |
59 |
60 |
61 |
62 |
-------------------------------------------------------------------------------- /views/layouts/dashboard/sections/department-edit-form.ejs: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 |
6 |
7 |

Department Edit Form

8 |
9 |
10 |
11 |
12 | 13 | 16 |
17 | 18 |
19 | 20 | 23 |
24 | 25 |
26 | 27 | 30 |
31 | 32 |
33 | 35 | 38 |
39 | 40 | 51 | 52 |
53 | 55 |
56 |
57 |
58 |
-------------------------------------------------------------------------------- /views/layouts/dashboard/sections/profile-form.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | Edit Profile 5 | 6 |
7 | 8 | 10 | 11 | 13 | 14 | 16 |
17 | 18 |
19 | 20 | 22 |
23 | 24 |
25 | 26 | 28 |
29 | 30 |
31 | 32 | 34 |
35 | 36 |
37 | 38 | 40 |
41 | 42 | 43 | 45 |
46 |
-------------------------------------------------------------------------------- /views/layouts/dashboard/sections/header.ejs: -------------------------------------------------------------------------------- 1 |
2 |
4 | 5 | 13 |
14 |
15 |
16 | 17 | rounded 18 | font-semibold text-red-500"> 19 | <%= error %> 20 | 21 | 22 | rounded 23 | font-semibold text-green-500"> 24 | <%= success %> 25 | 26 |
27 | 62 |
63 |
-------------------------------------------------------------------------------- /views/layouts/home/sections/about-us.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |

About Us

10 |
11 |
12 |
13 |
14 |
15 | 16 |
17 |
18 |

Organized

19 |

Lorem ipsum dolor sit amet, consectetur 20 | adipisicing 21 | elit. Veniam tempora 22 | quidem vel sint.

23 |
24 |
25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 |

Prizes

33 |

Lorem ipsum dolor sit amet, consectetur 34 | adipisicing 35 | elit. Veniam tempora 36 | quidem vel sint.

37 |
38 |
39 |
40 |
41 |
42 |
43 | 44 |
45 |
46 |

Flexibilty

47 |

Lorem ipsum dolor sit amet, consectetur 48 | adipisicing 49 | elit. Veniam tempora 50 | quidem vel sint.

51 |
52 |
53 |
54 |
55 |
56 |
57 | 58 |
59 |
60 |

Helpful

61 |

Lorem ipsum dolor sit amet, consectetur 62 | adipisicing 63 | elit. Veniam tempora 64 | quidem vel sint.

65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | 74 |
75 |
76 |
77 |
78 |
79 |
-------------------------------------------------------------------------------- /views/layouts/home/sections/event-timeline.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

Workflow

6 |
7 | 72 |
73 |
-------------------------------------------------------------------------------- /views/layouts/home/sections/top3-department.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

Our Top Performing

5 |

Departments

6 |

Of the Month

7 | 8 |
9 |
10 |
12 |
13 |
15 | 16 |
17 |
18 |

Department Name

19 |

20 | Lorem ipsum dolor sit amet,consetetur sadipscing elitr, seddiam nonu eirmod 21 | tempor 22 | invidunt labore.(Tagline)

23 | Visit Department 25 |
26 |
27 |
28 |
30 |
31 |
33 | 34 |
35 |
36 |

Department Name

37 |

38 | Lorem ipsum dolor sit amet,consetetur sadipscing elitr, seddiam nonu eirmod 39 | tempor 40 | invidunt labore.(Tagline)

41 | Visit Department 43 |
44 |
45 |
46 |
48 |
49 |
51 | 52 |
53 |
54 |

Department Name

55 |

56 | Lorem ipsum dolor sit amet,consetetur sadipscing elitr, seddiam nonu eirmod 57 | tempor 58 | invidunt labore.(Tagline)

59 | Visit Department 61 |
62 |
63 |
64 |
65 | View All Departments 67 | 68 |
-------------------------------------------------------------------------------- /views/layouts/home/credits.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%- include("./partials/head-links.ejs") %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | <%- include("./sections/header-nav.ejs") %> 13 | 14 | 15 | <%- include("./sections/credits-team.ejs") %> 16 | 17 | 18 | 19 | 37 | 38 | 39 | 40 | 41 | <%- include("./partials/scripts.ejs") %> 42 | 43 | 44 | 45 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /views/layouts/dashboard/sections/external-links.ejs: -------------------------------------------------------------------------------- 1 |
2 |
4 |

Keep a check on our website pages:

5 | 68 |
69 |
-------------------------------------------------------------------------------- /views/layouts/dashboard/sections/contact-form.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

Get in touch 5 |

6 |

Fill in the 7 | form to submit any query

8 | 9 |
10 | 12 | 14 | 16 | 17 |
Dhaka, Street, State, Postal Code
18 |
19 | 20 |
21 | 23 | 25 | 26 |
+880 1234567890
27 |
28 | 29 |
30 | 32 | 34 | 35 |
info@demo.com
36 |
37 |
38 |
39 |
40 | 41 | 43 |
44 | 45 |
46 | 47 | 49 |
50 | 51 |
52 | 53 | 55 |
56 | 57 | 59 |
60 |
61 |
-------------------------------------------------------------------------------- /views/layouts/home/departments_page.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <%- include("./partials/head-links.ejs") %> 7 | 8 | 9 | 10 | 11 | <%- include("./sections/header-nav.ejs") %> 12 | 13 | 14 | <%- include("./sections/all-departments.ejs") %> 15 | 16 | 17 | 18 | 35 | 36 | 37 | 38 | 39 | 40 | <%- include("./partials/scripts.ejs") %> 41 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /views/layouts/home/event-page.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <%- include("./partials/head-links.ejs") %> 5 | 6 | 7 | 8 | 9 | <%- include("./sections/header-nav.ejs") %> 10 | 11 | 12 | <%- include("./sections/collective-events.ejs") %> 13 | 14 | 15 | 16 | 33 | 34 | 35 | 36 | 37 | 38 | <%- include("./partials/scripts.ejs") %> 39 | 40 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /views/layouts/dashboard/sections/stat-card.ejs: -------------------------------------------------------------------------------- 1 |
2 |
4 |
6 | 8 | 10 | 11 | 12 |
13 |
14 |

15 | <%= staffCount %> 16 |

17 |

Members

18 |
19 |
20 |
22 |
24 | 26 | 28 | 29 |
30 |
31 |

32 | <%= eventCount %> 33 |

34 |

Events

35 |
36 |
37 |
39 |
41 | 43 | 45 | 46 |
47 |
48 |

49 | <%= deptCount %> 50 |

51 |

Departments

52 |
53 |
54 |
56 |
58 | 60 | 62 | 63 | 64 |
65 |
66 |

67 | <%= participantCount %> 68 |

69 |

Participants

70 |
71 |
72 |
-------------------------------------------------------------------------------- /views/layouts/auth/password-reset-email.ejs: -------------------------------------------------------------------------------- 1 | <%- include("./partials/head.ejs") %> 2 | <%- include("./partials/links.ejs") %> 3 | 4 | 5 |
6 |
14 |
15 |
16 |
26 |

27 | Enter your email address 28 |

29 |
30 | 31 | 41 |
42 |
43 | 55 | 63 | E-Cell, GNDEC 64 | 65 |
66 |
67 | 69 | <%= success.length === 1 ? "py-1 px-2 my-2 text-green-400" : "" %> 70 | rounded 71 | font-semibold"> 72 | <%= error %> 73 | <%= success %> 74 | 75 |
76 |
77 |
78 |
79 |
80 |
81 | 82 | -------------------------------------------------------------------------------- /views/layouts/home/department_page.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%- include("./partials/head-links.ejs") %> 6 | 7 | 8 | 9 | 10 | <%- include("./sections/header-nav.ejs") %> 11 | 12 | 13 | 14 | <%- include("./sections/about-us.ejs") %> 15 | 16 | 17 | <%- include("./sections/vision.ejs") %> 18 | 19 | 20 | <%- include("./sections/team.ejs") %> 21 | 22 | 23 | 40 | 41 | 42 | 43 | 44 | 45 | <%- include("./partials/scripts.ejs") %> 46 | 47 | <% const deptName = foundDept.name %> 48 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /views/layouts/home/event-landing.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <%- include("./partials/head-links.ejs") %> 7 | 8 | 9 | 10 | 11 | <%- include("./sections/header-nav.ejs") %> 12 | 13 | 14 | <%- include("./sections/event-description.ejs") %> 15 | 16 | 17 | <%- include("./sections/event-timeline.ejs") %> 18 | 19 | 20 | <%- include("./sections/event-hosts.ejs") %> 21 | 22 | <%- include("./sections/event-sponsors.ejs") %> 23 | 24 | <%- include("./sections/event-organizers.ejs") %> 25 | 26 | 27 | 28 | 29 | 46 | 47 | 48 | 49 | 50 | 51 | <%- include("./partials/scripts.ejs") %> 52 | 53 | 54 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /views/layouts/dashboard/department.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%- include("./sections/head.ejs") %> 6 | 7 | 8 | 9 | 10 | 11 |
12 |
14 | 15 | 16 | <%- include("./sections/header.ejs") %> 17 | 18 | 19 | 20 | <%- include("./sections/sidebar.ejs") %> 21 | 22 | 23 |
24 | 25 | <%- include("./sections/stat-card.ejs") %> 26 | 27 | 28 | 29 | <%- include("./sections/department-edit-form.ejs") %> 30 | 31 | 32 | 33 | <%- include("./sections/external-links.ejs") %> 34 | 35 |
36 |
37 |
38 | 39 | 40 | <%- include("./sections/scripts.ejs") %> 41 | 42 | <% const deptId = dept.id %> 43 | 126 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /views/layouts/home/home-new.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%- include("./partials/head-links.ejs") %> 6 | 7 | 8 | 9 | 10 | 11 | <%- include("./sections/header-nav.ejs") %> 12 | 13 | 14 | <%- include("./sections/home-about-us.ejs") %> 15 | 16 | 17 | <%- include("./sections/vision.ejs") %> 18 | 19 | 20 | 21 | 22 | 23 | <%- include("./sections/brands.ejs") %> 24 | 25 | 26 |
27 | 28 | 29 | <%- include("./sections/features.ejs") %> 30 | 31 | 32 | <%- include("./sections/video-stats.ejs") %> 33 | 34 | 35 | 36 | <%- include("./sections/home-team.ejs") %> 37 | 38 | 39 | 40 | <%- include("./sections/testimonials.ejs") %> 41 | 42 | 43 | 44 | 61 | 62 | 63 | 64 | 65 | 66 | <%- include("./partials/scripts.ejs") %> 67 | 68 | 69 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /public/js/app.js: -------------------------------------------------------------------------------- 1 | // AOS Init 2 | AOS.init(); 3 | 4 | // // Contact Form 5 | // const contactButton = document.getElementById("contact-button"); 6 | // const contactName = document.querySelector("#contact-name"); 7 | // const contactEmail = document.querySelector("#contact-email"); 8 | // const contactMessage = document.querySelector("#contact-message"); 9 | // const contactConf = document.querySelector("#contact-conf"); 10 | // const contactSubmitSpan = document.querySelector("#submit-span"); 11 | // const contactSpinner = document.querySelector("#contact-spinner"); 12 | 13 | // const sendContactData = async () => { 14 | // // contactSubmitSpan.classList.toggle("hidden"); 15 | // // contactSpinner.classList.toggle("hidden"); 16 | // // const contact = { 17 | // // name: contactName.value, 18 | // // email: contactEmail.value, 19 | // // message: contactMessage.value, 20 | // // }; 21 | // // const contactData = { 22 | // // contact, 23 | // // }; 24 | // // await fetch("/", { 25 | // // method: "POST", 26 | // // headers: { 27 | // // "Content-Type": "application/json", 28 | // // }, 29 | // // body: JSON.stringify(contactData), 30 | // // }) 31 | // // .then(async (res) => { 32 | // // const data = await res.json(); 33 | // // if (data.message) { 34 | // // setTimeout(() => { 35 | // // contactSubmitSpan.classList.toggle("hidden"); 36 | // // contactSpinner.classList.toggle("hidden"); 37 | // // contactConf.classList.value = "text-green-700"; 38 | // // contactConf.firstElementChild.innerText = data.message; 39 | // // }, 3000); 40 | // // contactConf.classList.value = "hidden"; 41 | // // } else { 42 | // // setTimeout(() => { 43 | // // contactSubmitSpan.classList.toggle("hidden"); 44 | // // contactSpinner.classList.toggle("hidden"); 45 | // // contactConf.classList.value = "text-red-700"; 46 | // // contactConf.firstElementChild.innerText = 47 | // // data.error.message; 48 | // // }, 3000); 49 | // // contactConf.classList.value = "hidden"; 50 | // // } 51 | // // }) 52 | // // .catch((err) => { 53 | // // setTimeout(() => { 54 | // // contactSubmitSpan.classList.toggle("hidden"); 55 | // // contactSpinner.classList.toggle("hidden"); 56 | // // contactConf.classList.value = "text-red-700"; 57 | // // contactConf.firstElementChild.innerText = 58 | // // "An unexpected error has accured. Please try again later"; 59 | // // }, 3000); 60 | // // contactConf.classList.value = "hidden"; 61 | // // }); 62 | 63 | // }; 64 | 65 | // const newsLetterInp = document.querySelector("#newsletter-input"); 66 | // const newsLetterButton = document.querySelector("#newsletter-button"); 67 | 68 | // const sendNewsletterEmail = async () => { 69 | // const data = { 70 | // newsletter: { 71 | // email: newsLetterInp.value, 72 | // }, 73 | // }; 74 | // await fetch("/newsletter-sub", { 75 | // method: "POST", 76 | // headers: { 77 | // "Content-Type": "application/json", 78 | // }, 79 | // body: JSON.stringify(data), 80 | // }) 81 | // .then(async (res) => { 82 | // const data = await res.json(); 83 | // console.log(data); 84 | // }) 85 | // .catch((err) => { 86 | // console.log(err); 87 | // }); 88 | // }; 89 | 90 | // // contactButton.addEventListener("click", async (e) => { 91 | // // e.preventDefault(); 92 | // // sendContactData(); 93 | // // }); 94 | 95 | // newsLetterButton.addEventListener("click", async (e) => { 96 | // e.preventDefault(); 97 | // sendNewsletterEmail(); 98 | // }); 99 | 100 | // contactButton.addEventListener("submit", function (event) { 101 | // event.preventDefault(); 102 | // console.log("HHA") 103 | // var serializeForm = function (form) { 104 | // var obj = {}; 105 | // var formData = new FormData(form); 106 | // for (var key of formData.keys()) { 107 | // obj[key] = formData.get(key); 108 | // } 109 | // return obj; 110 | // }; 111 | // console.log(serializeForm); 112 | // console.log(event); 113 | // fetch("/", { 114 | // method: "POST", 115 | // body: JSON.stringify(serializeForm(new FormData(event.target))), 116 | // headers: { 117 | // "Content-type": "application/json; charset=UTF-8", 118 | // }, 119 | // }) 120 | // .then((res) => console.log(res)) 121 | // .catch((err) => console.log(err)); 122 | // }); 123 | --------------------------------------------------------------------------------