{"id":24367735,"url":"https://github.com/jmsmarcelo/github-user-activity-cpp","last_synced_at":"2026-05-26T12:33:21.635Z","repository":{"id":272517650,"uuid":"916605638","full_name":"jmsmarcelo/github-user-activity-cpp","owner":"jmsmarcelo","description":"Roadmap.sh Projects | GitHub API Client | C++","archived":false,"fork":false,"pushed_at":"2025-01-18T21:04:27.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-26T02:29:01.014Z","etag":null,"topics":["api-client","challenge","cpp","github-api","roadmap-project","roadmap-sh"],"latest_commit_sha":null,"homepage":"","language":"C++","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/jmsmarcelo.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-14T12:32:12.000Z","updated_at":"2025-08-02T12:48:25.000Z","dependencies_parsed_at":"2025-01-14T23:39:37.384Z","dependency_job_id":null,"html_url":"https://github.com/jmsmarcelo/github-user-activity-cpp","commit_stats":null,"previous_names":["jmsmarcelo/github-user-activity-cpp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jmsmarcelo/github-user-activity-cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmsmarcelo%2Fgithub-user-activity-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmsmarcelo%2Fgithub-user-activity-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmsmarcelo%2Fgithub-user-activity-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmsmarcelo%2Fgithub-user-activity-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmsmarcelo","download_url":"https://codeload.github.com/jmsmarcelo/github-user-activity-cpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmsmarcelo%2Fgithub-user-activity-cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33520690,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T03:12:49.672Z","status":"ssl_error","status_checked_at":"2026-05-26T03:12:47.976Z","response_time":63,"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-client","challenge","cpp","github-api","roadmap-project","roadmap-sh"],"created_at":"2025-01-19T02:05:01.337Z","updated_at":"2026-05-26T12:33:21.629Z","avatar_url":"https://github.com/jmsmarcelo.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub User Activity\n\nThis project is [my solution](https://roadmap.sh/projects/github-user-activity/solutions?u=66f7e663c45e253cb00d6b67) to the [GitHub User Activity](https://roadmap.sh/projects/github-user-activity) challenge by Roadmap.sh.\nIt demonstrates how to use C++ to build a simple and efficient command-line tool to fetch and display recent GitHub user activity.\n\n## 🧑‍💻 What did I learn from this project?\n\n - **Cross-platform compatibility:** I developed and tested the project to ensure it runs smoothly on both Windows and Unix-based systems (Linux/MacOS).\n - **API Communication:** I implemented requests to the GitHub API over HTTPS, exploring how to consume RESTful APIs and parsing JSON responses directly in C++.\n - **Use of standard libraries:**\n   - The project relies heavily on C++ standard libraries, minimizing external dependencies.\n   - The only external library used is OpenSSL, to handle secure HTTPS communication.\n\n## ⚙️ Technologies and Tools used\n\n- **Language:** C++\n- **CLI Structure:** Input/output handling\n- **API Client:** Request user activity from Github API\n- **HTTP Client:** Standard system library\n- **HTTPS Connection:** OpenSSL\n- **Development environment:** Compatible with Windows and Unix-based systems.\n\n## 🛠️ How to Run the Project\n\n### Prerequisites\n\n- For compile:\n  - **Windows**: MSVC (Visual Studio Developer Command Prompt)\n  - **Linux**: GCC (GNU Compiler Collection)\n  - [OpenSSL library](https://openssl-library.org/source/) installed\n\n- For run:\n  - Internet connection\n\n### Steps to Execute\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/jmsmarcelo/github-user-activity-cpp.git\n   cd github-user-activity-cpp\n   ```\n2. Compile the project:\n   ```bash\n   mkdir build\n   cd build\n\n   # Linux:\n   g++ -std=c++17 -o github-activity ../src/*.cpp -lssl -lcrypto -lpthread\n\n   # Windows (Visual Studio Developer Command Prompt):\n   cl /std:c++17 /EHsc /Fe:github-activity.exe ..\\src\\*.cpp /I\"path\\to\\OpenSSL\\include\" ws2_32.lib /link /LIBPATH:\"path\\to\\OpenSSL\\lib\" libssl.lib libcrypto.lib\n   ```\n3. Run the application:\n   ```bash\n   # Linux:\n   ./github-activity \u003cusername\u003e\n\n   # Windows:\n   .\\github-activity \u003cusername\u003e\n   ```\n\n## 📌 Usage\n```bash\n# Example:\ngithub-activity kamranahmedse\n# output:\n# - Pushed 2 commits to kamranahmedse/developer-roadmap\n# - Created a comment on an issue in kamranahmedse/developer-roadmap\n# - Closed a issue in kamranahmedse/developer-roadmap\n```\n\n## 📦 Project Structure\n```bash\ngithub-user-activity-cpp/\n├─ include/\n│  ├─ api_cli.hpp             # CLI API declarations to handle user commands and integrate with the service.\n│  ├─ ApiService.hpp          # Core logic for managing GitHub user activity data.\n│  ├─ ApiClient.hpp           # Interface for interacting with the GitHub API to fetch user activity.\n│  ├─ HttpClient.hpp          # Abstraction for HTTP communications, handling requests and responses.\n│  └─ HttpException.hpp       # Custom exceptions for handling HTTP-related errors gracefully.\n└─ src/\n   ├─ main.cpp                # Application entry point, initializes and runs the CLI.\n   ├─ api_cli.cpp             # Implementation of CLI commands, interfacing with the service layer.\n   ├─ ApiService.cpp          # Implementation of logic for processing and managing GitHub user activity.\n   ├─ ApiClient.cpp           # Implementation of interactions with the GitHub API.\n   ├─ HttpClient.cpp          # HTTP client logic for sending requests and parsing responses.\n   └─ HttpException.cpp       # Implementation of HTTP-specific exception handling.\n```\n## 🖼️ Screenshots\n![Screenshot Linux](https://github.com/user-attachments/assets/3d9fea3a-5ffd-452c-b68a-09aa43be53ab)\n\n## 📖 How to Contribute\n\nContributions are welcome!\n\nTo contribute:\n1. Fork the repository.\n2. Create a new branch:\n   ```bash\n   git checkout -b my-new-feature\n   ```\n3. Commit your changes:\n   ```bash\n   git commit -m \"add new feature\"\n   ```\n4. Push to the branch:\n   ```bash\n   git push origin my-new-feature\n   ```\n5. Open a Pull Request.\n\n## 📜 License\nThis project is licensed under the **MIT License**. See the [LICENSE](https://github.com/jmsmarcelo/github-user-activity-cpp/blob/main/LICENSE) file for details.\n\n## 🙋‍♂️ Author\nCreated by [Jose Marcelo](https://jmsmarcelo.github.io). Feel free to get in touch or explore more of my projects!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmsmarcelo%2Fgithub-user-activity-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmsmarcelo%2Fgithub-user-activity-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmsmarcelo%2Fgithub-user-activity-cpp/lists"}