{"id":47205455,"url":"https://github.com/dmitriitimoshenko/nmrih","last_synced_at":"2026-03-13T13:41:22.212Z","repository":{"id":283174866,"uuid":"944472337","full_name":"dmitriitimoshenko/nmrih","owner":"dmitriitimoshenko","description":"NMRiH Server by Krich","archived":false,"fork":false,"pushed_at":"2025-08-07T22:20:35.000Z","size":148,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-08T00:14:03.494Z","etag":null,"topics":["analytics","dashboard","metrics","nmrih","statistics"],"latest_commit_sha":null,"homepage":"https://rulat-bot.duckdns.org/","language":"Go","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/dmitriitimoshenko.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":"2025-03-07T12:04:13.000Z","updated_at":"2025-08-07T22:20:38.000Z","dependencies_parsed_at":"2025-05-10T19:28:15.456Z","dependency_job_id":"188d840f-3af8-4492-8c8a-3aa6ad3687ef","html_url":"https://github.com/dmitriitimoshenko/nmrih","commit_stats":null,"previous_names":["dmitriitimoshenko/nmrih"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/dmitriitimoshenko/nmrih","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriitimoshenko%2Fnmrih","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriitimoshenko%2Fnmrih/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriitimoshenko%2Fnmrih/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriitimoshenko%2Fnmrih/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmitriitimoshenko","download_url":"https://codeload.github.com/dmitriitimoshenko/nmrih/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriitimoshenko%2Fnmrih/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30467814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T11:00:43.441Z","status":"ssl_error","status_checked_at":"2026-03-13T11:00:23.173Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["analytics","dashboard","metrics","nmrih","statistics"],"created_at":"2026-03-13T13:41:22.008Z","updated_at":"2026-03-13T13:41:22.189Z","avatar_url":"https://github.com/dmitriitimoshenko.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NMRiH Server Dashboard\n\nThis repository hosts a multi-container project that provides a dashboard for monitoring your NMRiH server. The project comprises a backend for log parsing and CSV management (log_api), a responsive, dark-themed React frontend (log_frontend), and a Traefik reverse proxy for secure routing and HTTPS.\n\n## Project Structure\n\n```\nnmrih/\n├── docker-compose.yaml       # Orchestrates all Docker containers (log_api, log_frontend, traefik, etc.)\n├── log_api/                  # Backend API for log parsing and CSV file management\n│   ├── Dockerfile            # Dockerfile for building the log_api container\n│   └── internal/             # Source code for log parsing, CSV generation, etc.\n├── log_frontend/             # React-based dashboard application\n│   ├── public/\n│   │   └── index.html        # HTML template\n│   ├── src/\n│   │   ├── components/       # Reusable React components (e.g., TopTimeChart, CountryPieChart, PlayersInfo, Controls)\n│   │   ├── hooks/            # Custom hooks (e.g., useTopTimeChartData, useWindowDimensions)\n│   │   ├── App.js            # Main application component\n│   │   └── App.css           # Global styles (dark theme, responsive design)\n│   └── package.json          # Frontend dependencies and scripts\n└── traefik/                  # Traefik configuration and SSL certificate storage (acme.json)\n```\n\n## Features\n\n- **Backend API (log_api):**\n  - Parses server logs and saves data as CSV files.\n  - Provides various endpoints for retrieving:\n    - Top time-spent players\n    - Countries statistics (for the pie chart)\n    - Detailed player information (e.g., name, score, formatted session duration)\n  \n- **Responsive Frontend (log_frontend):**\n  - **Top Time-Spent Players:**  \n    Displays a bar chart of players sorted by their session durations.\n  - **Top Countries:**  \n    Shows a pie chart with connection percentages by country plus a legend.\n  - **Player Info:**  \n    Lists connected players with details such as score and duration, formatted (e.g., `50s`, `50m40s`, `24h59m59s`).\n  - **Controls:**  \n    Provides buttons for refreshing data and copying the server address to the clipboard (with temporary \"Copied!\" feedback).\n  - Uses a dark theme and adapts its layout based on the device (horizontal on PC, vertical on mobile).\n\n- **Traefik Reverse Proxy:**\n  - Provides secure HTTPS support and manages SSL certificates.\n  - Routes requests to the appropriate containers (backend or frontend).\n\n- **Dockerized Environment:**\n  - Easily build and run the complete project using Docker Compose.\n\n## Installation\n\n### Prerequisites\n- Docker and Docker Compose must be installed on your system.\n\n### Steps\n\n1. **Clone the Repository:**\n   ```bash\n   git clone \u003crepository_url\u003e\n   cd nmrih\n   ```\n\n2. **Prepare Traefik Certificate Storage:**\n   ```bash\n   mkdir -p traefik/acme\n   touch traefik/acme/acme.json\n   chmod 600 traefik/acme/acme.json\n   ```\n   __Don't forget to change Traefik configurations in `traefik.yaml` and in `docker-compose.yaml` !__\n\n3. **Build and Start Containers:**\n   ```bash\n   make docker-re-run\n   ```\n\n## Usage\n\n- **Access the Dashboard:**  \n  Open your browser and navigate to the configured domain (e.g., `https://rulat-bot.duckdns.org`) or use the mapped localhost ports (it should be additionally configured).\n\n- **Dashboard Features:**\n  - **Top Time-Spent Players:**  \n    View a bar chart that details players’ session durations.\n  - **Top Countries:**  \n    See a pie chart reflecting connection percentages by country.\n  - **Player Info:**  \n    Inspect the list of connected players along with their score and session duration.\n  - **Online Statistics:**  \n    Allows to get insights about what is an average count of concurrent sessions at any hour in a day.\n  - **Controls:**  \n    Refresh the data or copy the server address using the provided buttons.\n\n## Customization\n\n- **API Endpoints:**  \n  Adjust the API URLs in the frontend source code (`log_frontend/src/App.js` and related components) if your backend endpoints or proxy settings change.\n- **Styling:**  \n  Modify the dark theme and responsive layout via `log_frontend/src/App.css`.\n- **Extending Functionality:**  \n  Add new components (e.g., additional charts or logs) in the `components/` directory of the frontend.\n\n## Contributing\n\nContributions, issues, and feature requests are welcome!  \nPlease check the [Issues](https://github.com/dmitriitimoshenko/nmrih/issues) page or submit a pull request.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## Contact\n\nFor questions or further assistance, please contact via:\n- Email: [dmitrii.timoshenko16@gmail.com](mailto:dmitrii.timoshenko16@gmail.com).\n- Telegram: [@Kritcz](https://t.me/Kritcz)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitriitimoshenko%2Fnmrih","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmitriitimoshenko%2Fnmrih","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitriitimoshenko%2Fnmrih/lists"}