StretchShop

StretchShop is a fast and scalable e-business solution. Or you can call it an e-shop. The mission is to create a modern, open-source base for online business.

Why StretchShop?

  1. It’s scalable - that means, it can fit your business, whether it’s small, growing, or big.
  2. Speed - thanks to used technologies and models it is really fast.
  3. Easy to use - introducing 4 roles, we try to improve usability.
  4. Saves money - it’s open-source. And if you need customization, our front-end licenses are simple and not expensive without the need to subscribe with a lifetime license per domain. With knowledge of JavaScript, one can customize both - the back-end and front-end.

Software Included

Package Version License
NodeJS 18 MIT
MongoDB 6 Server Side Public License (SSPL)
Nginx 1.22 2-clause BSD
PM2 5.2 GNU-AGPL-3.0

Creating an App using the Control Panel

Click the Deploy to DigitalOcean button to create a Droplet based on this 1-Click App. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account.

Deploy to DO

Creating an App using the API

In addition to creating a Droplet from the StretchShop 1-Click App using the control panel, you can also use the DigitalOcean API. As an example, to create a 4GB StretchShop Droplet in the SFO2 region, you can use the following curl command. You need to either save your API access token) to an environment variable or substitute it in the command below.

curl -X POST -H 'Content-Type: application/json' \
         -H 'Authorization: Bearer '$TOKEN'' -d \
        '{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image": "stretchshop"}' \
        "https://api.digitalocean.com/v2/droplets"

Getting Started After Deploying StretchShop

Your StretchShop droplet should be running preconfigured on your IP http://your_droplet_public_ipv4 with some demo data. The very first step to do should be log-in with the default login admin and password az09bycxdw and change your password to a strong and secure one. After that, you can change the settings of your StrechShop - name, delivery and payment methods, translations, and more.

Now to make it work on your domain and accept online payments you need to:

1. Buy the domain and point it to your droplet.

For more information about how to point your domain, see DigitalOcean documentation

https://docs.digitalocean.com/tutorials/dns-registrars/

https://docs.digitalocean.com/products/networking/dns/quickstart/

Please notice, that DigitalOcean is not selling domains itself.

2. Secure your domains

You should get a certificate that protects communication between your shop and customer - see information about the free way how to do it at https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04

3. Set up your online payments

Once you have your domain set and secured, you can move to the next step. If you want to make online payments work on StretchShop, there are two predefined options - Stripe (https://stripe.com/) and Paypal (https://www.paypal.com/). You have to register on these payment services so people that buy on your e-shop could send you money. Once registered, you need to get specific keys for your StretchShop instance to link it to your Stripe and PayPal accounts. How to find these codes/keys:

https://support.stripe.com/questions/locate-api-keys-in-the-dashboard

https://www.paypal.com/merchantapps/appcenter/streamlineoperations/apicredentials

Notice - don’t give these keys to anybody, as you don’t give your own keys.

4. Let StretchShop know your payment keys

Write them to “EVN” file located on your droplet.

  • to log into your droplet, open the terminal, and write

$ ssh root@your_droplet_public_ipv4

  • once you’re in your droplet, go to the StretchShop app directory

$ cd /opt/strechshop/

  • open file .env writing in terminal

$ nano .env

Find Stripe and Paypal variables (STRIPE_PUBLISHABLE_KEY, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_ENDPOINT_SECRET and PAYPAL_CLIENT_ID, PAYPAL_SECRET) and set them to yours. Change the related environment variables (STRIPE_ENV and PAYPAL_ENV) according to how are you going to use this droplet (for testing only or if it is production/live).

5. Setup emails

To send and receive emails (about registration, orders and payments), you need to edit related variables in .env file.

EMAIL_DEFAULTS_FROM="YourShopName support" <[email protected]>
EMAIL_DEFAULTS_SUBJECT='YourShopName - '
EMAIL_SMTP_HOST=smtp.yourdomain.tld
EMAIL_SMTP_PORT=587
EMAIL_SMTP_SECURE=false
[email protected]
EMAIL_SMTP_AUTH_PASS=yourPassword
EMAIL_SMTP_CIPHERS=SSLv3