glhd/bits
Generate unique 64-bit IDs in PHP for distributed systems. Create Twitter Snowflake, Sonyflake, or custom bit-sequence identifiers. Configure worker/datacenter IDs and a custom epoch to avoid collisions across servers.
created_at columns.Bits’ core architecture.setTestNow() and timestamp extraction methods, reducing flakiness in CI/CD pipelines.Bits for performance-critical paths.For Executives: "Bits lets us generate unique, sortable IDs at scale—like Twitter or Sony—without relying on external services. This cuts latency for high-throughput systems (e.g., real-time analytics, IoT) and simplifies distributed deployments. For example, we can replace auto-increment IDs in our Laravel models with time-embedded Snowflakes, enabling faster queries and easier sharding. It’s MIT-licensed, Laravel-native, and supports multi-region setups, reducing our dependency on monolithic ID services."
For Engineers: *"This package gives us Snowflake/Sonyflake IDs with Laravel-first integrations:
created_at columns.setTestNow() to avoid flaky time-based tests.
Tradeoff: Requires upfront config (worker/datacenter IDs) and isn’t a drop-in for UUIDs, but the performance and scalability wins justify it for distributed systems."*How can I help you explore Laravel packages today?