Friday, September 5, 2025

Waviz Project: Building a Visualizer Without External Libraries

 Back in the day, music visualizers were magic. Whether it was the old Windows Media Player or Winamp, watching sound morph into motion felt like stepping into another dimension.

But somewhere along the way, the magic faded. Visualizers became rare, often tucked away in outdated software or bloated libraries with 100 dependencies.

So when our team set out to build Waviz, we had a simple but bold goal:
Bring back real-time, reactive music visuals — but this time, with no dependencies, full creative control, and real performance.

And we’d do it with just Canvas and Web Audio API.

Vision

Waviz isn’t just a tool — it’s a playground. We wanted to make a system that empowers both:

Tinkerers who want to dig deep into audio signals and manipulate visuals on a granular level, and Casual devs who just want to drop in a component and watch the beat come alive.

To do that, we split our architecture into two layers:

  1. Core Engine (vanilla JavaScript): A zero-dependency rendering engine built with the Canvas API and Web Audio API.
  2. React Wrapper: Plug-and-play components for rapid integration, touch interaction, and style presets.

But this post is about the heart of it all — how we made particles dance to your music with just Canvas.

What Can You Draw with Just Canvas?

We didn’t use D3.

We didn’t use P5.

Just <canvas> and raw pixels.

Canvas gave us:

  • Hardware-accelerated performance
  • Low-level drawing control
  • Freedom from the DOM

This meant we could render hundreds of particles per frame, animate with full control, and never worry about framework overhead. The core of Waviz operates by using clearRect() to reset the canvas each frame, initiating a new drawing path with beginPath(), rendering each particle or visual element with roundRect(), and applying color with either fill() or stroke().

All of this is powered by the CanvasRenderingContext2D API, with physics-inspired properties like globalAlphagravity, and velocity—all implemented in vanilla JavaScript, no graphics libraries attached.

Drawing Dots in React with Waviz

Our dots() method takes in a 2D array of data points (usually derived from audio) and plots them as smooth, rounded rectangles — a.k.a., dots.

dots(data: number[][], samples: number = 100) {
const sampling = Math.ceil(data.length / samples);
for (let i = 0; i < data.length; i += sampling) {
this.ctx.roundRect(data[i][0], data[i][1], 1, 1, 1000);
}
}

Each dot is placed using roundRect() — which creates a rectangle with extremely curved corners, making it appear circular. This method is surprisingly powerful: it gives each data point a subtle, smooth presence on the screen.

Building Particle Systems with Physics

Waviz builds particles using a lightweight internal class called particle. It tracks attributes like position, velocity, gravity, and lifespan—updating and redrawing each one every frame.

Here’s the simplified structure:

class particle {
canvasSize: number[];
position: number[];
velocity: number[];
gravity: number;
live: boolean = true;
born: number = frame;
update(): void {
// Update velocity
this.velocity = [this.velocity[0], this.velocity[1] + this.gravity];
// Update position
const x = this.position[0] + this.velocity[0];
const y = this.position[1] + this.velocity[1];
this.position = [x, y];
}

Every few frames, new particles are “born” from real-time audio data. Then they:

  • Fall based on gravity
  • Move with random initial velocity
  • Die once they leave the canvas or exceed lifespan

And during each render frame:

if (this.particleSystem) {
this.particleSystem.forEach((e, i) => {
// Set lifespan
if (frame - e.born > lifespan) {
e.live = false;
}

// Update and kill particles
if (e.live === true) {
e.update();
} else if (e.live === false || this.frame - e.born > 1) {
this.particleSystem.splice(i, 1);
}

// Draw Particle
this.ctx.roundRect(e.position[0], e.position[1], 1, 1, 1000);
});

We don’t rely on any animation frameworks — everything is pure Canvas API.

Canvas, Reimagined

From dots that pulse to particles that dance, everything you see in Waviz is drawn with just one humble tool — the HTML canvas. But behind that simplicity lies intention: a commitment to creative freedom, low-dependency rendering, and visuals that feel alive.

Whether you’re a developer looking to fine-tune visuals with raw audio data, or a hobbyist just looking to plug in and vibe, Waviz was built for you. It’s modular, lightweight, and ready to be hacked, customized, and reimagined.

So go ahead — drop a beat, spin your favorite track, and see what sound looks like.

Check out our documentation and presets at https://wavizjs.com

Star us on GitHub: https://github.com/Waviz-Team/Waviz

Built with love by the Waviz Team. Contributions welcome.

Sunday, October 20, 2024

Cloud Project: Azure and AWS connection through VPC

Project Title: Multi-Cloud Architecture for Fintech Firm

10/19/2024 - 11/3/2024

Objective: This capstone project was completed independently as part of my cloud engineering bootcamp. The objective was to design and implement a multi-cloud architecture using Azure and AWS to allow secure communication between resources without exposing data to the public internet. This project aimed to demonstrate my proficiency in cloud infrastructure, network security, and multi-cloud solutions.


Scenario: A fintech firm has a global clientele. To ensure the availability of its services, the chief solutions architect has suggested keeping the services running on a multi cloud environment. They want to deploy app resources in Azure and AWS and allow them to communicate with each other without exposing them to public access as the data on these resources will be confidential and should not be compromised. Create an architecture and the step by step guide to provide a solution for this scenario.


Technology Stack:

Azure VPN Gateway, AWS VPN Gateway, EC2, Virtual Machines, Azure Local Network Gateway, AWS Customer Gateway, Site-toSite VPN

-----------------------------------------------------------------------------------------------------------------------------------------------------

As the sole contributor to this project, I was responsible for every aspect of the design, implementation, and deployment of the multi-cloud architecture. My responsibilities included:

- Requirement Analysis: Identified the key requirements for secure, cross-cloud communication for a fintech application.
- Network Design: Developed the architecture for secure communication between Azure and AWS using site-to-site VPN.
- Configuration and Implementation: Set up Azure Virtual Machines (VMs) and AWS EC2 instances, and configured Azure VPN Gateway, AWS VPN Gateway, Customer Gateway, and Local Network Gateway for encrypted traffic.
- Network Security: Applied security rules, managed routing tables, and ensured compliance with industry standards for data protection.
- Testing and Validation: Independently tested the setup to ensure that communication between the two environments was secure and encrypted, with no exposure to the public internet.


Architecture Diagram https://drive.google.com/file/d/1a412QmA8BEcwshZJUcdXTqj_JEgPc1Wu/view?usp=drive_link











Step 1: MMulti-Cloud Environment Setup

  • The project involves setting up a multi-cloud environment for a fintech firm that serves global clients. The services need to run on both Azure and AWS cloud platforms, and the two environments should be able to communicate securely without exposing any resources to the public internet due to the confidential nature of the data.

Step 2: Azure Network Setup

  • Azure Virtual Machine (VM): Deploy a VM within an Azure virtual network (VNet)
























  • Azure VPN Gateway: Set up a VPN Gateway to handle the secure communication between the Azure VNet and the external AWS network. This gateway will handle the encrypted traffic across the site-to-site VPN.

















  • Create a Azure Gateway subnet















  • Azure Local Network Gateway: Configure the Local Network Gateway, which holds the information about the external network (in this case, AWS). This defines the AWS VPC's public IP address and IP range, enabling Azure to understand where it is connecting.























Step 3: AWS Network Setup

  • AWS EC2 Instance: Deploy an EC2 instance within a Virtual Private Cloud (VPC) in AWS.











  • AWS Customer Gateway: Set up a Customer Gateway in AWS to hold the information about the external network (Azure). This is similar to the Azure Local Network Gateway and enables AWS to recognize the Azure VPN.





















  • AWS VPN Gateway: Configure a VPN Gateway to establish and manage the secure VPN connection between the AWS VPC and the Azure network.




































Step 4: Establish Site-to-Site VPN Connection

  • Establish a site-to-site VPN between the Azure VPN Gateway and the AWS VPN Gateway. This will create an encrypted connection between the two cloud environments (Azure and AWS), allowing the two networks to securely communicate.
  • The site-to-site VPN connection ensures that sensitive data does not traverse the public internet and is fully encrypted while traveling between the two clouds.


























































Step 5: Configure Routing and Security Rules

  • On both Azure and AWS, update the routing tables and network security groups (NSGs) to allow traffic over the VPN. Ensure the correct IP ranges are used for both sides to route traffic between the cloud platforms.
  • On Azure: Add routes to allow traffic destined for AWS over the VPN Gateway.
  • On AWS: Add routes to allow traffic to Azure using the VPN Gateway.













































Step 6: Deploy Application Resources

  • Deploy the necessary application resources in both Azure and AWS. The resources can communicate securely through the VPN connection, allowing the multi-cloud architecture to function as a unified system without exposing sensitive data to the internet.



























Step 7: Test and Validate the Connection

  • Test the setup by initiating traffic between the Azure and AWS environments. For example, ping the EC2 instance from the Azure VM to verify that the VPN connection is functioning correctly.
  • Ensure that all data transfer is secure and that neither side is exposed to public internet traffic.
































Step 8: Monitor and Manage the Environment

  • Set up monitoring and logging in both Azure and AWS to track the performance and health of the VPN connection.
  • Regularly check the VPN Gateway logs for any errors or unusual activity and monitor the performance of the deployed applications in both cloud environments.

Saturday, October 19, 2024

Cloud Project: Deployment of Multicloud App

 Project name: Deployment of Multicloud App

Objectives: To deploy a multicloud app using two load balancer setups on AWS and Azure platforms

Skills: AWS, Azure, High Availability, Cloud Architect


Scenario

A logistics company wants to ensure high availability for its end users using their web application which can be accessed from anywhere in the world. Since the web application gets huge traffic everyday, the company cannot afford to have any downtime. So they have decided to deploy the web application on two cloud platforms to maintain resiliency.


Create an architecture and the step-by-step guide to provide a solution for this scenario.


Object:

Deploy the web application on both AWS and Azure so that if one platform experiences downtime, the application remains available on the other


Diagram









Step

1. Set up Azure VMs (VM1, VM2)







2. Set up AWS EC2 instances (two)











3. Set up Window web servers (4)
















4. Azure Load Balancer setup










5. Azure Traffic manager setup








 






6. Health Check and Test



Waviz Project: Building a Visualizer Without External Libraries

  Back in the day , music visualizers were magic. Whether it was the old Windows Media Player or Winamp, watching sound morph into motion fe...