Building a Real-time Live Polling System with Remix Frontend and Rails API Backend

Table of Contents Introduction Setting Up the Project Designing the Data Model (Rails) Building the API Endpoints (Rails) Setting Up WebSockets (Rails) Remix.js Frontend Setup (Remix.js) Implementing API Integration in Remix Real-time Updates with WebSockets in Remix Conclusion: Reflecting on Our Live Polling System 1. Introduction WebSockets: The Real MVP of Real-Time Web Apps Today, we’re exploring the world of WebSockets. If you’ve ever wondered how modern web apps achieve that smooth, real-time feel, you’re in for a treat....

August 1, 2024 · 28 min · 5953 words · Fernando Mendez

WebSockets with React, Redux, and Ruby on Rails

Note: all the code for this post can be found here(frontend) and here (backend/rails) Let’s explore how to integrate Rails ActionCable functionality (WebSockets) with a basic chat application using React and Redux (via Redux Toolkit). I’m only including the most relevant snippets of code, please refer to the code in the repo for the entire context. Backend Since I’m using rails as an API endpoint, I’ll create the app using the --api flag....

January 8, 2022 · 7 min · 1431 words · Fernando Mendez

Exploring Program Derive Addresses (PDA's) with Solana, Anchor and React

Note: As of the time of this writing (Monday, December 13, 2021), Solana’s testnet environment (faucet/airdrop) seems to be having issues. Please select the devnet on the selector (or just don’t change it, since is the default value). Remember to change your wallet to point to the devnet network. Note: all the code for this post can be found here. There’s a demo here showcasing the concepts in this post....

December 13, 2021 · 7 min · 1411 words · Fernando Mendez

Building a simple on-chain point of sale with Solana, Anchor and React

Note: All the code for this post can be found this github repo. A few days ago, I started playing with the Solana blockchain. I was initially interested because it was built on rust (I freaking love rust!). To explore it, I decided to build a basic point of sales (POS) for event tickets. I initially started reading the code on the Solana Program Library and experimenting but decided to go with Anchor just get started building something more quickly....

November 26, 2021 · 8 min · 1588 words · Fernando Mendez

Rust adventures - Async - Part 1

A while ago I realized that I was a visual learner which can be frustrating at times since some concepts might take me a bit longer to fully understand until I create the proper mental image(s) for it (or somebody else does it for me). When I started wrapping my head around Async programming in Rust I felt like I was missing some of those images. What follows is my attempt visualize the concepts around async programing....

February 13, 2020 · 3 min · 614 words · Fernando Mendez