{"id":26678322,"url":"https://github.com/telexintegrations/hngx-stage3-build-telex-integrations","last_synced_at":"2025-03-26T05:15:27.829Z","repository":{"id":278898392,"uuid":"937105491","full_name":"telexintegrations/hngx-stage3-build-telex-integrations","owner":"telexintegrations","description":"A Disk Space Monitoring Integration built for the Telex Web App","archived":false,"fork":false,"pushed_at":"2025-02-22T11:37:40.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-22T12:24:15.212Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/telexintegrations.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}},"created_at":"2025-02-22T10:53:36.000Z","updated_at":"2025-02-22T11:37:43.000Z","dependencies_parsed_at":"2025-02-22T12:24:34.034Z","dependency_job_id":"4116741c-dbe9-4d36-b6b8-ffa9e28e1930","html_url":"https://github.com/telexintegrations/hngx-stage3-build-telex-integrations","commit_stats":null,"previous_names":["telexintegrations/hngx-stage3-build-telex-integrations"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telexintegrations%2Fhngx-stage3-build-telex-integrations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telexintegrations%2Fhngx-stage3-build-telex-integrations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telexintegrations%2Fhngx-stage3-build-telex-integrations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telexintegrations%2Fhngx-stage3-build-telex-integrations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/telexintegrations","download_url":"https://codeload.github.com/telexintegrations/hngx-stage3-build-telex-integrations/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245591532,"owners_count":20640692,"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":[],"created_at":"2025-03-26T05:15:27.223Z","updated_at":"2025-03-26T05:15:27.802Z","avatar_url":"https://github.com/telexintegrations.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telex System Integration - Disk Space Monitoring\n\n![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript\u0026logoColor=white)\n![Express](https://img.shields.io/badge/Express-000000?logo=express\u0026logoColor=white)\n![Vercel](https://img.shields.io/badge/Vercel-000000?logo=vercel\u0026logoColor=white)\n\nA robust system integration solution for monitoring and managing infrastructure metrics through RESTful APIs.\n\n## 📋 Table of Contents\n- [Features](#-features)\n- [Technologies](#-technologies)\n- [Installation](#-installation)\n- [Project Structure](#-project-structure)\n- [API Endpoints](#-api-endpoints)\n- [Deployment](#-deployment)\n- [Testing](#-testing)\n- [License](#-license)\n\n## 🚀 Features\n- Real-time system monitoring via [/tick](#tick-endpoint) endpoint\n- Type-safe TypeScript implementation\n- Automated build pipeline with Vercel\n- Comprehensive input validation\n- Error handling middleware\n\n## 💻 Technologies\n- **TypeScript** (v4.9+)\n- **Express** (v4.18+)\n- **Vercel** Serverless Functions\n- **Jest** (Testing Framework)\n- **diskusage** (v1.1+)\n\n## 📥 Installation\n```bash\n# Clone repository\ngit clone https://github.com/your-username/hngx-stage3-build-telex-integrations.git\n\n# Install dependencies\nnpm install\n\n# Build project\nnpm run build\n\n# Start development server\nnpm run dev\n\n# Run production build\nnpm start\n```\n\n## 📁 Project Structure\n```\nhngx-stage3-build-telex-integrations/\n├── .vercel/            # Vercel deployment configuration\n├── dist/               # Compiled JavaScript output\n├── node_modules/       # NPM dependencies\n├── src/\n│   ├── app.ts          # Main application entry point\n│   └── integrationSpec.ts  # Integration tests\n├── .gitignore          # Version control exclusion rules\n├── package.json        # Project metadata and dependencies\n├── package-lock.json   # Exact dependency tree\n├── tsconfig.json       # TypeScript configuration\n└── vercel.json         # Vercel deployment rules\n```\n\n## 🌐 API Endpoints\n\n### POST /tick\n**Trigger System Monitoring Check**\n```http\nPOST https://https://hngx-stage3-build-telex-integrations.vercel.app/tick\nContent-Type: application/json\n\n{\n  \"system_id\": \"SRV-001\",\n  \"metrics\": {\n    \"cpu_load\": 0.75,\n    \"memory_usage\": 65.2\n  }\n}\n```\n\n**Success Response:**\n```json\n{\n  \"status\": \"success\",\n  \"message\": \"Data received and processed\"\n}\n```\n\n**Error Handling:**\n```json\n{\n  \"status\": \"error\",\n  \"code\": 400,\n  \"message\": \"Invalid format\"\n}\n```\n\n```json\n{\n  \"status\": \"error\",\n  \"code\": 400,\n  \"message\": \"Missing fields\"\n}\n```\n\n## 🚀 Deployment\n\n### Vercel Configuration\n1. Install Vercel CLI:\n   ```bash\n   npm install -g vercel\n   ```\n2. Deploy:\n   ```bash\n   vercel deploy --prod\n   ```\n\n## 🧪 Testing\n```bash\n# Run integration tests\nnpm test\n\n# Manual test with curl\ncurl -X POST http://localhost:3000/tick \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"system_id\":\"TEST-001\",\"metrics\":{\"cpu_load\":0.5}}'\n\n# Load testing (install artillery first)\nnpx artillery run load-test.yml\n```\n\n**Sample Test Case** (`integrationSpec.ts`):\n```typescript\ndescribe('POST /tick', () =\u003e {\n  it('should validate metric inputs', async () =\u003e {\n    const response = await request(app)\n      .post('/tick')\n      .send({ invalid_payload: true });\n    \n    expect(response.statusCode).toBe(400);\n  });\n});\n```\n\n## 📜 License\nMIT License \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelexintegrations%2Fhngx-stage3-build-telex-integrations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftelexintegrations%2Fhngx-stage3-build-telex-integrations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelexintegrations%2Fhngx-stage3-build-telex-integrations/lists"}