{"id":22064480,"url":"https://github.com/ansh-info/incognito","last_synced_at":"2026-02-11T11:01:30.518Z","repository":{"id":258266952,"uuid":"849476598","full_name":"ansh-info/Incognito","owner":"ansh-info","description":"Inspired by Google's Foobar challenge. It automates secretive candidate selection based on online activity, provides timed coding challenges, and allows hiring managers to evaluate submissions","archived":false,"fork":false,"pushed_at":"2024-10-28T10:25:09.000Z","size":9217,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-13T01:01:43.322Z","etag":null,"topics":["api","docker","docker-compose","javascript","jupyter-notebook","kmeans","leetcode","logistic-regression","machine-learning","machinelearning","mysql","python3","react","reactjs","scikit-learn","selection-algorithms","supervised-learning","webdevelopment"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ansh-info.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,"zenodo":null}},"created_at":"2024-08-29T17:03:01.000Z","updated_at":"2024-10-16T19:37:49.000Z","dependencies_parsed_at":"2024-10-18T07:48:40.983Z","dependency_job_id":"8bb22288-b0e0-4850-8bfb-1f497ec64f22","html_url":"https://github.com/ansh-info/Incognito","commit_stats":null,"previous_names":["ansh-info/incognito"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ansh-info/Incognito","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansh-info%2FIncognito","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansh-info%2FIncognito/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansh-info%2FIncognito/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansh-info%2FIncognito/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ansh-info","download_url":"https://codeload.github.com/ansh-info/Incognito/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansh-info%2FIncognito/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29332292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"last_error":"SSL_read: 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":["api","docker","docker-compose","javascript","jupyter-notebook","kmeans","leetcode","logistic-regression","machine-learning","machinelearning","mysql","python3","react","reactjs","scikit-learn","selection-algorithms","supervised-learning","webdevelopment"],"created_at":"2024-11-30T19:11:49.121Z","updated_at":"2026-02-11T11:01:30.470Z","avatar_url":"https://github.com/ansh-info.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Incognito\n\nInspired by Google's Foobar challenge. It automates secretive candidate selection based on online activity, provides timed coding challenges, and allows hiring managers to evaluate submissions\n\n## Project Overview\n\nKey Features:\n\n- Interactive UI: A responsive and intuitive user interface where users can select problems, write code in multiple languages, and receive real-time feedback.\n- Dockerized Environment: The platform runs entirely within Docker containers, ensuring consistency across all systems. Test cases are executed in isolated containers.\n- Database-Driven Challenges: Questions and corresponding test cases are stored in a MySQL database, allowing for easy management and scalability.\n- Automated Test Case Execution: Solutions are automatically tested against multiple test cases stored in the database, providing immediate feedback to the user.\n\u003c!-- - Multi-Language Support: The platform supports multiple programming languages, allowing users to practice in their language of choice. --\u003e\n\n### Webapplication\n![Question Page](/images/questionpage.png)\n\n## Installation and Setup\n\nTo set up the project locally or on a server, follow these steps:\n\nPrerequisites\nDocker and Docker Compose must be installed on your system.\nNode.js and npm should also be installed for local development.\nSteps\nClone the repository:\n\n````bash\ngit clone https://github.com/ansh-info/Incognito\ncd Incognito\n````\n\n### To run the repo locally\n\n- Firstly make sure to set the **env** variables in the connection folder for your mysql database container.\n- connection/.env and emailclient/.env for the emailclient - smtp password and the server\n- Then pull and start the mysql docker container and connect it to the docker network.\n\nDocker Command to run the mysql container:\n\n```bash\ndocker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql\n```\n\nDocker Command to connect the mysql container:\n\n```bash\ndocker network create python\ndocker network connect python mysql                                                                                                                                                        \n```\n\nThen Build the Isolated Docker container to run the python test-cases\n\n```bash\ncd sandbox\ndocker build -t runtestcases .\ncd .. # To Return to the root \n```\n\nCreate a python virtual environment\n\n```bash\nconda create --name webapp python=3.10\nconda activate webapp\npip install -r requirements.txt\npython3 scripts.py\n```\n\nInstall node dependencies:\n\n```bash\nnpm install\nnpm start\n```\n\n### To build repo as a docker container\n\nBuild and run Docker containers: The entire environment, including the MySQL database and Node.js backend, is encapsulated within Docker containers. Run the following command to build and start the containers:\n\n```bash\ndocker-compose up --build\n```\n\n```bash\ndocker run --name webapp --network webapp -p 5001:5001 -p 3000:3000 \\\n  -v /var/run/docker.sock:/var/run/docker.sock \\\n  webapp\n```\n\n#### What This Command Does:\n- Sets up the **MySQL database** with tables for questions and test cases.\n- Launches the **Node.js backend**.\n- Serves the **frontend** on [http://localhost:3000](http://localhost:3000).\n\n#### Database Configuration:\n- By default, the Docker environment creates a **MySQL container** where all the questions and test cases are stored.\n- You can modify the database schema by editing the migration files located in `/config/db.js`.\n\n#### Accessing the Application:\nOnce the containers are running:\n- Open your browser.\n- Go to [http://localhost:3000](http://localhost:3000) to access the platform.\n\n### Admindashboard\n![Admin Dashboard](/images/admindashboard.png)\n\n## Database Schema\n\nThe MySQL database stores all the coding problems, test cases, and user solutions. Below is a high-level overview of the database schema:\n\n- questions: Stores the coding problems, including problem statement, difficulty level, and tags.\n- test_cases: Each question has associated test cases that validate the correctness of the submitted solution.\n- user_submissions: Stores user submissions and execution results, including status (pass/fail) and runtime.\n\n### Sending Email to Suitable Candidates\n![Sutitablecandidates](/images/sutitablecandidates.png)\n\n## Running Test Cases in Docker\n\nAll test cases are executed within Docker containers, ensuring that each solution runs in isolation. This prevents code conflicts and ensures a secure environment.\n\n1. **Docker Setup:**\n\n- Created a Docker network for communication between the MySQL container and the Python script container.\n- Built a Docker image to run the Python script (runtestcases.py) in an isolated environment.\n- Ensured that the Docker container for the Python script can communicate with the MySQL container.\n\n**Detailed Steps for Docker Network and Container Setup**\n\n**1. Create a Docker Network**\n\nWe created a Docker network to allow communication between containers, specifically between the MySQL container and the container running the Python script. This ensures that the containers can find each other using container names instead of IP addresses, which can change.\n\n\n**2. Connect Existing MySQL Container to the Network**\n\nIf you already have a MySQL container running, you need to connect it to the newly created network. This allows the container running the Python script to communicate with the MySQL database.\n\n**3. Dockerfile for the Python Script**\n\nWe created a Dockerfile to build an image for running the Python script **runtestcases.py**. The image includes Python and the required dependencies.\n\n## To run test cases:\n\n- When a user submits their solution, it is passed to a Docker container with a pre-configured environment.\n- The RunTestCases.py script is executed inside the container, where it fetches the relevant test cases from the MySQL database and runs them against the user's solution.\n- The result is sent back to the frontend, displaying whether the test cases passed or failed, along with execution details.\n\n## Example Flow:\n\n- User selects a question.\n- User writes and submits code.\n- Backend fetches the corresponding test cases from the database.\n- Code is run inside a Docker container.\n- Results are returned to the user, showing test case pass/fail status and execution time.\n\n## Technology Stack:\n\n- Backend: Node.js, Express.js\n- Frontend: HTML, CSS, JavaScript\n- Database: MySQL (for questions and test case storage)\n- Containerization: Docker, Docker Compose\n- Programming Languages Supported: Python(additional languages to be added)\n\n## Future Updates\n\nPlanned updates include:\n\n- Advanced Test Case Management: Allow users to create custom test cases.\n- Leaderboard Feature: Rank users based on their performance across various challenges.\n- Additional Language Support: Expanding support to include languages like Java, C++, and Ruby.\n- Improved Analytics: Provide users with detailed metrics on their performance, such as time complexity and memory usage.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansh-info%2Fincognito","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fansh-info%2Fincognito","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansh-info%2Fincognito/lists"}