- Have an online dropshipping shop based in Portugal running as a static site through amazon S3
- Generating at least enough revenue to be self-sufficient(Covering domain, hosting, advertising, and content creation).
- Collect emails for newsletters(mailchimp).
- Traffic will come through facebook and adwords
- Blog for organic traffic, however, some articles will be optimized for conversions(sales or newsletter signups) and also be facebook/adwords campaigns.
- Very little maintenance and attention required
Possible expected pitfalls
- Since I will be dropshipping, it might require some custom scripts to communicate to with the dropshippers, which may require a server, but it would be 100% only for customers that checkout, which isn’t so bad.
- Portuguese bureaucracy
- Customer trust
Step 1) The website
Since I want to avoid having a “back-end” mostly to cut down on costs of a server, all standard e-commerce platforms are out of the question, prestashop, magento, etc. I could heavily cache them, but I wanted to face the challenge of using a static site generator.
I chose Hugo, and I wrote some scripts in PHP(I could rewrite them in Go, for reasons) to import products from an XML provided by a dropshipper I decided to test with.
I didn’t use data files because at the time of writing I was quite limited on what I could do with them when it came time to paginate. So each article is a post of the archetype “product”.
The site is on Amazon S3, served through cloudflare with “flexible SSL”, meaning I have HTTPS for free, which is nice.
I used snipcart.
Which means I can have my users checkout without having any server logic on my side, neat!
I wrote some scripts to import products from different providers, just means I need to make a class for each provider’s specific system.
Since there is no backend, the products array hold the IDs of the products I want to import, and tells Hugo if I want them in the carousel and/or featured. (I removed the carousel and will later test how it performs, but generally they perform badly).
The image resizing was needed as images came from the provider absolutely huge(5MB+).
A lot of things are still hardcoded and not very re-usable, didn’t want to spend much time/effort on a dropshipper I wasn’t gonna use(makes no sense to have descriptions in German when the store is in Portugal).
I could also extend a parent class with some shared methods.
This writes files named after the product ID to the products directory, and all the information is in JSON format.
I could also separate the data from the logic by placing the product IDs into a JSON file, and could have a Lambda function on AWS import whenever the file is updated(just an idea).
I got an “e-commerce” layout for free from w3layouts, and made it into a hugo theme, I didn’t like some things about it, so I spent a bit more time than I wanted on customization, the blog was also not part of it initially, so I had to make that too.
(One of the images has a black background because my image importer/resizer doesn’t take into account the filetype, so what happened was a png image was turned to jpeg without taking into consideration the alpha channel, details to be taken care of later).
And added the blog section:
I get all my images from Pexels.
I run the import scripts, the product files are created, I then run the
hugo command, and deploy the results to S3 using
s3_website ruby gem. (all these commands are in a single shell script so all I have to do is run
Stay tuned for “part 2) Finding a dropshipper”, by subscribing to my mailing list.