What are best practices when it comes to designing a social network app for Android (possible iOS port later depending on uptake)?
It's my first time architecting something this scale from scratch, and I'm probably already making mistakes in the design phase.
What I already have in mind is to:
Have a Postgresql backend to store customer data. I'm going to set up one 'app' user to handle all the incoming RESTful requests, which leads to my next point..
Connect the database to the app through a RESTful interface (I don't think the platform is overly important but I'm looking at either Go or Puma/Sinatra or Flask as I want to minimise overhead and keep everything as efficient as possible).
Authenticate users using whatever authentication plugin is suitable within the RESTful interface and then..
Tunnel all traffic through a SSL socket which I'll open on the app which will connect to the interface (this is one of the areas where I don't have a great amount of knowledge/experience)
Load data pertaining to other users and store it locally in an encrypted sqlite db on the Android device which I will create as part of the app start-up process. Images will be the only media type I'll allow. I'll wipe the sqlite db each time the user logs in to the app or once it reaches a certain size i.e. over 3 mb.
Make the app subscription based so along with checking the user credentials each time they log on I'll check their subscription status and enable different behaviour accordingly.
Deal with heavy load connection issues by putting Pgbouncer on the db.
Store the user images on my server as normal image files and when the relevant users are selected I'll send them to the app over the socket.
Run the entire server as a VM, possibly from CoreOS/Docker machines, which sounds like a good fit from what I've read.
Is there anything wrong with any part of my intended design? Is there anything necessary I've missed out?