79680035

Date: 2025-06-26 07:08:06
Score: 0.5
Natty:
Report link

Yes, it's very common (and generally recommended) for mobile apps and websites to share the same backend API and database. This is a standard practice in modern application architecture.

Why a Shared Backend Makes Sense

  1. Consistency: All clients work with the same data and business logic

  2. Efficiency: You maintain and update one codebase instead of multiple

  3. Synchronization: Changes are immediately available across all platforms

  4. Cost-effective: Less infrastructure to maintain

Your Planned Approach is Solid

Your plan to use:

This is exactly how most successful applications are built (think Twitter, Facebook, etc.).

When You Might Consider Separation

You might separate backends only in specific cases:

Best Practices to Follow

  1. Design a clean RESTful or GraphQL API that serves both platforms

  2. Implement proper authentication (JWT, OAuth) that works across platforms

  3. Use API versioning to manage changes without breaking clients

  4. Consider a BFF (Backend For Frontend) pattern if clients need very different data formats

Scaling and Security

A shared backend doesn't inherently create scaling or security issues if:

Your approach is correct - proceed with confidence! This architecture will serve you well through initial development and can scale as your user base grows.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Debayan Pratihar