My Website | Was It A Good Idea?
Summary
I have split this post into two parts. The first is what the website does, and why I decided to build those features. The second will be the specific technologies that I used to build them. Part one will hopefully be useful for everybody, but if you are not particularly interested in tech, feel free to skip part two!
Is It A Good Idea?
Not for the most part, no. If your goal is to have a beautiful website and to sell books, going with third party solutions is categorically the better option. Having full control over the website has certainly given me some flexibility that storefront providers do not offer, but it's nothing game-changing.
Here are a couple of benefits of DIY:
- It is totally free to build and run (except for my time — see bullet-point below).
- I am insulated from third-parties increasing their fees, or going out of business.
- It is a great way to feel like I'm working on my writing, when I am actually just procrastinating.
- If you're the right kind of nerd, it is fun and interesting.
- I don't have to coordinate different systems manually (emails, booking shipping, handling eBooks, etc).
And some drawbacks:
- If it doesn't work, I have to fix it myself.
- Although it does not take as long as you might think, it does take a lot longer than buying an off-the-shelf solution.
- It is a great way to feel like I'm working on my writing, when I am actually just procrastinating.
- At the scale at which most indie authors operate, the daily costs of running a system that is provided entirely by third-party platforms are much less than the cost of a cup of coffee, so although I am saving money, it is negligible.
Features
Overall Design
This website is entirely built by hand. I mainly did this because it was fun (for me), and interesting (for me). Having said that, I had to rely heavily on my very talented friends for the aesthetics of the site. I would like to think that I am a decent writer, but I am not an artist. I love how the site looks, but if I had not had that support, it would have looked better as a SquareSpace/Wix template.
The website is free to run. Many hosting companies provide a 'free tier' for websites that are relatively small, and these are often very generous.
E-Commerce
Aside from the homepage as a showcase of me and my work, the main function of the site is to allow people to actually purchase books. I will not cover why I decided to sell my books through my own site rather than on Amazon, since far more experienced people have already written some great pieces on the topic. As it stands, the e-commerce part of the site contains the following user-visible features:
Payment
Payment via credit cards, or digital wallets like Apple Wallet and Google Wallet.
Shipping Options
- Dynamic shipping options, so the options given can change based on shipping destination, type and number of products, etc.
- 'Special' shipping options. These are tied to discount codes, and allow me to offer 'Collection' as a shipping option, as well as 'Consignment'. The latter is useful if a book-club wants to read the book: I can give them a code that opens up a 'Consignment' shipping option, meaning that I will send all of the books in one shipment to the secretary of the book-club, rather than individual members all paying for shipping.
- Automated handling of international shipping.
Some of this is unnecessary, specifically the 'Special' shipping stuff. I enjoyed solving the problem of designing and implementing it, and it has certainly removed some friction for a few people in a few cases, but it is not a game-changer.
Discount Codes
Discount codes are supported in a very configurable way. Specifically, I can support:
- The percentage discount.
- To which products they apply.
- Whether or not they grant free shipping (and if so, to which countries).
- A maximum number of uses for the code.
- A time period before/after which the code is invalid.
- Codes that are only valid at certain events (more on this in a future post).
- Codes can be stored in digital wallets (Apple Wallet, Google Wallet).
Emails
- Automated emails (order received, order despatched etc).
Most of these features are useful. The event-based discounts and the digital wallet integrations are a bit of a gimmick, but I enjoyed building them.
Behind The Scenes
- Automated shipment management with Royal Mail. The system will automatically set up a shipment when an order is placed, populate the recipient address, etc. If the shipment is international, it will also populate all relevant customs documentation. All I have to do is pay for the shipping, print the label, and stick it onto the parcel.
- An Android app that I cobbled together, allowing me to manage all of this from my phone. Once I post a parcel, I mark it as despatched in the app, and customers receive an email telling them that their order is on the way.
The shipment management is genuinely helpful, it saves a lot of time, and prevents me inevitably mistyping people's names and addresses.
EBooks
It probably will not surprise you to learn that I made the eBook version of Venus In Chains by hand. When an eBook is ordered, the website will:
- Take payment.
- Create a custom version of the file for the purchaser (stamped with their name and order number - this is for 'social DRM', about which I will write a post soon).
- Email them a link to download the file.
- Store the information required to recreate the file, so that they can re-download it in the future should they ever lose the file.
Tech Stack
Infrastructure
Host: Google (GCP)
Hosting solution: Firebase
Storage: NoSQL (Firestore)
Transactional email provider: Resend
General email provider: Hostinger
Domain Registrar and DNS: Cloudflare
Implementation
Payment provider: Stripe
Language: TypeScript
Framework: Next.js + TailwindCSS
Blog posts: MDX
