1- # Microstream Client SDK
1+ # MicroStream Client SDK
22
33A lightweight client SDK for Microstream communication.
44
5+ Author: [ Arijit Banerjee] ( #author )
6+ License: [ MIT] ( ./LICENSE )
7+
8+ <!-- shields.io Badges -->
9+
10+ <!-- Websites / Links - Up / Down -->
11+
12+ [ ![ NPM Package Link] ( https://img.shields.io/website?url=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fmicrostream-client&style=for-the-badge&logo=npm&label=npm%20package&labelColor=%23232323 )] ( https://www.npmjs.com/package/microstream-client )   ;  ;
13+ [ ![ GitHub Repository Link] ( https://img.shields.io/website?url=https%3A%2F%2Fgithub.com%2Farijitcodes%2Fmicrostream-client&style=for-the-badge&logo=github&label=repository&labelColor=%23232323 )] ( https://github.com/arijitcodes/microstream-client )   ;  ;
14+
15+ <!-- NPM Badges -->
16+
17+ [ ![ NPM License] ( https://img.shields.io/npm/l/microstream-client?style=for-the-badge&logo=npm&labelColor=%23232323&color=%23404040 )] ( https://github.com/arijitcodes/microstream-client/blob/main/LICENSE.md )   ;
18+ [ ![ NPM Version] ( https://img.shields.io/npm/v/microstream-client?style=for-the-badge&logo=npm&labelColor=%23232323&color=%23404040 )] ( https://www.npmjs.com/package/microstream-client )   ;
19+ [ ![ npm collaborators] ( https://img.shields.io/npm/collaborators/microstream-client?style=for-the-badge&logo=npm&label=collaborators&labelColor=%23232323&color=%23404040 )] ( https://www.npmjs.com/package/microstream-client )   ;
20+ [ ![ npm type definitions] ( https://img.shields.io/npm/types/microstream-client?style=for-the-badge&logo=npm&labelColor=%23232323 )] ( https://www.npmjs.com/package/microstream-client )   ;
21+
22+ <!-- GitHub Badges -->
23+
24+ [ ![ GitHub License] ( https://img.shields.io/github/license/arijitcodes/microstream-client?style=for-the-badge&logo=github&labelColor=232323&color=404040 )] ( https://github.com/arijitcodes/microstream-client/blob/main/LICENSE )   ;
25+ [ ![ GitHub language count] ( https://img.shields.io/github/languages/count/arijitcodes/microstream-client?style=for-the-badge&logo=github&labelColor=%23232323&color=%23404040 )] ( https://github.com/arijitcodes/microstream-client )   ;
26+ [ ![ GitHub top language] ( https://img.shields.io/github/languages/top/arijitcodes/microstream-client?style=for-the-badge&logo=github&labelColor=%23232323 )] ( https://github.com/arijitcodes/microstream-client )   ;
27+ [ ![ GitHub last commit (branch)] ( https://img.shields.io/github/last-commit/arijitcodes/microstream-client/main?style=for-the-badge&logo=github&labelColor=%23232323 )] ( https://github.com/arijitcodes/microstream-client/commits/main )   ;
28+
29+ [ ![ GitHub contributors] ( https://img.shields.io/github/contributors/arijitcodes/microstream-client?style=for-the-badge&logo=github&labelColor=232323&color=404040 )] ( https://github.com/arijitcodes/microstream-client/graphs/contributors )   ;
30+ [ ![ GitHub pull requests] ( https://img.shields.io/github/issues-pr/arijitcodes/microstream-client?style=for-the-badge&logo=github&labelColor=232323&color=404040 )] ( https://github.com/arijitcodes/microstream-client/pulls )   ;
31+ [ ![ GitHub issues] ( https://img.shields.io/github/issues/arijitcodes/microstream-client?style=for-the-badge&logo=github&labelColor=232323&color=404040 )] ( https://github.com/arijitcodes/microstream-client/issues )   ;
32+ [ ![ GitHub repo size] ( https://img.shields.io/github/repo-size/arijitcodes/microstream-client?style=for-the-badge&logo=github&labelColor=232323&color=404040 )] ( https://github.com/arijitcodes/microstream-client )   ;
33+ [ ![ GitHub code size] ( https://img.shields.io/github/languages/code-size/arijitcodes/microstream-client?style=for-the-badge&logo=github&labelColor=232323&color=404040 )] ( https://github.com/arijitcodes/microstream-client )   ;
34+
35+ <!-- Others -->
36+
37+ [ ![ Semantic-Release Badge] ( https://img.shields.io/badge/semantic--release-e10079?style=for-the-badge&logo=semantic-release&labelColor=%23232323 )] ( https://github.com/semantic-release/semantic-release )   ;
38+ [ ![ Commitizen Friendly] ( https://img.shields.io/badge/commitizen-friendly-brightgreen?style=for-the-badge&labelColor=%23232323&color=brightGreen )] ( https://commitizen.github.io/cz-cli/ )   ;
39+ [ ![ Conventional Commits Badge] ( https://img.shields.io/badge/conventional_commits-404040?style=for-the-badge&logo=conventionalcommits&labelColor=%23232323&color=%23404040 )] ( https://www.conventionalcommits.org )   ;
40+
41+ <hr >
42+
43+ ## Table of Contents
44+
45+ - [ Features] ( #features )
46+ - [ Installation] ( #installation )
47+ - [ Usage] ( #usage )
48+ - [ Configuration Options] ( #configuration-options )
49+ - [ Log Levels] ( #log-levels )
50+ - [ Author] ( #author )
51+ - [ Contributing] ( #contributing )
52+ - [ License] ( #license )
53+
54+ <hr >
55+
56+ ## Features
57+
58+ - Real-time inter-service communication using WebSockets.
59+ - Synchronous request-response pattern without HTTP overhead.
60+ - Auto-discovery and connection management.
61+ - Configurable logging for better observability.
62+
63+ <hr >
64+
565## Installation
666
767``` bash
868npm install microstream-client
969```
1070
71+ <hr >
72+
1173## Usage
1274
1375``` typescript
@@ -30,20 +92,57 @@ const response = await client.sendRequest("jwt-service", "generate_jwt", {
3092console .log (" Received response:" , response );
3193```
3294
33- ### Configuration Options
95+ <hr >
96+
97+ ## Configuration Options
3498
35- #### MicrostreamClientOptions
99+ ### MicrostreamClientOptions
36100
37101- ` hubUrl ` : URL of the Microstream Hub.
38102- ` serviceName ` : Name of the service connecting to the hub.
39103- ` timeout ` : Timeout for requests in milliseconds (default: 5000).
40104- ` heartbeatInterval ` : Interval for sending heartbeats in milliseconds (default: 5000).
41105- ` logLevel ` : Log level for the client (default: "info").
42106
43- ### Log Levels
107+ <hr >
108+
109+ ## Log Levels
44110
45111- ` debug ` : Log everything (useful for development).
46- - ` info ` : Log only important events (useful for production) .
47- - ` warn ` : Log only warnings and errors.
112+ - ` info ` : Log info, warnings, and errors .
113+ - ` warn ` : Log warnings and errors.
48114- ` error ` : Log only errors.
49115- ` silent ` : Disable all logs.
116+
117+ <hr >
118+
119+ ## Author
120+
121+ Author: [ Arijit Banerjee] ( https://www.github.com/arijitcodes )
122+
123+ About: Full Stack Web Developer | Cyber Security Enthusiast | Actor
124+
125+ Social Media:   ;
126+ [ ![ Instagram] ( https://i.ibb.co/4t76vTc/insta-transparent-14px.png ) Instagram] ( https://www.instagram.com/arijit.codes )
127+   ;
128+ [ ![ Linkedin] ( https://i.stack.imgur.com/gVE0j.png ) LinkedIn] ( https://www.linkedin.com/in/arijitban )
129+   ;
130+ [ ![ GitHub] ( https://i.stack.imgur.com/tskMh.png ) GitHub] ( https://github.com/arijitcodes )
131+   ;
132+ [ ![ Website] ( https://i.ibb.co/wCV57xR/Internet-1.png ) Website] ( https://iamarijit.dev )
133+
134+ 135+
136+ <hr >
137+
138+ ## Contributing
139+
140+ We welcome contributions! Please see our [ CONTRIBUTING.md] ( ./CONTRIBUTING.md ) for guidelines on how to contribute to this project.
141+
142+ <hr >
143+
144+ ## License
145+
146+ This project is licensed under the MIT License. See the [ LICENSE] ( ./LICENSE ) file for details.
147+
148+ <hr >
0 commit comments