Getting started - MongoDB
1. Clone the Repository
Clone the ShopiFast repository:
git clone https://github.com/adibmed/shopifast-mongo.git
cd shopifast
2. Install Dependencies
Install the dependencies using Yarn or favorite package manager:
yarn install
3. Start Docker Containers (Optional)
Launch the necessary Docker containers to spin up the a Postgres DB.
docker compose up -d
4. Set Up Environment Variables
Copy the example environment file and configure it:
cp .env.example .env
Open the .env
file and update the variables as needed.
MONGO_URL=mongodb://default:secret@localhost:27017/
MONGO_DB_NAME=shopifast
5. Run Database Seeder
Seed the database with plans (required for install creation) and coupons (for development):
cd web/backend
yarn db:seed:dev
6. Create a Shopify App
There are two ways to create a Shopify app:
-
Using the Partners Dashboard: If you prefer to create your app through the dashboard, follow this guide.
-
Using the Shopify CLI (Recommended): To create your app via the CLI, follow these steps:
- Run the following command:
shopify app config link
- When prompted, select
Yes, create it as a new app
and enter a name for your app.
7. Start the Development Server
Launch the development server:
yarn dev
8. Select Development Store
When prompted, select your development store where you want to install and test the app. If You don't have a dev store follow this guid to create development store.
9. Expose the App to the Internet
To preview your app on a dev store, it must be accessible online. You have two options:
-
Let Shopify handle it (recommended): Shopify uses Cloudflare Argo Tunnel. A new URL is generated each time you run the app. When prompted, select
(y) Yes, automatically update
to let Shopify handle app exposure. -
Use your own tunneling service (e.g., Ngrok):To use your own tunnel, select
(n) No, never
. Then, update the URLs in theshopify.app.toml
file with your tunnel URLs.
If using Shopify's method, skip the step of updating URLs.
Conclusion
Congratulations! You've successfully set up the ShopiFast boilerplate. Your Shopify app is now running locally and connected to your development store.