2

I am trying to make an Uber like website, where you can sign up as a customer (someone who uses the service) or a worker (someone who provides the service).

Should I create two models for each of these and then have different registration forms for each. Or should I have one generic profile model with a role field where upon registration the user could select whether they want to be a customer or a worker?

I ask because there are fields that the customer would have that would be useless to the worker and vice versa (such as the "looking for a ride now" field that only a customer would activate when they are trying to find a ride.

Is it okay to give all fields to both sides with one profile model and then leave them blank if they do not apply to the customer/worker?

migrated from stackoverflow.com Aug 17 '17 at 9:57

This question came from our site for professional and enthusiast programmers.

2

Philosophically speaking, your users are going to expect to be able to use the app in both ways with one registered account. I would make a user model and I would make separate models for Driver Profile and Customer Profile which can be created as needed. You'll need to be careful any time you access those profiles to make sure they exist before attempting to use them.

0

I would make the interface and the experience the same but still find a way to differ between the types of accounts. similar to having a merchant account and a buyer account on an e commerce platform. you create one account with different types of profiles. the customer should have an option to "upgrade" his account and become a driver. I assume the driver account requires additional validations and has to stand in some requirements or maybe has to apply as buyer and wait for the system to approve his request. I'd have a "Become a driver" button somewhere, this will lead into a driver on boarding flow (upgrading the customer account). Once the request is approved the user will have both functionalities.

0

Do not mix up user roles if they are mutually exclusive.

If it's something like Uber, your customer does not have a succession path to become a driver. On the other hand, your driver may never or very rarely use the app as a customer to book the cab. (He is inside one, he can drive it wherever he wants)

Also, it appears that the functionalities for these two roles would be very different. There is no reason to overload an app with two feature sets where only one will be used at any point. This will confuse both of the user roles about the features they don't have access to but there are traces of unusable function of the other user.

It is a personal opinion, but I like what Facebook does with many different functions in their application. Facebook is a behemoth. It offers different applications to work for different functions. It has a customer oriented Facebook App. There is a lite version, then there is a page manager. There is one for groups too.

I believe this helps Facebook to keep the apps modular and relatively lightweight. The most important part is that the tasks and workflows of each app are mutually exclusive even if they are part of the single bigger ecosystem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy