{"id":23092967,"url":"https://github.com/sandeepls/virtual-event-management","last_synced_at":"2026-05-05T19:34:27.607Z","repository":{"id":268373057,"uuid":"903787263","full_name":"SandeepLS/Virtual-Event-Management","owner":"SandeepLS","description":"Develop a backend system for a virtual event management platform focusing on user registration, event scheduling, and participant management, all managed through in NoSQL(MongoDB).  The system are feature secure user authentication, allowing users to register and log in using bcrypt for password hashing and JWT for session management.","archived":false,"fork":false,"pushed_at":"2024-12-16T19:42:39.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T06:22:34.921Z","etag":null,"topics":["express","mongoose","nodejs","nodemailer","rest-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SandeepLS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-15T15:07:00.000Z","updated_at":"2024-12-20T03:17:44.000Z","dependencies_parsed_at":"2024-12-16T11:35:29.777Z","dependency_job_id":"c87ffa10-1336-4ba1-80c6-b595181bb7d4","html_url":"https://github.com/SandeepLS/Virtual-Event-Management","commit_stats":null,"previous_names":["sandeepls/virtual-event-management"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SandeepLS/Virtual-Event-Management","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SandeepLS%2FVirtual-Event-Management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SandeepLS%2FVirtual-Event-Management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SandeepLS%2FVirtual-Event-Management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SandeepLS%2FVirtual-Event-Management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SandeepLS","download_url":"https://codeload.github.com/SandeepLS/Virtual-Event-Management/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SandeepLS%2FVirtual-Event-Management/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32665138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["express","mongoose","nodejs","nodemailer","rest-api"],"created_at":"2024-12-16T21:46:06.810Z","updated_at":"2026-05-05T19:34:27.569Z","avatar_url":"https://github.com/SandeepLS.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"npm init\nnpm i express, dotenv\nnpm install nodemon --save-dev\ngit init, git status\n\napp.js, .env, .gitignore\n\nnpm i mongoose\nnpm i bcrypt, jsonwebtoken\nMap: models, controllers, routes, app.js\n\n---\n\ngit init\ngit add .\ngit commit -m \"Done\"\ngit remote add origin https://github.com/SandeepLS/Virtual-Event-Management.git\ngit branch -M main\ngit push -u origin main\n\n---\n\nPostman-tool: 1_Virtual_Event\nUser/EventManager Register\nUser/EventManager login :- we get token, based on the role.\n\n//EventManager create \u0026 manage event\nUsing that token, EventManager create events\nUsing that token, EventManager Update events\nUsing that token, EventManager delete events\n\n---\n\n//user register for an event\nEndpoint:\nhttp://localhost:3000/api/v1/events/\u003ceventId\u003e/register\nHeaders:\nUser Authorization: Bearer \u003cuser_JWT_token\u003e\n\n-\u003e middleware/userVerify.js -\u003e controllers/event.js -\u003e controllers/user.js -\u003e routes/event.js\n-\u003e Using eventId, User register a particuler events.\nThen User_ID added to the participants fielsd, in a event table.\n\n-\u003e Update files:-\nevent.js Controller -\u003e event.js Routes -\u003e\n\n-\u003econst userId = req.user.\\_id; // User ID from middleware decoded JWT\nThe user.\\_id is coming from the decoded JWT (JSON Web Token). When a user logs in successfully, a JWT is created and signed with their user details, including the user.\\_id (MongoDB ObjectId) and the user's role or other identifying information. This token is passed in the Authorization header when making requests to protected routes.\n\n-\u003eThen we didn't mention require the Middleware (validateJWT) in event.js?\nAns: Updated event.js Routes\n// Route to register for an event (protected route)\nrouter.post('/:eventId/register', validateJWT, registerForEvent); // Use validateJWT middleware here\n\n-\u003eSummary\n\n- When a user sends a request to POST /api/v1/events/:eventId/register, the validateJWT middleware checks the validity of the token in the Authorization header.\n- If the token is valid, the request proceeds to the registerForEvent controller.\n- In the controller, you can access req.user.\\_id to register the user for the event.\n\n-\u003e But in event.js we didn't use User right, Then why should you use require(const User = require('../models/user');)?\nWhy User is Needed:\n\n- The User model is required because, when registering for an event, you might need to verify whether the user is already registered (by checking the participants array).\n- Additionally, you might want to fetch user details (such as the email address) to send a confirmation email once they successfully register.\n- Add the user's \\_id to the participants field/array of that event.\n- Optionally, you may want to associate the event with the user in some way (if required).\n- You use User to check if the user exists (and to send a confirmation email, if necessary).\n\n---\n\nnpm install nodemailer\n1. While user register for event, will get successful confirmation email.\n   Map: utils/emailSender.js -\u003e.env -\u003e middleware/userVerify.js -\u003e controllers/event.js -\u003e routes/event.js\n\nset email pass:-\n\u003e Go to Google Account Security Settings.\n\u003e Enable 2-Step Verification (if not already enabled).\n\u003e Type in search-box: App Password\n\u003e create Project name: Virtual-Event\n\u003e Then we get password, \u0026 use it in vsCode.\n\n2. While user cancel for event, will get successful confirmation email.\n   Map: utils/emailSender.js -\u003e.env -\u003econtrollers/event.js\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandeepls%2Fvirtual-event-management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandeepls%2Fvirtual-event-management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandeepls%2Fvirtual-event-management/lists"}