# Installation
# Install Using GUI Installer
To install Bagisto using our GUI installer, you can follow any of the following methods:
# Method 1:
Choose the directory where you want to install Bagisto. Open your terminal and navigate to this directory.
Once you are in the desired directory, run the following command in your terminal to install Bagisto:
composer create-project bagisto/bagisto
Configure your HTTP server to point to the
public/
directory of the project.Open your browser and access the following URL:
http://localhost/bagisto/public/
This will launch the Bagisto installer.
# Method 2:
Otherwise you can download the zip file and install it using the following steps:
Download Bagisto (opens new window) from our website.
Extract the contents of the downloaded
Navigate to the project root directory.
Run the following command:
composer create
Configure your HTTP server to point to the
public/
directory of the project.Open your browser and access the following URL:
http://localhost/bagisto/public/
This will launch the Bagisto installer.
WARNING
Ensure that Composer is installed on your system
# Install Using Composer
To install Bagisto using Composer, use the following steps:
Choose the directory where you want to install Bagisto. Open your terminal and navigate to this directory.
Once you are in the desired directory, run the following command in your terminal to install Bagisto:
Run the following command:
composer create-project bagisto/bagisto
Run the following command:
php artisan bagisto:install
WARNING
During the installation process, if the
.env
file doesn't exist, the installer will prompt you to provide the necessary information.- Follow the prompts during the installation process to provide the following details:
- Please Enter the Application Name : - Please Enter the APP URL : - Please enter the application URL: - Please select the default locale : - Please enter the default currency : - Please choose the Allowed Locales for your channels : - Please choose the Allowed Currencies for your channels : - Please select the Database Connection : - Please enter the Database Host : - Please enter the Database Port Number : - Please enter the Database Name : - Please enter the Database Prefix : - Please enter the Database Username : - Please enter the Database Password :
- For Create your admin credentials
- Enter the Name of Admin User : - Enter the Email address of the Admin User : - Configure the Password for admin user : - Please select if you want some sample products after installation:
# Start Using Bagisto
# On a Production Server
To access Bagisto on a production server, open your domain in a web browser. For example:
https://example.com/
# On Your Local Server
To access Bagisto on your local server, follow these steps:
Configure your HTTP server to point to the
public/
directory of the project.Run the following command:
php artisan serve
Open your browser and access the provided local server URL.
# Login as an Admin
To log in as an admin, visit https://example.com/admin/
. If you used the php artisan bagisto:install
command, use the following credentials:
Email: admin@example.com
Password: admin123
# Login as a Customer
To log in as a customer, you can directly register on https://example.com/customer/register
. After registration, you can log in using your credentials on the domain.
# Installation of Mobile App
Before beginning with the installation, you will need the following with the mentioned versions
- Bagisto Version - v2.0.0
- Android Studio Version - Flamingo | 2022.2.1
- Flutter Version - 3.10.1
- Dart - 3.0.1
- Xcode - 14.3
- Swift - 5
Make sure you have installed the API module and set this up properly on your bagisto.
Note
It is recommended that you run a simple Hello World program in Flutter first before proceeding further so that you are sure that the environment is properly set up.
# Clone the repository
- Open your terminal or command prompt
- Navigate to the directory where you want to save the project
- Use the git clone command followed by the repository URL
git clone https://github.com/bagisto/opensource-ecommerce-mobile-app.git
# Install dependencies
- Navigate to the project's directory
cd <repository-name>
- Run the following command to install the required packages
flutter pub get
# Generate Required files
- Navigate to the project's directory
cd <repository-name>
- Run the following command to generate the required files
flutter pub run build_runner build --delete-conflicting-outputs
# Connect a device or emulator
Physical Device
- Enable USB debugging on your device
- Connect it to your computer using a USB cable.
Emulator
- Start an Android or iOS emulator using your preferred IDE or tools.
# Run the Project
- Use the following command to build and run the project
flutter run
# Minimum Versions
- Android: 21
- iOS: 12
# Configurations Steps
# For Setup
Change the baseUrl as per your store
Path: lib/utils/server_configuration.dart
static const String baseUrl = ‘....’;
Note
Add the value of the complete URL ending with the GraphQL API endpoint. E.g - https://example.com/graphql
# For Theme
Change the Theme for your app
Path: lib/utils/mobikul_theme.dart
static const Color primaryColor = Color(***********);
static const Color accentColor = Color(***********);
# For Push Notification Service
- Android
Replace "google-services.json".
- iOS
Replace "GoogleService-Info.plist".
Note
Helpful Articles
Android → https://mobikul.com/knowledgebase/generating-google-service-file-enable-fcm-firebase-cloud-messaging-android-application/
iOS → https://mobikul.com/knowledgebase/generating-new-googleservice-info-plist-file-fcm-based-project-ios-app/
# For Application Title
Android
- Path: android/app/src/main/AndroidManifest.xml
- Change app name: android:label="***********"
iOS
- Go to the general tab and identity change the display name to your app name
Note
For Homepage Header Title - Go to ‘assets/language/en.json’ (Note: Here, “en” in en.json refers to the languages that would be supported within the application)
# For Splash Screen
For adding Lottie as Splash Screen
- Path: assets/lottie/splash_screen.json
- After updating the Lottie file, update the ‘splashLottie’ in lib/utils/assets_constants.
static const String splashLottie = "assets/lottie/splash_screen.json";
For adding an Image as a Splash Screen
- Path: assets/images/splash.png
- After updating the Image file, update the ‘splashImage’ in lib/utils/assets_constants.
static const String splashImage = "assets/images/splash.png";
# For App Icon
- Android: Open the android folder in Android Studio and then right click app > new > Image Asset set Image.
- iOS: Replace the icons over the path > ios/Runner/Assets.xcassets/AppIcon.appiconset
# API Documentation
For the API Documentation, please go through - https://github.com/bagisto/headless-ecommerce/
# Contributing
Contributions are welcome! Follow the contribution guidelines to get started.
# License
Bagisto is open-sourced software licensed under the MIT license.
← Requirements Docker →