{"id":20962175,"url":"https://github.com/sarvesh30112002/codesphere-a_collaborative_coding_and_proctored_assesment_platform","last_synced_at":"2026-04-04T08:35:35.748Z","repository":{"id":243184330,"uuid":"811673779","full_name":"Sarvesh30112002/CodeSphere-A_Collaborative_Coding_And_Proctored_Assesment_Platform","owner":"Sarvesh30112002","description":"CodeSphere is the ultimate solution for modern education and Proctored assessment integrity. With CodeSphere, educators and students can collaborate in real-time coding environments, allowing for interactive programming practice and live supervision.","archived":false,"fork":false,"pushed_at":"2024-06-08T15:40:43.000Z","size":6007,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T00:53:42.387Z","etag":null,"topics":["bootstrap","cloudinary","ejs","express-js","extension","html-css-javascript","jwt-authentication","mongodb","multiple-tab-detection","nodejs","postman","proctored-assessment","proctorexam","proctoring","random-question","socket-io","tab-switch-detection","test-timer","webcam-capture"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sarvesh30112002.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-06-07T04:31:06.000Z","updated_at":"2024-06-08T15:40:46.000Z","dependencies_parsed_at":"2025-01-20T00:52:41.183Z","dependency_job_id":"ea713264-9163-459f-a6fc-55e1a7dadd50","html_url":"https://github.com/Sarvesh30112002/CodeSphere-A_Collaborative_Coding_And_Proctored_Assesment_Platform","commit_stats":null,"previous_names":["sarvesh30112002/codesphere-a_collaborative_coding_and_proctored_assesment_platform"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sarvesh30112002%2FCodeSphere-A_Collaborative_Coding_And_Proctored_Assesment_Platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sarvesh30112002%2FCodeSphere-A_Collaborative_Coding_And_Proctored_Assesment_Platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sarvesh30112002%2FCodeSphere-A_Collaborative_Coding_And_Proctored_Assesment_Platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sarvesh30112002%2FCodeSphere-A_Collaborative_Coding_And_Proctored_Assesment_Platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sarvesh30112002","download_url":"https://codeload.github.com/Sarvesh30112002/CodeSphere-A_Collaborative_Coding_And_Proctored_Assesment_Platform/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243358306,"owners_count":20277995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bootstrap","cloudinary","ejs","express-js","extension","html-css-javascript","jwt-authentication","mongodb","multiple-tab-detection","nodejs","postman","proctored-assessment","proctorexam","proctoring","random-question","socket-io","tab-switch-detection","test-timer","webcam-capture"],"created_at":"2024-11-19T02:23:54.911Z","updated_at":"2025-12-26T08:10:14.576Z","avatar_url":"https://github.com/Sarvesh30112002.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CodeSphere-A_Collaborative_Coding_And_Proctored_Assesment_Platform\nCodeSphere is a comprehensive platform designed to enhance E-Learning by providing a real-time interactive web-based lab environment for students and teachers. It integrates advanced proctoring features to ensure the integrity of online assessments, making it a perfect solution for remote learning and secure online examinations.\n\n\u003chr\u003e\n\n## Introduction \n \nThe main goal of CodeSphere is to advance E-Learning by addressing two significant challenges: \n1. Providing practical knowledge through a real-time interactive web-based lab.\n2. Ensuring the integrity of online assessments with robust proctoring mechanisms.\n\n## Features\n\n### CodeSphere Lab\n- **Create Room**: The admin (teacher) can create a room with a secret link and password.\n- **Join Room**: Participants can join the room using the link and password to complete programming tasks.\n- **Code Editor**: Supports C, C++, Java, and Python, with enter, exit, run, and submit functionalities.\n- **Real-time Live Coding**: Admin can manage the room, guide, and verify each student's code in real-time.\n- **Code Checking**: Admin can download the submitted code as a PDF for review.\n\n### Proctoring\n- **Form Input**: Allows users to input their details and test invitation code.\n- **Multiple Tab Detection**: Detects and alerts if multiple tabs are open.\n- **Form Auto-fill**: Automatically fills in user details for subsequent tests using local storage.\n- **Audio and Video Checks**: Ensures the candidate’s audio and video setup meets the requirements.\n- **Live Webcam Feed**: Displays the candidate's live webcam feed on the page.\n- **Image Capture and Upload**: Captures images at configurable intervals and uploads them to the server.\n- **Admin Dashboard**: Displays all user information, allows setting the interval for image capture, and shows images with timestamps.\n\n\u003chr\u003e\n\n## Tech Stack used : \n\n**Client:** Ejs, Bootstrap, CSS, JS\n\n**Server:** NodeJs, MongoDB, Socket.io, Express.js\n\n**Others:** PostMan API, JWT Authentication, Cloudinary \n\u003chr\u003e\n\n## Architecture of Extension\n![My image](https://res.cloudinary.com/dt9ckenyh/image/upload/v1678415195/my-images/Proctor_Vision_qkmqap.png)\n\u003chr\u003e\n\n## Flow Diagram\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"Demo/Screenshot 2024-06-07 143137.png\" alt=\"image\"/\u003e\n\u003c/p\u003e\n\n\u003chr\u003e\n\n## Screenshots\n\n\u003cp align=\"center\"\u003e\n  \u003cp\u003eLanding Page\u003c/p\u003e\n  \u003cimg src=\"Demo/Screenshot (782).png\" alt=\"image\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cp\u003eForm Details to create room\u003c/p\u003e\n  \u003cimg src=\"Demo/Screenshot (783).png\" alt=\"image\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cp\u003eLinks of created rooms\u003c/p\u003e\n  \u003cimg src=\"Demo/Screenshot (784).png\" alt=\"image\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cp\u003eAllows users to input their details and test invitation code.\u003c/p\u003e\n  \u003cimg src=\"Demo/Screenshot (785).png\" alt=\"image\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cp\u003eJoin room by filling details[Proctoring is Started by webcam]\u003c/p\u003e\n  \u003cimg src=\"Demo/Screenshot (786).png\" alt=\"image\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cp\u003eFilled the details\u003c/p\u003e\n  \u003cimg src=\"Demo/Screenshot (787).png\" alt=\"image\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cp\u003eTime limited Room alloted to student named Sarvesh with random question allocated with proctoring On\u003c/p\u003e\n  \u003cimg src=\"Demo/Screenshot (788).png\" alt=\"image\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cp\u003eAdmin room, Admin can manage the room, guide, and verify each student's code in real-time.\u003c/p\u003e\n  \u003cimg src=\"Demo/Screenshot (789).png\" alt=\"image\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cp\u003eTab switch Alert, After 3 alerts student test will end\u003c/p\u003e\n  \u003cimg src=\"Demo/Screenshot (790).png\" alt=\"image\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cp\u003eAdmin can download the submitted code as a PDF for review.\u003c/p\u003e\n  \u003cimg src=\"Demo/Screenshot (791).png\" alt=\"image\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cp\u003eAdmin dashboard, Displays all user information, allows setting the interval for image capture, and shows images with timestamps.\n\u003c/p\u003e\n  \u003cimg src=\"Demo/Screenshot (792).png\" alt=\"image\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cp\u003eOur Extension\u003c/p\u003e\n  \u003cimg src=\"Demo/Screenshot 2024-06-07 093233.png\" alt=\"image\"/\u003e\n\u003c/p\u003e\n\n\u003chr\u003e\n\n## API Reference\n\n### Get All Users Data\n\n```http\n  GET /retrieve-data\n```\n- The /retrieve-data endpoint is used to retrieve all user data and images stored on the server. The endpoint accepts a GET request with no query parameters. The endpoint returns an array of all user data and their images stored on the server.\n\n\n#### Request\n```\nMethod: GET\nEndpoint: /retrieve-data\nQuery Parameters: none\n```\n\n#### Response\n```\nStatus Code: 200 OK\nBody:\ndata: an array containing all user data and their images stored on the server\n```\n\n#### Example\nRetrieving all user data and images:\n```\nGET /retrieve-data\n```\n```\nStatus: 200 OK\n{\n  \"data\": [\n    {\n      \"_id\": \"615e93613a85de4fa0d6a0e2\",\n      \"firstName\": \"John\",\n      \"lastName\": \"Doe\",\n      \"email\": \"johndoe@example.com\",\n      \"testInvitation\": \"12345\",\n      \"id\": \"1633521057017\",\n      \"images\": [\n        {\n          \"url\": \"https://example.com/image1.jpg\",\n          \"timestamp\": 1633521057017\n        },\n        {\n          \"url\": \"https://example.com/image2.jpg\",\n          \"timestamp\": 1633521063119\n        }\n      ],\n      \"__v\": 0\n    },\n    {\n      \"_id\": \"615e93613a85de4fa0d6a0e3\",\n      \"firstName\": \"Jane\",\n      \"lastName\": \"Doe\",\n      \"email\": \"janedoe@example.com\",\n      \"testInvitation\": \"56789\",\n      \"id\": \"1633521068371\",\n      \"images\": [\n        {\n          \"url\": \"https://example.com/image3.jpg\",\n          \"timestamp\": 1633521068371\n        }\n      ],\n      \"__v\": 0\n    }\n  ]\n}\n\n```\n\n### SET New Interval\n\n```http\n  GET /set_interval?interval=value\n```\n\n- The /set_interval endpoint is used to set the interval of image capturing in the extension. The endpoint accepts a GET request with the interval query parameter. The value of the interval parameter is in minutes, which is then converted to milliseconds and set as the interval for capturing images.\n\n#### Request\n```\nMethod: GET\nEndpoint: /set_interval\nQuery Parameters:\ninterval: a number representing the interval in minutes (e.g., interval=5)\n\n```\n\n#### Response\n```\nStatus Code: 200 OK\nBody:\nsuccess: a boolean value (true) indicating that the interval was set successfully\n```\n\n#### Example\nSetting the interval to 5 minutes:\n```\nGET /set_interval?interval=5\n```\n```\nStatus: 200 OK\n{\n  \"success\": true\n}\n\n```\n\n\n- This route is used to set the interval for sending images to the server during an online assessment.\n- The route accepts a single query parameter:\n\n- `interval`: The time interval, in minutes, between image uploads. This parameter is required.\n\n- Provide an example of how to use the route, including the expected response. For example:\n\n\n```\nExample Request:\nGET /set_interval?interval=5\n\nExample Response:\n{\n  success: true\n}\n\n```\n\n### POST New User\n\n```http\n  POST /createUser\n```\n- The /createUser endpoint is used to create a new user in the system. This endpoint accepts a JSON object in the POST request body with the following properties:\n\n\n```\nfirstName (required): The first name of the user.\nlastName (required): The last name of the user.\nemail (required): The email address of the user.\ntestInvitation (required): The invitation code for the test the user is taking.\n\n```\n- The API endpoint generates a unique id for the user and stores the user's information, along with an empty array of images, in the database\n\n#### Request\n```\nHTTP Method: POST\nEndpoint: /createUser\nRequest Body: JSON object with the following properties:\nfirstName (string, required)\nlastName (string, required)\nemail (string, required)\ntestInvitation (string, required)\n```\n\n```\nExample Request:\nPOST /createUser\nContent-Type: application/json\n\n{\n  \"firstName\" : \"John\",\n  \"lastName\" :\"Doe\",\n  \"email\" : \"johndoe@example.com\",\n  \"testInvitation\" : \"12345\"\n}\n```\n\n#### Response\n- HTTP Status Code: 200 if successful, 500 if an error occurred\n- Response Body: JSON object with the following properties:\n```\nuserid (string): The unique id assigned to the new user\nerror (string): If an error occurred while creating the user.\n```\n- In response you will get unique userid of user\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n    \"userid\": \"1646726117427\",\n}\n\n```\n\n\n\n### POST Upload Image of User\n```http\n  POST /upload-image\n```\n\n- The /upload-image route is used to upload an image for a specific user to the cloud. The route accepts a POST request and expects two parameters in the request body: image and userid.\n\n- The image parameter should contain the base64-encoded image data. The userid parameter should contain the user ID for which the image is being uploaded.\n\n- Upon receiving the request, the route generates a timestamp and uses it to create a unique file name for the image. It then uploads the image data to the cloud using the Cloudinary API and saves the image URL in the user's record in the database.\n\n- If there is an error in uploading the image, the route responds with a 500 status code and an error message. If the image is uploaded successfully, the route responds with a 200 status code and a JSON object containing the interval.\n\n####\n```\nHTTP Method: POST\n\nEndpoint: /upload-image\n\nHeaders:\n\nContent-Type: application/json\n```\n- Body:\n```\n{\n  \"image\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6CAIAAAC0tAIdAAAgAElEQVR4nOzde5zU1d8/8D/rZKlNtSpJhN....\", // base64 encoded image data\n  \"userid\": \"12345\" // User ID to associate the image with\n}\n```\n\n#### Response:\n```\nHTTP Status Code: 200 OK\n```\n- Body:\n```\n{\n  \"interval\": 60000 // Time interval set for capturing screenshots in milliseconds\n}\n```\n- If an error occurs during the image upload process, the response will have an HTTP status code of 500 and the body will contain an error message, for example:\n\n- HTTP Status Code: 500 Internal Server Error\n\n- Body:\n\n```\n{\n  \"error\": \"Failed to save image\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarvesh30112002%2Fcodesphere-a_collaborative_coding_and_proctored_assesment_platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsarvesh30112002%2Fcodesphere-a_collaborative_coding_and_proctored_assesment_platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarvesh30112002%2Fcodesphere-a_collaborative_coding_and_proctored_assesment_platform/lists"}