|
| 1 | +--- |
| 2 | +layout: home |
| 3 | + |
| 4 | +hero: |
| 5 | + name: "Backend Rebase" |
| 6 | + text: "Distributed Systems & Backend Services" |
| 7 | + tagline: "A comprehensive backend project featuring distributed systems, microservices, and data structures implementations" |
| 8 | + |
| 9 | + actions: |
| 10 | + - theme: brand |
| 11 | + text: View on GitHub |
| 12 | + link: https://github.com/yedidyar/backend-rebase |
| 13 | + |
| 14 | +features: |
| 15 | + - icon: 🌐 |
| 16 | + title: Distributed System |
| 17 | + details: Complete distributed blob storage system with load balancer, cache proxy, and multiple HTTP blob servers with consistent hashing |
| 18 | + - icon: 📊 |
| 19 | + title: Analytics Platform |
| 20 | + details: Real-time analytics service with PostgreSQL integration, page view tracking, and materialized views for reporting |
| 21 | + - icon: 👥 |
| 22 | + title: User Management |
| 23 | + details: Fastify-based user service with PostgreSQL, soft deletes, and comprehensive logging with Logzio integration |
| 24 | + - icon: 🚀 |
| 25 | + title: Microservices Architecture |
| 26 | + details: Multiple independent services with Docker containerization, service discovery, and automated deployment scripts |
| 27 | + - icon: 🔧 |
| 28 | + title: Data Structures |
| 29 | + details: Custom implementations of HashMap, LRU Cache, and large-scale sorting algorithms for educational purposes |
| 30 | + - icon: ⚡ |
| 31 | + title: Performance Optimized |
| 32 | + details: Async/await patterns, worker threads for CPU-intensive tasks, and efficient caching strategies |
| 33 | +--- |
| 34 | + |
| 35 | +## Quick Start |
| 36 | + |
| 37 | +Get up and running with the entire distributed system in just a few commands: |
| 38 | + |
| 39 | +```bash |
| 40 | +# Clone the repository |
| 41 | +git clone https://github.com/your-username/backend-rebase.git |
| 42 | +cd backend-rebase |
| 43 | + |
| 44 | +# Install dependencies |
| 45 | +pnpm install |
| 46 | + |
| 47 | +# Start all services |
| 48 | +chmod +x start-services.sh |
| 49 | +pnpm run malic:up |
| 50 | +``` |
| 51 | + |
| 52 | +## Architecture Overview |
| 53 | + |
| 54 | +The project consists of several independent services that work together: |
| 55 | + |
| 56 | +### 🌐 Distributed System Project |
| 57 | + |
| 58 | +- **Load Balancer**: Routes requests using consistent hashing |
| 59 | +- **HTTP Blob Server**: Stores and retrieves binary data with metadata |
| 60 | +- **Cache Proxy**: LRU cache implementation for improved performance |
| 61 | + |
| 62 | +### 📊 Analytics Project |
| 63 | + |
| 64 | +- **Analytics Service**: Tracks page views and user interactions |
| 65 | +- **Increments Service**: Handles real-time data increments |
| 66 | +- **PostgreSQL Integration**: With Flyway migrations and materialized views |
| 67 | + |
| 68 | +### 👥 User Service |
| 69 | + |
| 70 | +- **User Management**: CRUD operations with soft delete support |
| 71 | +- **PostgreSQL Database**: Connection pooling and transaction management |
| 72 | +- **Structured Logging**: Winston with Logzio integration |
| 73 | + |
| 74 | +## Key Features |
| 75 | + |
| 76 | +### 🔄 Service Discovery & Load Balancing |
| 77 | + |
| 78 | +The load balancer automatically discovers and routes traffic to available blob servers using MD5 hashing for consistent distribution. |
| 79 | + |
| 80 | +### 📈 Real-time Analytics |
| 81 | + |
| 82 | +Track page views with hourly granularity, featuring materialized views for efficient reporting and data aggregation. |
| 83 | + |
| 84 | +### 🗄️ Blob Storage System |
| 85 | + |
| 86 | +Store and retrieve binary data with custom metadata, featuring configurable storage limits and folder organization. |
| 87 | + |
| 88 | +### 🚀 Containerized Deployment |
| 89 | + |
| 90 | +Full Docker Compose setup with service orchestration, networking, and environment configuration. |
| 91 | + |
| 92 | +## Educational Components |
| 93 | + |
| 94 | +### 📚 Lesson 01: Data Structures |
| 95 | + |
| 96 | +- Custom HashMap implementation with collision handling |
| 97 | +- Large-scale external sorting algorithm using heap-based merge |
| 98 | +- Comprehensive test coverage with Vitest |
| 99 | + |
| 100 | +### 📚 Lesson 02: Concurrent Programming |
| 101 | + |
| 102 | +- Synchronous vs asynchronous prime number counting |
| 103 | +- Worker threads for CPU-intensive tasks |
| 104 | +- Performance benchmarking and optimization |
| 105 | + |
| 106 | +## Technology Stack |
| 107 | + |
| 108 | +- **Runtime**: Node.js v23+ with TypeScript |
| 109 | +- **Web Framework**: Fastify for high-performance APIs |
| 110 | +- **Database**: PostgreSQL with connection pooling |
| 111 | +- **Caching**: Custom LRU cache implementation |
| 112 | +- **Logging**: Winston with Logzio integration |
| 113 | +- **Testing**: Vitest for unit and integration tests |
| 114 | +- **Containerization**: Docker and Docker Compose |
| 115 | +- **Package Management**: pnpm for efficient dependency management |
| 116 | + |
| 117 | +<!-- Or dive into specific topics: |
| 118 | +
|
| 119 | +- [Distributed Systems](/distributed-system-project/README) |
| 120 | +- [Analytics Platform](/analytics-project/README) |
| 121 | +- [User Management](/user-service/README) |
| 122 | +- [Data Structures](/data-structures/README) --> |
0 commit comments