Architecture Advice for ClassVibe: Authentication, PostgreSQL, DigitalOcean and Scalability

Subject: Seeking Technical Guidance on User Authentication, Backend Architecture, and Scalability for ClassVibe

Hello Google Developer Community,

We are currently developing ClassVibe, a mobile application built with React Native and Expo. We would appreciate some technical guidance and recommendations from experienced developers regarding our application’s architecture, particularly user registration, authentication, database management, and scalability.

1. Current Technology Stack

Our application currently uses the following technologies:

  • Mobile Frontend: React Native, Expo, TypeScript

  • Backend: Python, FastAPI

  • Database: PostgreSQL with SQLAlchemy

  • Authentication: JWT-based authentication

  • Cloud Infrastructure: DigitalOcean

  • Additional Integrations: Firebase, Twilio, and SendGrid

  • Deployment: Docker, Ubuntu, and Nginx

2. User Registration and Authentication

One of our main priorities is improving the reliability, security, and overall user experience of our registration and login processes.

We would appreciate your recommendations on the following questions:

  • Is JWT-based authentication with FastAPI a suitable approach for a growing mobile application?

  • Would you recommend continuing with custom authentication or migrating to a managed solution such as Firebase Authentication?

  • What is the recommended approach for implementing secure email and phone number verification?

  • How should we securely manage access tokens, refresh tokens, and user sessions in React Native?

  • What best practices would you recommend for preventing duplicate accounts, automated registrations, and authentication abuse?

3. Database and Cloud Infrastructure

We currently use PostgreSQL and DigitalOcean as part of our backend infrastructure.

As we plan for future growth, we would like to understand whether our current infrastructure is appropriate for a production mobile application.

Our questions include:

  • Is PostgreSQL hosted on DigitalOcean a good long-term solution for a mobile application with a growing user base?

  • Would a managed database service be preferable to maintaining PostgreSQL ourselves?

  • What strategies should we consider for database backups, monitoring, performance optimization, and connection management?

  • Would integrating Google Cloud services, Firebase, or another managed solution provide meaningful advantages?

  • How should we prepare our backend architecture to support a larger number of concurrent users?

4. Application Security and Scalability

We would also appreciate recommendations on improving the overall reliability of our application.

Specifically:

  • What security practices should we prioritize before launching publicly?

  • How should we protect user information and sensitive API endpoints?

  • What monitoring, logging, and error-tracking tools would you recommend?

  • Is our current combination of React Native, FastAPI, PostgreSQL, and DigitalOcean suitable for production, or would you suggest architectural changes?

5. Google Play Production Readiness

We are also preparing ClassVibe for distribution through Google Play.

We would appreciate guidance regarding authentication-related requirements, user data handling, account deletion, and any additional considerations before releasing our application publicly.

Our main goal is to build a secure, reliable, maintainable, and scalable application without introducing unnecessary complexity or infrastructure costs at an early stage.

We are not necessarily looking to replace our entire technology stack. We would primarily like to understand which parts of our current architecture should be improved and which technologies would be most appropriate as the application grows.

Thank you for your time and any advice you can share.

Best regards,
ClassVibe Development Team