A high-performance personal scheduling application built with SOLID principles featuring a C++ backend API server and React frontend. Optimized for enterprise-grade performance with comprehensive testing and benchmarking suite.
Production-Ready Performance Metrics:
- API Layer: 13,042 RPS (4,500x improvement from baseline)
- Model Layer: 20,000 events/second (50ms for 1000 events)
- Database: 185,000 inserts/second with SQLite
- Memory Usage: 11-37MB peak (highly efficient)
- Response Caching: Sub-millisecond cache hits
- Thread Pool: Hardware-optimized concurrency
Benchmarked on Apple Silicon with optimized builds
📊 View Performance Benchmark Results →
This project demonstrates enterprise-grade software design following SOLID principles:
EventService: Pure event operationsEventsHandler: HTTP request handling onlyRouter: Route matching and dispatchPerformanceMonitor: Metrics collection
- Extensible handler system via
IRequestHandler - Plugin-based notification and action system
- Configurable performance monitors
- Interface-based dependency injection
- Polymorphic event types (OneTime/Recurring)
- Substitutable calendar integrations
IEventServicefor clean business logicIPerformanceMonitorfor metricsIRequestHandlerfor HTTP handling
- Constructor injection throughout
- Abstract interfaces over concrete implementations
DependencyContainerfor IoC management
- SOLID-Compliant Architecture with dependency injection
- Ultra-High Performance API (13K+ RPS with optimizations)
- Advanced Caching System with TTL and cache metrics
- Thread Pool Architecture for concurrent processing
- Comprehensive Security (Auth, Rate Limiting, CORS)
- Zero-Copy Optimizations and fast serialization
- Production Monitoring with detailed performance metrics
- Extensive Unit Tests for all SOLID components
- Modern React UI with TypeScript and Tailwind CSS
- Multiple Calendar Views (Day, Week, Month)
- Interactive Event Management with recurring event support
- Real-time Dashboard with today's events and statistics
- 12-hour Time Display with proper formatting
- Responsive Design optimized for desktop and mobile
Comprehensive Test Suite:
- Unit Tests: EventService, Handlers, Router, Security
- Integration Tests: Full API and database testing
- Performance Tests: Benchmarking and load testing
- Security Tests: Auth, Rate Limiting, Input validation
# Run all unit tests
make unit-tests
# Run individual test suites
make event_service_tests # EventService component tests
make handlers_tests # API handlers tests
make router_tests # Router component tests
make security_tests # Auth and RateLimiter tests
# Run performance benchmarks
make benchmark
./benchmark
# Run comprehensive test script
./run_benchmark.sh- C++17 compiler (g++ or clang++)
- Node.js 16+ and npm
- SQLite3 development libraries
- libcurl for HTTP client functionality
-
Clone and setup:
git clone https://github.com/ostepan8/personal-scheduler.git cd personal-scheduler cp .env.example .env -
Build and run server:
make clean && make server ./scheduler_server -
Setup frontend:
cd frontend npm install cp .env.example .env.local PORT=3004 npm start -
Access application:
- Frontend:
http://localhost:3004 - API:
http://localhost:8080
- Frontend:
.env (Backend):
API_KEY=your-secret-api-key
ADMIN_API_KEY=your-admin-key
HOST=127.0.0.1
PORT=8080
CORS_ORIGIN=http://localhost:3004
RATE_LIMIT=100
RATE_WINDOW=60frontend/.env.local:
REACT_APP_API_URL=http://localhost:8080
REACT_APP_API_KEY=your-secret-api-key┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ React Frontend │────│ C++ API Server │────│ SQLite Database │
│ (Port 3004) │ │ (Port 8080) │ │ (events.db) │
│ │ │ │ │ │
│ - TypeScript │ │ SOLID Architecture│ │ - WAL Mode │
│ - Tailwind CSS │ │ - Dependency │ │ - Auto Schema │
│ - Calendar Views│ │ Injection │ │ - Prepared Stmts│
└─────────────────┘ │ - Thread Pools │ └─────────────────┘
│ - Response Cache │
│ - Security Layer │
└──────────────────┘
│
┌──────────────────┐
│ Optional Services │
│ - Google Calendar │
│ - Notifications │
│ - Custom Actions │
└──────────────────┘
make help # Show all available targets
make server # Build SOLID-compliant server
make benchmark # Build performance benchmark
make unit-tests # Build and run all unit tests
make clean # Clean build artifacts
make install # Install to /usr/local/bin# Build and run comprehensive benchmarks
make benchmark
./benchmark
# Run specific benchmark categories
./benchmark --model # Model layer performance
./benchmark --api # API performance
./benchmark --full # Full system benchmark
# Use benchmark script for load testing
./run_benchmark.sh
# Results automatically saved to benchmark_results/scheduler/
├── main.cpp # SOLID-compliant server entry point
├── Makefile # Build system with test targets
├── benchmark.cpp # Comprehensive performance testing
├── run_benchmark.sh # Load testing script
│
├── api/ # API layer (SOLID-compliant)
│ ├── ApiServer.h/cpp # Main HTTP server with DI
│ ├── handlers/ # Request handlers (SRP)
│ │ ├── EventsHandler.* # Event operations handler
│ │ └── StatsHandler.* # Statistics handler
│ ├── routing/ # Route management (OCP)
│ │ └── Router.* # Route matching and dispatch
│ ├── interfaces/ # Abstract interfaces (DIP)
│ │ ├── IEventService.h # Event service interface
│ │ ├── IRequestHandler.h # Handler interface
│ │ └── IPerformanceMonitor.h # Monitoring interface
│ └── performance/ # Performance monitoring
│ └── PerformanceMonitor.* # Metrics collection
│
├── services/ # Business logic layer
│ └── EventService.* # Event operations (SRP + DIP)
│
├── model/ # Domain models
│ ├── Model.* # Event aggregation
│ ├── OneTimeEvent.* # Single events
│ ├── RecurringEvent.* # Recurring events
│ └── recurrence/ # Recurrence patterns
│
├── database/ # Data persistence
│ ├── SQLiteScheduleDatabase.* # SQLite implementation
│ └── SettingsStore.* # Configuration storage
│
├── security/ # Security components
│ ├── Auth.* # Authentication
│ └── RateLimiter.* # Rate limiting
│
├── utils/ # Utilities
│ ├── ResponseCache.* # HTTP response caching
│ ├── FastSerializer.* # Optimized JSON serialization
│ ├── ThreadPool.* # Concurrent processing
│ └── DependencyContainer.* # IoC container
│
├── tests/ # Comprehensive test suite
│ ├── services/ # Service layer tests
│ ├── api/ # API layer tests
│ ├── security/ # Security tests
│ └── test_utils.h # Test utilities
│
├── frontend/ # React application
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── services/ # API client
│ │ └── types/ # TypeScript interfaces
│ └── public/ # Static assets
│
└── benchmark_results/ # Performance test outputs
All requests require the Authorization header:
curl -H 'Authorization: your-api-key' http://localhost:8080/eventsGET /events- List all eventsPOST /events- Create new eventGET /events/next/{count}- Get next N eventsGET /stats- Performance and cache statisticsOPTIONS /*- CORS preflight support
{
"status": "ok",
"data": [...],
"meta": {
"cache_hit": true,
"response_time_ms": 1.2
}
}- Multi-layer Authentication (API keys + Admin keys)
- Configurable Rate Limiting (per-IP protection)
- CORS Security with configurable origins
- Input Sanitization for all user data
- Secure Headers (HTTPS-ready)
- Dependency Injection for secure component isolation
- Production-Safe Logging (no sensitive data)
- Response Cache: TTL-based caching with hit/miss metrics
- Fast JSON: Custom serialization avoiding nlohmann overhead
- Connection Keep-Alive: HTTP connection reuse
- Thread Pool: Hardware-optimized worker threads
- Async Handlers: Non-blocking request processing
- Database Pooling: Connection reuse and optimization
- Zero-Copy Streaming: Direct buffer operations
- Lock-Free Structures: Concurrent data access
- Memory Pools: Pre-allocated object management
Result: 13,042 RPS (4,500x improvement from baseline 2.9 RPS)
- Unit Tests: 100% coverage of SOLID components
- Integration Tests: Full API workflow testing
- Performance Tests: Continuous benchmarking
- Security Tests: Auth, rate limiting, input validation
- Load Tests: High-concurrency validation
- Automated test execution with
make unit-tests - Performance regression detection
- Code quality validation
- Build artifact management
# Backend
make clean && make server
sudo make install # Installs to /usr/local/bin
# Frontend
cd frontend
npm run buildThe SOLID architecture makes containerization straightforward:
- Clean dependency injection
- Environment-based configuration
- Stateless request handling
- Health check endpoints
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Follow SOLID principles in your code
- Add unit tests for new components
- Run test suite (
make unit-tests) - Benchmark performance impact (
make benchmark) - Commit changes (
git commit -m 'Add SOLID feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
- SOLID Principles: All new code must follow SOLID design
- Unit Tests: New components require comprehensive tests
- Performance: No regressions in benchmark results
- Documentation: Update README for new features
This project is licensed under the MIT License - see the LICENSE file for details.
- httplib for lightweight C++ HTTP server
- nlohmann/json for JSON processing
- SQLite for embedded database excellence
- React ecosystem for modern frontend
- SOLID Principles by Robert C. Martin
- Clean Architecture design patterns
Built with ❤️ following SOLID principles and modern C++ best practices