{"id":39454043,"url":"https://github.com/rohitroy-github/project-c2-engine","last_synced_at":"2026-01-18T04:32:54.745Z","repository":{"id":300013184,"uuid":"1004904601","full_name":"rohitroy-github/project-c2-engine","owner":"rohitroy-github","description":"A real-time crypto trading simulation where users register, trade mock assets, track live price charts, and climb the leaderboard based on PNL.","archived":false,"fork":false,"pushed_at":"2025-09-09T05:12:43.000Z","size":3150,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-01T03:49:07.110Z","etag":null,"topics":["api","blockchain","ethersjs","socket-io","tailwindcss","trading","vitejs"],"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/rohitroy-github.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-19T11:07:34.000Z","updated_at":"2025-08-03T10:04:57.000Z","dependencies_parsed_at":"2025-07-09T05:34:58.874Z","dependency_job_id":"9d11610c-0b0e-4395-aa5d-7fe532c5e971","html_url":"https://github.com/rohitroy-github/project-c2-engine","commit_stats":null,"previous_names":["rohitroy-github/trading-simulator-app","rohitroy-github/project-c2-engine"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rohitroy-github/project-c2-engine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitroy-github%2Fproject-c2-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitroy-github%2Fproject-c2-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitroy-github%2Fproject-c2-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitroy-github%2Fproject-c2-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rohitroy-github","download_url":"https://codeload.github.com/rohitroy-github/project-c2-engine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitroy-github%2Fproject-c2-engine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28529717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","blockchain","ethersjs","socket-io","tailwindcss","trading","vitejs"],"created_at":"2026-01-18T04:32:54.660Z","updated_at":"2026-01-18T04:32:54.732Z","avatar_url":"https://github.com/rohitroy-github.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project C2-Engine\n\nA web-based application that simulates real-time cryptocurrency trading. Users can register, view live asset prices, perform trades, track performance, and compete on a live leaderboard — all in a fast, dynamic market environment.\n\n---\n\n## Overview\n\nEach user starts with a virtual balance of **₹10,000 INR**. The platform simulates asset price volatility and allows users to:\n\n- Buy/sell mock crypto assets\n- Monitor price changes in real-time\n- Track both realized and unrealized profits and losses\n- View a ranked leaderboard\n- Analyze price trends using live charts\n\n---\n\n## Features\n\n### User Management\n- Register using a unique `username`\n- Optional fields: `name`, `wallet address`, `age`\n- Each new user is initialized with ₹10,000\n\n### Market Simulation\n- Asset prices update every **500ms**\n- Volatility introduced using randomized logic\n- Supported mock assets:\n  - `ETH_SUB1`\n  - `ETH_SUB2`\n  - `ETH_SUB3`\n\n### Trading System\n- Buy and sell assets using virtual INR\n- Dynamic trade quantity based on live price\n- Holdings maintain `quantity` and `cost basis`\n- Profit and Loss (PnL):\n  - **Realized PnL**: Based on completed trades\n  - **Unrealized PnL**: Based on current asset value\n\n### Leaderboard\n- Displays all users sorted by total PnL\n- Shows breakdown of:\n  - Username\n  - Total PnL\n  - Realized and Unrealized PnL\n\n### Live Price Charting\n- Charts update in real-time via WebSocket\n- Built using `recharts` and live market data\n- One chart per asset showing price history\n\n---\n\n## Tech Stack\n\n## Tech Stack\n\n| Layer        | Technology                          |\n|--------------|--------------------------------------|\n| Frontend     | React, Tailwind CSS, Axios           |\n| Backend      | Express.js, Socket.io                |\n| Charting     | Recharts (for price history)         |\n| Logging      | Separate Express log server          |\n| Mock Assets  | Defined in `assets.js`               |\n| State Mgmt   | React Hooks, React Context API       |\n\n\n---\n\n## Local Installation\n\n- To run the **market server**, run:\n```\ncd server\nnpm install\nnpm run market\n```\n- To run the **frontend application**, run:\n```\ncd client\nnpm install\nnpm run app\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohitroy-github%2Fproject-c2-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frohitroy-github%2Fproject-c2-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohitroy-github%2Fproject-c2-engine/lists"}