The pursuit of exceptional app user experience is a top priority for developers. With the increasing demands of modern apps, it's crucial to have a database that can keep up with the pace. Enter ReaxDB, a lightning-fast NoSQL database specifically designed for pure Dart and Flutter applications.
ReaxDB boasts an impressive 21,000+ writes per second, instant cache reads, and built-in encryption. Its simplicity is unmatched, allowing you to get started in just three lines of code. With its zero native dependencies, ReaxDB is the perfect choice for startups and developers looking to move fast without sacrificing performance.
Why Choose ReaxDB?
ReaxDB's unique features set it apart from other databases:
- Dead Simple: Start with 3 lines of code, no configuration needed
- Blazing Fast: 21,000+ writes per second, instant cache reads
- Scale When Ready: From simple key-value to advanced queries
- Pure Dart: Works everywhere: iOS, Android, Web, Desktop, Server
- Production Ready: ACID transactions, encryption, real-time sync
Installation and Quick Start
Installing ReaxDB is a breeze:
dependencies:
reaxdb_dart: ^1.4.0
Get started with the simplest database API in town:
`dart
import 'package:reaxdb_dart/reaxdb_dart.dart';
// Open database
final db = await ReaxDB.simple('myapp');
// Store any JSON data
await db.put('user:1', {
'name': 'Alice',
'email': 'alice@example.com',
'age': 25
});
// Get data
final user = await db.get('user:1');
print(user['name']); // Alice
`
When to Use ReaxDB?
ReaxDB is perfect for:
- Mobile apps needing offline-first storage
- Startups wanting to move fast without database complexity
- Apps with 100-1M records that need speed
- Real-time features like live updates, syncing
- Secure apps needing built-in encryption
ReaxDB vs Others
Here's a comparison of ReaxDB with other popular databases:
| Feature | ReaxDB | Hive | SQLite | Isar |
|---|---|---|---|---|
| Setup complexity | ⭐ Simple | ⭐ Simple | ⭐⭐⭐ Complex | ⭐⭐ Medium |
| Performance | ⚡ 21k/sec | ⚡ Fast | 🐢 Slower | ⚡ Fast |
| Pure Dart | ✅ Yes | ✅ Yes | ❌ No | ❌ No |
| Real-time | ✅ Built-in | ❌ No | ❌ No | ✅ Yes |
| Encryption | ✅ Built-in | ✅ Yes | ⚠️ Extension | ✅ Yes |
| Advanced queries | ✅ Yes | ❌ Limited | ✅ SQL | ✅ Yes |
| Active development | ✅ Yes | ⚠️ Deprecated | ✅ Yes | ✅ Yes |
Need More Power?
ReaxDB grows with your app. When you need advanced features, they're one line away:
`dart
// Need transactions? ✅
await db.advanced.transaction((txn) async {
// Your atomic operations here
});
// Need indexes for complex queries? ✅
await db.advanced.createIndex('users', 'age');
final youngUsers = await db.advanced.collection('users')
.whereBetween('age', 18, 25)
.find();
`
Examples
Check out these examples to see ReaxDB in action:
- Todo App: Store todos, get all todos, and mark as done
- User Settings: Save settings and read them later
- Shopping Cart: Add to cart, get cart total, and more
Performance
ReaxDB's performance is unmatched:
- 21,000+ writes per second
- 333,000+ reads per second from cache
- Handles millions of records efficiently
- 10x faster than SQLite for key-value operations
Open Source & Contributing
ReaxDB is 100% open source and we love contributions from the community! Whether you're fixing bugs, adding features, improving documentation, or sharing ideas - all contributions are welcome.
How to Contribute:
- Fork the repository: github.com/dvillegastech/Reax-BD
- Create your feature branch:
git checkout -b feature/amazing-feature
- Make your changes: Write code, tests, and documentation
- Run tests: flutter test
- Submit a Pull Request: We'll review it ASAP!
Ways to Contribute:
- Report bugs: Found an issue? Let us know!
- Suggest features: Have an idea? Open a discussion!
- Improve documentation: Help others understand ReaxDB better
- Translations: Help make ReaxDB accessible globally
- Star the repo: Show your support and help others discover ReaxDB