Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

25 Commits

Folders and files

Repository files navigation

πŸš€ StreamClient

Live Demo GitHub

StreamClient is a production-grade, full-stack API testing and workflow platform built for speed, scalability, and an optimized developer experience. Deployed on GCP with Docker and serving developers worldwide.

πŸ”— Live Demo: streamclient.devsvarun.com


🌐 Production Deployment

StreamClient is deployed on Google Cloud Platform with enterprise-grade infrastructure:

  • 🐳 Docker Containerization: Multi-stage builds for optimized image sizes and security
  • πŸ”’ SSL/TLS Encryption: Nginx reverse proxy with Let's Encrypt certificates
  • ⚑ Load Balancing: Nginx configured for high-performance request routing
  • πŸ”„ Zero-Downtime Deployments: Blue-green deployment strategy with health checks
  • πŸ“Š Monitoring: Application and infrastructure metrics tracking
  • πŸ›‘οΈ Security Hardening: Rate limiting, CORS policies, and security headers

Infrastructure Stack

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   streamclient.devsvarun.com        β”‚
β”‚   (SSL/TLS Certificate)             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚  Nginx Proxy   β”‚  Port 443/80
        β”‚  (SSL, CORS,   β”‚
        β”‚   Rate Limit)  β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚                       β”‚
β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
β”‚ Docker β”‚          β”‚    Docker    β”‚
β”‚  Web   │◄────────►│    Proxy     β”‚
β”‚ (3000) β”‚          β”‚    (5000)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ— Architecture Overview

The project uses NPM Workspaces to manage multiple interdependent packages in a single repository, enabling atomic commits, shared dependencies, and seamless frontend-backend integration.

streamclient/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ web/
β”‚   β”‚   β”œβ”€β”€ src/            βš›οΈ React Frontend Application
β”‚   β”‚   β”œβ”€β”€ Dockerfile      🐳 Web container config
β”‚   β”‚   └── package.json
β”‚   └── proxy/
β”‚       β”œβ”€β”€ src/            πŸ›‘οΈ Express.js API Gateway
β”‚       β”œβ”€β”€ Dockerfile      🐳 Proxy container config
β”‚       └── package.json
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ ui/                 🎨 Shared Design System (Tailwind CSS)
β”‚   └── types/              πŸ“ Shared TypeScript Types
β”œβ”€β”€ docker-compose.yml      🐳 Multi-container orchestration
└── nginx/
    └── nginx.conf          πŸ”§ Production proxy configuration

πŸš€ Key Features

Application Features

  • Professional API Testing: Send HTTP requests with full header, body, and query parameter support
  • Real-time Response Inspection: Syntax-highlighted JSON viewer with formatting
  • Request History: Persistent storage of previous requests for quick replay
  • Endpoint Management: Save and organize frequently-used API endpoints
  • Advanced JSON Editor: CodeMirror 6 integration with validation and auto-formatting

Technical Features

  • Monorepo Structure: Centralized workflow with cross-package dependency management
  • Decoupled UI Library: @stream/ui ensures consistent design across apps
  • Parallel Execution: Run frontend and backend simultaneously using concurrently
  • Type Safety: Shared TypeScript configurations across all packages
  • Production-Ready: Dockerized with SSL, monitoring, and security best practices

πŸ›  Tech Stack

Layer Technology
Frontend βš›οΈ React 18, Vite, Tailwind CSS
Backend 🟒 Node.js, Express
Code Editor πŸ“ CodeMirror 6
Tooling πŸ“¦ NPM Workspaces, TypeScript, Concurrently
Shared Packages 🎨 UI Library, πŸ“ TypeScript Types
Infrastructure 🐳 Docker, Nginx, GCP, Let's Encrypt

✨ Recent Improvements & Fixes

🎨 UI & UX Upgrades

  • Professional JSON Editor
    Replaced basic <textarea> with CodeMirror 6 for line numbers, syntax highlighting, and auto-closing brackets.

  • Real-time Validation
    Highlighting invalid JSON instantly with red borders and floating error messages.

  • Smart Formatter
    Beautifies JSON safely without crashing on non-standard formatting.

  • Request Bar Refinement
    Fixed method selector layout overflow while keeping a clean focus ring.

  • Non-Intrusive Notifications
    Replaced blocking alerts with a subtle notification system.


⌨️ Developer Experience (DX)

Global Shortcuts & Keybindings

Request & App

  • Ctrl + Enter β†’ Send Request
  • Ctrl + M β†’ Cycle Methods
  • Ctrl + Shift + F β†’ Focus Mode
  • Ctrl + S β†’ Save Response
  • Ctrl + H β†’ Toggle History
  • Ctrl + / β†’ Toggle Help

Navigation & Tabs

  • Ctrl + L β†’ Focus URL Bar
  • Ctrl + 1 β†’ Switch to Headers
  • Ctrl + 2 β†’ Switch to Body
  • Esc β†’ Close Modals

Editors & Cleanup

  • Ctrl + Shift + H β†’ Add Header Row

  • Ctrl + Shift + X β†’ Remove Header

  • Ctrl + Shift + \ β†’ Clear All Headers

  • Ctrl + Backspace β†’ Clear Response

  • Ctrl + Shift + Backspace β†’ Hard Reset

  • Improved JSON Handling
    Editor validates and formats JSON bodies efficiently (note: comment support inside body editor is not available).


πŸ›  System & Infrastructure Fixes

  • Monorepo Dependency Management
    Fixed workspace build errors by ensuring correct dependency installation.

  • TypeScript Strictness
    Resolved implicit any errors and removed unused imports.

  • Disk Recovery (GCP)
    Cleared disk exhaustion issues via Docker system prune and log vacuum.

  • Environment Restoration
    Restored Node.js and npm using NVM after disk corruption.

  • Production Hardening
    Implemented rate limiting, security headers, and optimized Docker builds.


🚦 Getting Started

Prerequisites

  • Node.js v18+
  • npm v7+

Local Development

  1. Clone the repository
git clone https://github.com/devsvarun/streamclient.git
cd streamclient
  1. Install dependencies
npm install
  1. Start development servers
npm run dev

This will start:

  • Frontend (Vite): http://localhost:3000
  • Backend (Express): http://localhost:5000

Docker Deployment

  1. Build images
docker-compose build
  1. Run containers
docker-compose up -d
  1. View logs
docker-compose logs -f

Production Deployment (GCP)

# Build and deploy using docker-compose
docker-compose up -d --build

# Or build individual services
docker-compose build web
docker-compose build proxy

# View running containers
docker-compose ps

# View logs
docker-compose logs -f web
docker-compose logs -f proxy

# Stop services
docker-compose down

πŸ“ Project Structure

streamclient/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ web/                    # React frontend application
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ components/     # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ hooks/          # Custom React hooks
β”‚   β”‚   β”‚   β”œβ”€β”€ stores/         # State management
β”‚   β”‚   β”‚   └── utils/          # Utility functions
β”‚   β”‚   β”œβ”€β”€ Dockerfile          # Web container configuration                     
β”‚   |   └── nginx.conf           # Nginx configuration
β”‚   β”‚   └── vite.config.ts
β”‚   └── proxy/                  # Express backend server
β”‚       β”œβ”€β”€ server.js           # Proxy container configuration
β”‚       β”œβ”€β”€ Dockerfile          
β”‚       └── package.json
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ ui/                     # Shared UI component library
β”‚   β”‚   β”œβ”€β”€ src/                # Reusable components
β”‚   β”‚   └── package.json
β”‚   └── types/                  # Shared TypeScript type definitions
β”‚       β”œβ”€β”€ index.ts
β”‚       └── package.json
β”œβ”€β”€ docker-compose.yml          # Multi-container orchestration
└── package.json                # Root package.json

πŸ§ͺ Testing

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Run linting
npm run lint

πŸ’‘ Tips & Best Practices

  • Use VS Code with Tailwind CSS and TypeScript extensions
  • Prefer workspace-scoped npm commands (npm run dev -w web)
  • Hot reload for both server and client is handled via concurrently
  • Always validate JSON before sending requests using Ctrl + Shift + F
  • Use keyboard shortcuts to maximize productivity

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘€ Author

Varun Sharma


πŸ™ Acknowledgments

Built with modern technologies and deployed with enterprise-grade infrastructure to serve the developer community.


⭐ Star this repo if you find it useful!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages