Database
Scalable database with real-time capabilities
A fully managed database that scales automatically with your application.
Key Features
| Feature | Description |
|---|---|
| Real-time Sync | Changes sync instantly across all clients |
| Offline Support | Works offline, syncs when back online |
| Auto Scaling | Scales from prototype to production |
| Strong Typing | Full TypeScript support |
Basic Operations
const doc = await db.collection('users').create({
name: 'Jane Doe',
email: 'jane@example.com',
createdAt: new Date()
});Real-time Subscriptions
Listen to changes in real-time:
db.collection('messages')
.where('roomId', '==', 'general')
.subscribe((messages) => {
console.log('Messages updated:', messages);
});