In this blog post, we will dive deeper into the technical details of how we implemented our customer loyalty system at The Big C. We will explain how the ESP32 and RFID reader work together to collect and transmit customer data, how Svelte and Cloudflare were used to build the backend and frontend of the system, and how the system is able to track customer loyalty points and provide personalized rewards.
Additionally, we will discuss the benefits and limitations of using these technologies and how we overcame any challenges we faced during the development process.
Overall, our goal with this blog post is to provide insight and inspiration for other businesses looking to implement similar customer loyalty systems.
How it works
When a customer scans their student card at The Big C, our system automatically updates their loyalty points in real-time. The RFID reader reads the customer's card, sending the data to the ESP32 microcontroller which then sends it to our cloud-based backend. This backend, built with Svelte, processes the data, and updates the customer's loyalty points in a database hosted on Cloudflare.
Customers can check their loyalty points and rewards status by scanning their cards, they will be shown how many points they have and how many more they need to redeem a reward.
Our system is designed to be easy to use for customers and administrators alike. The customer can easily earn and redeem rewards, and the administrator can easily manage the system using the frontend interface built with Svelte. The Cloudflare hosting ensures that the system is fast and secure for customers all over the world.
ESP32 and RFID
Hanne Verschueren was responsible for the IoT side of the project, specifically for the implementation of the ESP32 and RFID reader.
The ESP32 and RFID reader are the backbone of this customer loyalty system. The ESP32 is a low-cost, low-power microcontroller that we chose for its built-in Wi-Fi capabilities and its ability to easily integrate with other devices. The ESP32 reads the data from the RFID reader, which is used to scan the student cards that serve as loyalty cards.
The RFID reader is a device that uses radio waves to read the data stored on RFID tags or cards. The reader sends out a radio frequency that is picked up by the RFID tag, which then responds with its unique identification number. This identification number is then transmitted to the ESP32, which in turn sends it to the cloud for processing.
The ESP32 is responsible for communicating with the RFID reader and sending the data to the cloud. We used the ESP32's built-in Wi-Fi module to connect to our network and send the data to the cloud. This allows us to track customer loyalty points in real-time and provide them with personalized rewards as soon as they scan their card.
In addition to its Wi-Fi capabilities, the ESP32 also has a large number of digital and analog input/output pins, which allowed us to easily connect other devices such as LEDs or a buzzer to indicate a successful scan.
Overall, the combination of the ESP32 and RFID reader allowed us to create a reliable and efficient system for collecting and transmitting customer data, making it the perfect solution for our customer loyalty system.
Pros and cons of using an ESP32
Pros of using ESP32:
- ESP32 is a low-cost, low-power microcontroller that is ideal for IoT projects.
- ESP32 has built-in Wi-Fi capabilities, which makes it easy to connect to the internet.
- ESP32 has a large number of digital and analog input/output pins, which allows for easy integration with other devices.
Cons of using ESP32:
- ESP32 is not as widely supported as other microcontrollers, which may make it more difficult to find development resources or libraries.
- ESP32 may have limitations in processing power, memory and storage compared to other microcontroller, which may not be suitable for certain projects with high computational demands.
Svelte and Cloudflare
Svelte and Cloudflare played important roles in the development of our customer loyalty system.
On the other hand, Cloudflare is a Content Delivery Network (CDN) that provides fast and secure hosting for web applications. We used Cloudflare to host our loyalty system, ensuring that our customers have a fast and reliable experience when using it. Cloudflare's global network of data centers allows us to serve the loyalty system to customers all over the world with low latency. Additionally, Cloudflare's security features such as DDoS protection and SSL/TLS encryption helped us to secure the system from potential threats.
Moreover, Cloudflare Workers, a serverless platform, allowed us to run our code on Cloudflare's edge network, providing a fast and secure way to handle the customer's data, and also enabled us to perform advanced functionality such as routing, caching, and worker-side logic.
Overall, Svelte and Cloudflare were a perfect combination for our customer loyalty system, allowing us to create a fast and secure system that can be easily managed by administrators from anywhere in the world.
Pros and cons of using Svelte
Pros of using Svelte:
- Svelte is known for its small bundle size and fast performance, making it ideal for building web applications.
- Svelte has a reactive model, which allows for efficient updates and rendering of components, improving the overall performance of the application.
- Svelte also has a built-in store management, which makes it easy to handle the state of the application.
Cons of using Svelte:
- Svelte is a relatively new framework, so the community and resources available are not as extensive as other popular frameworks like React or Angular.
- Svelte is not as widely adopted as other frameworks, so it may be more difficult to find developers with experience in Svelte.
Pros and cons of using Cloudflare
Pros of using Cloudflare:
- Cloudflare provides fast and secure hosting for web applications, ensuring that customers have a fast and reliable experience when using the system.
- Cloudflare's global network of data centers allows you to serve the application to customers all over the world with low latency.
- Cloudflare offers a wide range of security features such as DDoS protection and SSL/TLS encryption, which can help to secure the system from potential threats.
- Cloudflare Workers allows you to run your code on Cloudflare's edge network, providing a fast and secure way to handle the customer's data.
Cons of using Cloudflare:
- Using Cloudflare can add an additional layer of complexity to the system, and may require additional setup and configuration.
- Cloudflare's services can be expensive for high-traffic sites, and may not be cost-effective for small projects.
In conclusion, we have outlined the technical details of how we implemented our customer loyalty system at The Big C. We have explained how the ESP32 and RFID reader work together to collect and transmit customer data, how Svelte and Cloudflare were used to build the backend and frontend of the system, and how the system is able to track customer loyalty points and provide personalized rewards.
We have highlighted the benefits and limitations of using these technologies, and discussed how we overcame any challenges we faced during the development process. Our goal with this blog post was to provide insight and inspiration for other businesses looking to implement similar customer loyalty systems.
Overall, we believe that our new customer loyalty system is an effective way to reward loyal customers at The Big C. By leveraging advanced technologies, we were able to create a reliable and efficient system that can easily be managed by administrators from anywhere in the world. We hope that this system will help The Big C build stronger relationships with their customers and encourage them to keep coming back.