an E-Commerce Project

First Look at Single Page Application

The start-up where I applied my frontend skills had taken on a fairly large project. Our client, a Cakes and Bakery business, already had a website and wanted to add more functionality than just information and links to buy product.

Our team then envisioned a solution: building an e-commerce platform. Visitors can add products to their cart, checkout, and make payments, just like on a typical e-commerce website. That's why I consider this was a big project.

After discussing the list of features, our friend, the UI/UX designer, created a mockup or hi-fi design. "It can't be done with simple technology; a PHP web application with CodeIgniter seems difficult to split. Something new is needed." I thought. Although, thinking back now, it could actually work. Suddenly, I remembered Vue, a JavaScript framework that seems suitable for this project. I wanted to try.

I did some research on YouTube to find out what the backend should be like if we use Vue. I had heard about Laravel + Vue but didn't know much about it. Besides, my backend friend usually uses CodeIgniter 4, so I ignored it. I found a tutorial on VueJS & CodeIgniter 4, which is a perfect fit.

"It turns out that the frontend can indeed be separated from the backend, with data exchange via APIs. Tokens are needed for security; this is completely new to me!"

Boldly, I suggested to my friend that we try something new for this project. I explained the idea, and since my colleague had just heard the term REST API, I needed to provide that tutorial.

The two of us continued learning: I delved deeper into Vue, while my friend explored how APIs work, since the framework they usually used sent HTML to the browser.

I was assisted by two other programmers. They created components so I didn't need to make everything. I converted those components into Vue Single-File Components. Implementing global state management using Vuex. Added Navigation Guard to protect admin resource. Many pages to build.

The Tech Stack

This website used the following tech stack:

Tailwindcss can helped us to do styling faster, highly customizable and it's also suitable with Vue.

Some Parts of The Web

Screenshot 1
Landing Page
Screenshot 2
Login Popup
Screenshot 4
Checkout Page

Valuable Lessons

I will start with the problem.

This project did not meet the client's expectations.
It was a hard blow for me as a developer.

There's just one thing I can share: I found out midway through development that SPAs were not really meant for SEO. I needed to do pre-rendering or implement SSG/SSR, and Nuxt was a shorter path if we want to migrate. SEO was an important aspect that this website should have had.

Lessons I got from the project are:

  • Good developers are willing to sacrifice their time early and as wisely as possible.
    I did not give my best effort.
  • Telling REST API to my friend, was a relaxing experience. I believe it will help him in his web development journey out there.
  • Requirements may change, but asking early feedback from the client is highly recommended. Pay attention to both functional and non-functional requirements. Does the technology support these? Later on, it could be like my case where it was not SEO friendly.