Pubflow+πŸ”₯Firebase

Migrate from Firebaseto Modern Infrastructure

Replace Firebase with Flowless authentication and a modern database like PostgreSQL, SQLite & others for better performance, flexibility, and cost control

Why migrate from Firebase to Flowless?

Better performance, full control, and modern database flexibility

πŸ—„οΈ
Modern Database
PostgreSQL, SQLite & others

Use a real relational database with full SQL support, better querying, and no vendor lock-in. Complete control over your data!

πŸ”
Enterprise Authentication
Flowless replaces Firebase Auth

Argon2 password hashing, secure session management, trust token validation, and automatic security monitoring. Firebase Auth can't compete!

πŸš€
Better Performance
No more Firebase limits

Complex queries, joins, transactions, and indexes work perfectly. No more Firestore query limitations or expensive reads!

πŸ’°
Lower Costs
Predictable pricing

No more paying per read/write. With PostgreSQL, SQLite or other databases on your own infrastructure, costs are fixed and predictable!

How it works

Modern architecture with full control

πŸ“±
Your App
Mobile or Web
⚑
Flowfull Backend
Token validation
πŸ”
Flowless Auth
Session tokens
πŸ—„οΈ
Your Database
PostgreSQL, SQLite & others

βœ“ Validated requests hit your database with full SQL/query power. No Firebase limitations!

Super Simple for Developers

Less code, more features. Here's how easy it is:

1. Login with Flowless (get session token)

app.ts
TypeScript
import {  createFlowfull } from '@pubflow/flowfull-client';

// Create client instance
const api = createFlowfull('https://your-instance.pubflow.com');

// Login
const result = await api.auth.login({
  email: 'user@example.com',
  password: 'SecurePass123!'
});

// Session is automatically stored and used for future requests
const user = await api.auth.me();

2. Your backend validates the token (automatically!)

backend.ts
TypeScript
import { requireAuth } from '@flowfull/auth';
import { db } from './db'; // Your PostgreSQL/SQLite client

app.post('/api/create-post', requireAuth(), async (c) => {
  // βœ… Token already validated by requireAuth()!
  // You just get the validated user data:


  const userId = c.get('user_id');       // Validated βœ“
  const userType = c.get('user_type');   // Validated βœ“
  const email = c.get('email');         // Validated βœ“


  // Save to your database with full SQL power:
  await db.query(
    'INSERT INTO posts (user_id, title, created_at) VALUES ($1, $2, NOW())',
    [userId, req.body.title]
  );


  return c.json({ success: true });
});

πŸ’‘ Using requireAuth() from our starter kits or Flowfull. Learn more in the Auth Middleware documentation.

That's it! πŸŽ‰

You don't need to worry about:

  • βœ“Token validation (Flowless does it)
  • βœ“Session management (Flowless handles it)
  • βœ“Security checks (Bridge validation automatically applied)
  • βœ“User data extraction (it's in the context)

Just focus on your business logic!

3. BONUS: Add caching for even better performance

cached-backend.ts
TypeScript
const apiCache = new HybridCache<BlogStats>({
  cacheType: 'blogStats',
  ttl: 60,         // 1 minute
  maxSize: 1000,
  keyPrefix: 'blog'
});

app.get('/api/blog/stats', async (c) => {
  const cacheKey = 'global-stats';

  // Try cache first
  let stats = await apiCache.get(cacheKey);

  if (!stats) {
    // Expensive query
    stats = await db.selectFrom('blog_posts')
      .select([
        db.fn.count('id').as('total_posts'),
        db.fn.sum('views').as('total_views')
      ])
      .executeTakeFirst();

    // Cache for 1 minute
    await apiCache.set(cacheKey, stats, 60);
  }

  return c.json(stats);
});

⚑ Performance tip: Learn how to implement HybridCache efficiently in the HybridCache documentation. Our starter kits include it by default!

Learn more about HybridCache

Reduce Firebase costs and improve performance dramatically

View HybridCache Documentation β†’

Why Developers Love It

⚑

10x Faster Development

No more writing auth validation code. Just check the user_id. That's it!

πŸ’°

Save Money

Fixed infrastructure costs. No more paying per-read/write like Firebase!

πŸ”’

More Secure

Trust token validation ensures only authenticated users access your data

Ready to migrate from Firebase?

Start using Flowless with a modern database today. Better performance, lower costs, full control.