Here we will see a step by step installation guide for multi vendor app for flutter. This is a food delivery app. But this could easily be converted into a grocery or shopping app. Make sure you follow them correctly in order.
Android studio and vscode installation
Make sure you have Android studio and vscode installation. If not, follow the video below
Quick set up and test
The below quick test set up is given for the users who just bought the End user app. Set the url correctly from below, and then you would be able to test the app without any errort. Just make sure you run the app correctly
Test url for baseUrl
Go to .env.development file in the project root folder and put the lines. The first one is for api base url and second one is for payment server.
https://ffoodly.dbestech.com
https://pfoodly.dbestech.com
You may watch the video as well. Here we have update the link. We are not using railway anymore. We are using the new links shown above.
Upload database schema and show products
Make sure you have the correct agz file from the source code you bought. And then make sure you have installed Studio 3T for upload the given agz file.
Enable search index on Mongodb
Once you have created the foodly database based on the above video, after that we need to make sure we enable search index on Mongodb. Without it, you won't be able to search food on the user app. To enable it please watch the video
Nodemailer setup
Here we will make sure our app email verification is set up correctly. For this we have used nodemailer setup.
Run locally
Here we will see how to run the user end app locally. Here you make sure you have the latest version and run the backend first and then run user end app.
You need to make sure your mongodb string is correct in backend app in the .env file and then in the the payment server.
For payment server to work, we need to install ngrok locally. Make sure you did from this ngrok installation video.
To follow the above tutorial you need to install ngrok. You may learn about it from the link here.
Registration & Login
Make sure you use real email for regsitration. We did email verification for login.
Set up payment server with Stripe
Here we will see how to set up the payment server locally. Make sure you have the latest code. You make sure you have ngrok is running.
Restaurant app verification
Here we will see how to verify a restaurant app. We will also see how to approve as an admin from the database. The app verification could be different from the video since the app is evolving.
Approve restaurant from Admin panel
Firebase set up
Below I show how to set up the app with firebase. Make sure you have google console account with your Gmail.
Phone number verification process set up
Firebase phone number verification process set up. Make sure you have firebase project set up. For testing purpose you may also use +1 as country code and 1234567890 as your phone number and 123456 as verification code.
The above two set up may cause error if you don't set up the process correctly. Make sure you have
Firebase App Check for OTP
Firebase Storage and Permission
rules_version = '2';
// Craft rules based on data in your Firestore database
// allow write: if firestore.get(
// /databases/(default)/documents/users/$(request.auth.uid)).data.isAdmin;
service firebase.storage {
match /b/{bucket}/o {
// This rule allows anyone with your Storage bucket reference to view, edit,
// and delete all data in your Storage bucket. It is useful for getting
// started, but it is configured to expire after 30 days because it
// leaves your app open to attackers. At that time, all client
// requests to your Storage bucket will be denied.
//
// Make sure to write security rules for your app before that time, or else
// all client requests to your Storage bucket will be denied until you Update
// your rules
match /{allPaths=**} {
allow read, write: if request.time < timestamp.date(2025, 3, 11);
}
}
}
Change App info
If you want to change the app project name watch this tutorial
If you want to change the app name watch this tutorial
If you want to change the app icon watch this tutorial
Enable Firebase Notification
Activate Firebase for chatting
Google Map key set up for iOS and Android
About logo and image upload
Admin panel set
Here in the below section, we will set up admin panel. Make sure you have set up User end app correctly. Mostly importantly you need to make sure your firebase set up is correct.
Admin panel set up with firebase
Admin panel backend set up
Status change to Admin
Here we will see how to change the client or user status to admin. Make sure you are accessing your mongodb.
Delivery boy setup and the whole process
Here we will see the delivery boy set up and whole process. Make sure you set up user app, restaurant, admin app correctly with firebase setup.
Quick test with your own server
Run the web app
Here in this section, we will cover how to run the app in the web broswer locally. There are few ways you can do it. Let's see
flutter run -d chrome
The above command will start the app in a new browser tab. The above one will start on localhost but using random port. So if you need to connect to backend api, it's not ideal since it will not have the correct port.
There's another one
flutter build web --no-tree-shake-icons
The above one will start a tab on your exist chrome opening. It will in general start on localhost:8000 unless other you mention the port.
You also need to mention in your Environment.dart file the localhost of your server side address. That's localhost:6004.
Make sure you know the port.
Ngix and Apache set up for web app
If you are running ngix web server, make sure you set the below as static setting
location / {
try_files $uri /index.html;
}
The above is required for routes forwarding.
If you apache using this in .htaccess file
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ /index.html [L]
2024-11-13 11:34:09
Please guide me, I am getting below error while compiling in android Studio and same error in vs code ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-17-openjdk-amd64/ Please set the JAVA_HOME variable in your environment to match the location of your Java installation. Error: Gradle task assembleDebug failed with exit code 1 System Configuration & Software installed Android Studio Ladybug | 2024.2.1 Patch 2 Dart SDK 3.5.4 VS Code version 1.95.2 OS: NT x64 Windows 11
pls redownload, I have upated again
2024-09-30 19:31:11
nothing sorry for that comment i was confused between two folders one on YouTube and this sorry for long respond
2024-08-29 17:49:23
i bougth the backend code but it's missing some api's
What's it missing?
2024-03-21 15:17:34
Here is the starter files https://www.dbestech.com/tutorials/flutter-multi-vendor-app
2024-03-21 15:15:00
i am not seeing the food delivery starter file why please
2024-03-21 15:14:57
i am not seeing the food delivery starter file why please