Skip to content
This repository was archived by the owner on Nov 16, 2024. It is now read-only.

s1nyx/flashpoint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FlashPoint πŸš€

A high-performance, production-ready HTTP server built with Node.js, designed for extreme scalability and minimal latency.

TypeScript Node.js Clean Architecture

✨ Features

  • πŸš„ Ultra-High Performance: Optimized for handling 100k+ requests per second
  • 🎯 Zero Dependencies: Pure Node.js implementation for maximum control and performance
  • πŸ”„ Automatic Load Balancing: Built-in clustering for optimal CPU utilization
  • πŸ’Ύ Smart Caching: Integrated response and route caching
  • πŸ›‘οΈ Type Safety: Written in TypeScript with strict type checking
  • πŸ—οΈ Clean Architecture: Domain-driven design with SOLID principles
  • πŸ”Œ Graceful Shutdown: Proper connection handling and cleanup

πŸš€ Performance Optimizations

  • Pre-allocated buffer pools for request bodies
  • Optimized TCP settings with Nagle's algorithm disabled
  • Connection pooling and keep-alive optimization
  • Route caching for faster lookups
  • Header caching using WeakMap
  • Minimal object allocation and GC pressure
  • CPU pinning for worker processes

πŸ“‹ Quick Start

import { NodeHttpServer } from "flashpoint";

const bootstrap = async () => {
    const server = new NodeHttpServer();
    
    server.get('/health', async (req, res) => {
        res.status(200).send({ status: 'healthy' });
    });

    await server.listen(3000);
};

bootstrap().catch(console.error);

πŸ—οΈ Architecture

FlashPoint follows Clean Architecture principles with clear separation of concerns:

src/
β”œβ”€β”€ core/ # Domain entities and business rules
β”œβ”€β”€ application/ # Use cases and application logic
β”œβ”€β”€ infrastructure/ # External interfaces (HTTP, Database)
└── shared/ # Shared utilities and errors

πŸ§ͺ Development

Test with autocannon

npx autocannon -c 100 -d 30 http://localhost:3000/health

Made with ❀️ for the high-performance Node.js community.

About

A WebService fully written in TypeScript. Main goal is performance.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published