How to scale an app architecture with a nextjs app? - server

Let's say I have the following app (just a stupid example) https://tenant-eight.vercel.app
In words: A customer can see a business name and the address. He can leave a like, that is stored in a MySQL database. The app will send a email in the background to the business owner.
I want to sell that app to clients (b2b), so that they can collect votes on their own.
Let's say I have 100 clients. I would store the company configuration (database api url, company name, address...) in an .env file. Then I would build 100 apps. I need 100 domains, 100 web spaces, 100 databases and so on.... How can I make my life easier?
What is the best approach to realise that with less scaling issues, update maintenance, and so on? (each customer will always have the same latest code - no customer specific features).

Well, a method is just selling your apps source code and relax. Don't want it to get stolen? Two ways (both are sh#tty in an aspect but.. welcome to selling closed source things :p)
Obfuscate the code, which will make it much slower, but not a single soul will understand it unless they are a real tech-savvy person. Clients may also feel less secure.
Make a licensing system with a private npm project, and give out license codes to activate the website (no source code will be given)

Related

Best way to send Personalized emails to my registered users?

My users register on my website (200 per day) and can select from a large pool of categories (100) of content they are interested in: Tech, Business, Health... and so on.
I want to send them an email every week with a digest of the categories they selected.
What's the best tool for the job?
I'm not sure you can do that with Mailchimp and is really expensive considering my user count growth. Plus, users would register on my database and then would have to re register and confirm it on Mailchimp.
I was thinking of making my own / buying something custom that uses Amazon SES.. Looks cheaper. Is that a good idea? What would the obstacles be? Is it very hard to manage bounces, getting your domain through spam blockers and stuff?
Mailchimp is a great way to go here. You can use their API so that your users do not need to re-register. Their content creation tools are great as well so you can build everything you need with them. https://apidocs.mailchimp.com/gettingstarted/connectivity.php
Building out your own tools really depends on what all your platform does today.. that make vs buy decision is a complex one.

Need some advice to get a commercial xmpp application developed

I have a business idea which I want to materialize for sometime .. I recently shared my idea with 2 close friends who also found it very interesting, new and doable plus the cost included for the project to start is reasonable and they have planned to invest in it. Much of the success of this project app depends on the proper marketing element out of which most of the time, you have to personally meet up with clients/vendor and make them use your application.
The idea is to connect local ecommerce (retail shops, businesses, vendors, etc.) with users/customers through a messaging app mostly similar to whatsapp. I have already started to look for a xmpp/jabber developer who can accomplish our requirements. We are expecting him to develop the app and also set-up the server requirements. Our budget lies within $3000-4000 range for the project to initiate.
I want the app to have the following aspects:
a) user friendly GUI
b) highly scalable (planning to start within my city located in south asia)
c) location sharing (want users to navigate nearby shops/vendor offering their type of goods/services)
d) have a user review feedback against vendors and an additional page for vendor profile/rating system
e) only customer - vendor chats with functionalities like camera snaps, audio recording (just like whatsapp).
f) both for ios and android
Now the whole idea outlaid, after reading lots of articles, discussion and tutorials, I have some questions (I am a non-technical person btw):
1- I believe ejabberd is the best option as compared to tigase or prosody due to high scability. Is this ok to go with or should I look at other xmpp servers?
2- Currently, I am planning to launch this application within my city (rated as worldwide no.2 as per population stats of above 25m people), should I set-up a local server with high internet bandwith and a powerful machine or should I outsource it to some xmpp hosted server in the US (as their technological infrastructure has always provided quality service).
3- Should I be worried about the developer stealing the source code or is there any effective way to minimize this risk?
4- Any ideas what other things I am missing. This is dead serious for me and I am willing to do anything to get this project on the road.
(P.S.: The idea for this app is similar to the existing app called Lookup but I am planning to add some variations to it)
Thanks and sorry for being a bit lengthy ..
Regards,
Ahmed
ejabberd is indeed likely your best bet. However, be careful about the budget. To launch a quality service in an highly competitive area you have to have a significant budget, both development and marketing, if you expect your project to succeed.

Iphone multiple users application

I'm trying to figure out how to make an iPhone application allow multiple users (that have it installed) share data among them. Now, the tricky part is that I don't want to host a server at my place (very poor ISP services), so I would opt for an online hosting solution. Next, by data I understand them to be able to, let's say, post a comment that would become readable to all the other users and to see what other users have said.
So, in my mind, I'm thinking of either having a file remotely hosted that could be accessed by multiple users at the same time, or a database of some sort or anything like that.
You haven't given us much to go on -- it's not even clear what your question is. If you're just asking how to go about this, I'd suggest the following steps:
Figure out what, specifically, you want the app to do, what data it will share, and who the data will be shared with. Is this an app that you're going to distribute publicly? Will all users share the same data, or will groups of users share with each other but not outside the group? How big is the data, and how is it structured? Can any part of the data change at any time (like a shared document) or will the data just be updated (like a SMS conversation)?
Decide how you want to host the data. If you'll need to serve a lot of users, you'll want some sort of database. If you'll need to serve a LOT of users, you'll want to make sure that your solution will scale easily. There are lots of hosting companies that provide access to databases like Oracle or MySQL, and that may be enough for your purposes. Or, you might want to look into some of the web services options, such as those offered by Google and Amazon. These can be fairly easy to use and have the advantage that they'll scale very well.
Get to work. You'll probably want to build a very basic version of your app around the same time that you're getting the server side working, so that it's easier to test. Once the server side is working and reliable, you can shift the focus back to building out the rest of your app.

Less is more - auto ZIP code?

You have an international website with a form where people fill in their address.
Wouldn't it be great if people need to fill out one field less? Example:
100 visitors use the form each day
They spend 5 seconds on the ZIP code field
So 5 * 100 * 365 = 182500 seconds or 50 hours a year. And that's just for one form on one website. Multiply that by all websites that ask such information and you can see the time we can save by redesigning this.
You can get someone's ZIP code via geolocation + geocoding. But since a person's current position can easily differ from the city a person lives in, this isn't really usable.
A solution would be to get the ZIP code based on a geolocated (but changeable) country, input city and input street.
The API we could use: http://code.google.com/intl/nl/apis/maps/documentation/geocoding/ or http://developer.yahoo.com/geo/placefinder/.
Now the real question is, which problems would arise (internationalization, localization, accuracy, etc.)?
No-one else has answered this, so I'll have a go.
No, it wouldn't be great if the website filled in the zip code field based on other information. It might work for some people. It would certainly fail for enough people that you'd have to offer a zip code field as an override. Now you have a site with a higher complexity and development cost than one with a conventional zip code field, because you have to test both the automatic zip code guesser and the conventional field.
You'll have a usability hit which comes from people being confused by the two alternatives and not knowing which to choose.
You'll pay an opportunity cost, by spending design and development resources on the zip code guesser, instead of on some other feature which yields a larger usability benefit.
Here are some problems I foresee arising:
Inaccuracy: whatever mechanism you use collects correct hints (IP address location, street address and city) but generates the wrong zip code, due to errors
Remote use: Users entering a different address than their current location, e.g. using a computer at a hotel in a different country to fill out a form related to their home address, so location of IP address of computer is different from location of address in form
Localisation failure: whatever mechanism you use doesn't work with the hints of the user's address, e.g. different address conventions in a foreign country
Provider business terms: you want to use a geocoding service like Google's or Yahoo's APIs, but the license agreement for that service isn't compatible with the business model of your site. For example, they want you to pay if you are geocoding for commercial purposes, or for a site behind a firewall, or more than a certain number of transactions a day
Change in provider situation: you use an external geocoding service, and it goes out of business
etc.
Before taking on a feature like this, I'd take two steps:
User research. Can you identify users for whom the time taken to enter a zip code is a pain point? What about the one of the top three pain points? I'll bet this issue isn't even on your users radar.
Test on existing data. For whatever method you are thinking about using to guess zip code, try it on existing customer data, and see if you can accurately reproduce the zip code the customer entered. This will give you an idea of your error rate. Can you live with this error rate?
If your real question is, could someone please validate my feeling that this is a charming feature, then I probably haven't given you the answer you seek. But you asked, "what problems would arise?"

Creating a Secure iPhone Web Data Source

I've searched the web for this bit to no avail - I Hope some one can point me in the right direction. I'm happy to look things up, but its knowing where to start.
I am creating an iPhone app which takes content updates from a webserver and will also push feedback there. Whilst the content is obviously available via the app, I don't want the source address to be discovered and published my some unhelpful person so that it all becomes freely available.
I'm therefore looking at placing it in a mySQL database and possibly writing some PHP routines to provide access to my http(s) requests. That's all pretty new to me but I can probably do it. However, I'm not sure where to start with the security question. Something simple and straightforward would be great. Also, any guidance on whether to stick with the XML parser I currently have or to switch to JSON would be much appreciated.
The content consists of straightforward data but also html and images.
Doing exactly what you want (prevent users from 'unauthorized' apps to get access to this data') is rather difficult because at the end of the day, any access codes and/or URLs will be stored in your app for someone to dig up and exploit.
If you can, consider authenticating against the USER not the App. So that even if there is a 3rd party app created that can access this data from where ever you store it, you can still disable it on a per-user basis.
Like everything in the field of Information Security, you have to consider the cost-benefit. You need to weigh-up the value of your data vs. the cost of your security both in terms of actual development cost and the cost of protecting it as well as the cost of inconveniencing users to the point that you can't sell your data at all.
Good luck!