Skip to content

Integration BuyCom

Backend Setup (FastAPI with PostgreSQL)

1. Install FastAPI and PostgreSQL:

  • Install FastAPI using pip:
pip install fastapi uvicorn
  • Install the PostgreSQL database server and psycopg2 adapter:
sudo apt-get install postgresql postgresql-contrib pip install psycopg2

2. Create a PostgreSQL Database:

  • Access PostgreSQL shell:
sudo -i -u postgres psql
Create a new database and user
  • CREATE ROLE buycom_user WITH LOGIN PASSWORD ‘buycom_pass’;
  • ALTER ROLE buycom_user CREATEDB;
  • ALTER ROLE buycom_user superuser;
  • CREATE DATABASE buycom_db;
  • GRANT ALL PRIVILEGES ON DATABASE buycom_db TO buycom_user;

3. Set up FastAPI:

  • Create a new directory for your FastAPI project and navigate into it:
mkdir fastapi_project cd fastapi_project
  • Create a virtual environment and activate it:
python3 -m venv venv source venv/bin/activate
  • Install FastAPI, SQLAlchemy, and the PostgreSQL adapter:
pip install fastapi[all] sqlalchemy alembic psycopg2
  • Create your FastAPI app in a Python file (e.g., main.py) with your database models and routes.

4. Configure Database Connection:

  • Update your FastAPI app to connect to your PostgreSQL database using SQLAlchemy.

 

5. Run FastAPI:

  • Start the FastAPI server with Uvicorn:
uvicorn main:app --host 0.0.0.0 --port 8000 --reload

Install Flutter (Recommended :Flutter Version 3.16.8-stable)

BuyCom app is supported on MacOS and Windows.

  • On MacOS, you can build apps on both iOS and Android.
  • On Windows, you can build apps on only Android.

Go to this link to download and install Flutter as follows:

1. Select an operating system

2. Follow the guide “Get the Fullter SDK” and “Android Setup” in the link step by step to install Flutter.

Set dart version compatible with flutter Version 3.16.8-stable


environment:
sdk: '>=2.19.0 <3.0.0'

Extracting the zip file of source code

After purchasing BuyCom app on Codecanyon.

Please make sure you purchase BuyCom App
Because our app is protected by licenses of Envato. One purchase code is used for one website/domain.

Extracting the zip file of source code, open it with Android Studio.

Compiler Setup

  • Open project in Android Studio/Xcode
  • Pub get yaml
  • Open WP WooCommerce
  • Do change as in Settings and Advance
  • Copy and integrate it into App Code

Update Package

  • Open the project in Android Studio/Xcode.
  • In Xcode, change the package name easily.
  • For Android, change the ID in the Gradle file, Manifest, MainActivity, and folders.
  • Clean the project.

Extracting the zip file of source code

  1. Head to the file pubspec.yaml  >  select pub get or Packages get (or Get dependencies) to install the required libraries.
  2. Open IOS/Android simulator.
  3. Press the run button (green play icon) to start the project. (you can open multi simulator at the same time)

If you have any problems with Flutter Installation, check guide Common Issues💥 to find solutions to fix issues.

Login Integration

  • Open project in Android Studio/Xcode 
  • Setup new project in Firebase
  • Enter your company unique Id for both Android /IOS 
  • Get Google file and paste it into project 
  1. Firebase Setup:
    • Register app in Firebase.
    • Add Support email in Firebase Console under Project Settings > General.
  2. Authentication Setup:
    • Enable “Phone Authentication” login options in Firebase Console under Authentication. 
  3. Configuration Updates:
    • Update Facebook IDs in Android’s string.xml file and iOS’s Info.plist key “FacebookAppID”.

For Android:

  • Get google-services.json file from Firebase Console and place it in “/android/app”.
  • Generate keystore and obtain SHA1 from Gradle SigningReport.
  • Paste SHA1 to Firebase “project/setting/general/android app/SHACertificateFingerprint”.

For iOS:

  • Get GoogleService-Info.plist file from Firebase Console and place it in Xcode project “/ios/Runner”.
  • Copy REVERSED_CLIENT_ID from GoogleService-Info.plist and paste it into Info.plist.

Change Project Name & Icon

For Android:

  • Go to Android drawable folder and replace icons
  • Open Android project and go to manifest and change appname

For IOS:

  • In Xcode, change app name easily
  • To change icon, get icon “AppIcon.appiconset”  folder from any iOS assets software and change accordingly

For App:

  • Go to BuyCom code “/lib/utils/consts.dart” file and change Appname accordingly
  • Go to BuyCom code “/assets/logo.png” and replace logo.png file accordingly

Release

Install App Now

App is available for testing on GooglePlay and AppStore

Note

If you don’t want to spend time in integration and save time you can also contact us and we serve as freelancer to integrate your project in short time with everything working .

Extra Docs Help

For help getting started with Flutter, view online documentation(https://flutter.dev/docs) which offers tutorials,samples, guidance on mobile development, and a full API reference.