{"id":14156267,"url":"https://github.com/oslabs-beta/DataDoc","last_synced_at":"2025-08-06T02:32:48.385Z","repository":{"id":64798212,"uuid":"576414048","full_name":"oslabs-beta/DataDoc","owner":"oslabs-beta","description":"Endpoint downtime detection, monitoring, and traffic simulation developer tool","archived":false,"fork":false,"pushed_at":"2023-01-27T20:50:18.000Z","size":3606,"stargazers_count":65,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2024-12-05T04:30:46.593Z","etag":null,"topics":["data-observability","devtool","express-js","monitoring-tool","traffic-simulation"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/oslabs-beta.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}},"created_at":"2022-12-09T19:51:18.000Z","updated_at":"2024-11-21T11:13:59.000Z","dependencies_parsed_at":"2023-02-14T01:45:32.656Z","dependency_job_id":null,"html_url":"https://github.com/oslabs-beta/DataDoc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oslabs-beta%2FDataDoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oslabs-beta%2FDataDoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oslabs-beta%2FDataDoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oslabs-beta%2FDataDoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oslabs-beta","download_url":"https://codeload.github.com/oslabs-beta/DataDoc/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228829129,"owners_count":17978158,"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":["data-observability","devtool","express-js","monitoring-tool","traffic-simulation"],"created_at":"2024-08-17T08:05:20.335Z","updated_at":"2024-12-09T03:31:23.880Z","avatar_url":"https://github.com/oslabs-beta.png","language":"JavaScript","readme":"# DataDoc\n\nDataDoc is an endpoint monitoring, detection and traffic simulation tool that provides real-time metrics and customizable alert notifications.\n\n\u003cimg src=\"./examples/intro.png\" align=\"center\"/\u003e\n\n### Table of Contents\n   * [Getting Started](#getting-started)\n        * [Prerequisites](#prerequisites)\n        * [Installation](#installation)\n   * [How To Use](#how-to-use)\n        * [Adding Workspaces](#adding-workspaces)\n        * [Using the Monitoring Tool](#using-the-monitoring-tool)\n        * [Using the Simulation Tool](#using-the-simulation-tool)\n        * [Configuring Alerts](#configuring-alerts)\n   * [Tech Stack](#tech-stack)\n   * [Authors](#authors)\n\n## Getting Started \u003ca name=\"getting-started\"\u003e\u003c/a\u003e\n\n### Prerequisites \u003ca name=\"prerequisites\"\u003e\u003c/a\u003e\n\n- Node.js v18^\n- Docker\n\n### Installation \u003ca name=\"installation\"\u003e\u003c/a\u003e\n\nThis tool requires the npm package `express-endpoints-monitor` to detect and gather metrics for endpoints in your Express application. To understand how to use this plugin, see the \u003ca href=\"https://www.npmjs.com/package/express-endpoints-monitor\"\u003efull documentation\u003c/a\u003e.\n\n1. Run the following terminal command in your project directory that you would like to begin monitoring:\n\n    ```\n    npm install express-endpoints-monitor\n    ```\n\n    This should have created a `express-endpoints-monitor/` folder in your `node_modules/` directory\n\n2. WIP: \u003ca href=\"https://github.com/oslabs-beta/DataDoc/archive/refs/heads/dev.zip\"\u003eClone this repository\u003c/a\u003e. Unzip the file in a separate folder and open a terminal in this directory. Run the following commands:\n\n    ```\n    npm install\n    npm run build\n    ```\n\n    This will install the needed dependences and build the desktop application.\n\n### Exposing Endpoints to the Monitoring Tool\n\n1. Open your Express application file in a text editor. At the top of the file, import the plugin by adding:\n\n    ```\n    const expMonitor = require(\"express-endpoints-monitor\");\n    ```\n\n    This module comes with several functions to register endpoints with the monitoring application and begin log requests made to those endpoints.\n\n2. In your file, include the following line:\n\n    ```\n    app.use(expMonitor.gatherMetrics);\n    ```\n\n    This will record metrics for incoming requests and make them available to the metrics API which will be set up later.\n\n3. Under an endpoint that you would like to begin monitoring, include the `expMonitor.registerEndpoint` middleware. For example, this may look like:\n\n    ```\n    app.get(...,\n      expMonitor.registerEndpoint,\n      ...\n    );\n    ```\n\n    The order of this function in the middleware chain is not important. This middleware will stage this particular endpoint for exporting, and can be used in multiple endpoints.\n\n4. Once all desired endpoints have been registered, they must be exported on the metrics server. In your `app.listen` declaration, add these lines to the passed-in callback function:\n\n    ```\n    app.listen(..., function callback() {\n      ...\n      expMonitor.exportEndpoints();\n      startMetricsServer(\u003cMETRICS_SERVER_PORT\u003e)\n    )\n    ```\n\n    This will start up a metrics server on `METRICS_SERVER_PORT`. If this argument is not specified, it will resolve to `9991`. The server includes several endpoints, one of which is `GET /endpoints` which responds with the list of registered endpoints in JSON format.\n\n    Alternatively, if you would like to export all endpoints, you may replace the above snippet with the `exportAllEndpoints` function: \n    \n      ```\n      app.listen(..., function callback() {\n        ...\n        expMonitor.exportAllEndpoints();\n        startMetricsServer(\u003cMETRICS_SERVER_PORT\u003e)\n      )\n      ```\n\n    This will expose all endpoints regardless of whether they include the `registerEndpoint` middleware.\n\n5. Your application is ready to start monitoring! To verify your setup, use a browser or API testing tool to interact with the metrics API started at `http://localhost:\u003cMETRICS_SERVER_PORT\u003e`. The list of available endpoints is:\n\n    - `GET /endpoints`\n    - `GET /metrics`\n    - `DELETE /metrics`\n\n6. To see the full use of the library, see the \u003ca href=\"https://www.npmjs.com/package/express-endpoints-monitor\"\u003enpm page\u003c/a\u003e.\n\n### Initializing Databases\n\n  In your local `DataDoc` folder, run the following command:\n\n  ```\n  docker compose up\n  ```\n\n  The `-d` flag may be supplied to detach the instance from the terminal.\n\n### Starting the Desktop Application\n\n1. In your local `DataDoc` folder, run the following command if you haven't during the installation steps:\n\n    ```\n    npm build\n    ```\n\n    This command only needs to be run once.\n\n2. WIP: In the same folder, run the following command to start the desktop application:\n\n    ```\n    npm start\n    ```\n## How to Use \u003ca name=\"how-to-use\"\u003e\u003c/a\u003e\n    \n### Adding Workspaces \u003ca name=\"adding-workspaces\"\u003e\u003c/a\u003e\n\n### Using the Monitoring Tool \u003ca name=\"using-the-monitoring-tool\"\u003e\u003c/a\u003e\n\n### Using the Simulation Tool \u003ca name=\"using-the-simulation-tool\"\u003e\u003c/a\u003e\n\n### Configuring Alerts \u003ca name=\"configuring-alerts\"\u003e\u003c/a\u003e\n\n## Tech Stack \u003ca name=\"tech-stack\"\u003e\u003c/a\u003e\n\u003cimg src=\"./assets/electron-logo-color.png\" alt=\"Electron\" title=\"Electron\" align=\"center\" height=\"30\" /\u003e\n\n\u003cimg src=\"./assets/react-logo-color.png\" alt=\"React\" title=\"React\" align=\"center\" height=\"30\" /\u003e\n\n\u003cimg src=\"./assets/material-ui-logo-color.png\" alt=\"MaterialUI\" title=\"MaterialUI\" align=\"center\" height=\"30\" /\u003e\n\n\u003cimg src=\"./assets/chartjs-logo-color.png\" alt=\"MaterialUI\" title=\"MaterialUI\" align=\"center\" height=\"30\" /\u003e\n\n\u003cimg src=\"./assets/express-logo-color.png\" alt=\"Express\" title=\"Express\" align=\"center\" height=\"30\" /\u003e\n\n\u003cimg src=\"./assets/node-logo-color.png\" alt=\"Node.js\" title=\"Node.js\" align=\"center\" height=\"30\" /\u003e\n\n\u003cimg src=\"./assets/npm-logo-color.png\" alt=\"npm\" title=\"npm\" align=\"center\" height=\"30\" /\u003e\n\n\u003cimg src=\"./assets/postgres-logo-color.png\" alt=\"Postgres\" title=\"Postgres\" align=\"center\" height=\"30\" /\u003e\n\n\u003cimg src=\"./assets/influxdb-logo-color.png\" alt=\"InfluxDB\" title=\"InfluxDB\" align=\"center\" height=\"30\" /\u003e\n\n\u003cimg src=\"./assets/twilio-logo-color.png\" alt=\"Twilio\" title=\"Twilio\" align=\"center\" height=\"30\" /\u003e\n\n\u003cimg src=\"./assets/docker-logo-color.png\" alt=\"Docker\" title=\"Docker\" align=\"center\" height=\"30\" /\u003e\n\n\u003cimg src=\"./assets/webpack-logo-color.png\" alt=\"Webpack\" title=\"Webpack\" align=\"center\" height=\"30\" /\u003e\n\n## Authors \u003ca name=\"authors\"\u003e\u003c/a\u003e\n\n- Jo Huang \u003ca href=\"https://www.linkedin.com/in/johuangx/\"\u003eLinkedIn\u003c/a\u003e | \u003ca href=\"https://github.com/JH51\"\u003eGitHub\u003c/a\u003e\n- Jonathan Huang \u003ca href=\"https://www.linkedin.com/in/jh5/\"\u003eLinkedIn\u003c/a\u003e | \u003ca href=\"https://github.com/jochuang\"\u003eGitHub\u003c/a\u003e\n- Jamie Schiff \u003ca href=\"https://www.linkedin.com/in/jamie-schiff/\"\u003eLinkedIn\u003c/a\u003e | \u003ca href=\"https://github.com/jamieschiff\"\u003eGitHub\u003c/a\u003e\n- Mariam Zakariadze \u003ca href=\"https://www.linkedin.com/in/mariam-zakariadze-701573120/\"\u003eLinkedIn | \u003ca href=\"https://github.com/mariamzakariadze\"\u003eGitHub\u003c/a\u003e\n","funding_links":[],"categories":["others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foslabs-beta%2FDataDoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foslabs-beta%2FDataDoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foslabs-beta%2FDataDoc/lists"}