In this episode, we're starting to set up the concept of rooms in our app—think something like channels in a chat application. We introduce presence channels, which are like private channels but with the extra feature of showing you who else is currently connected.
We don't go all the way into building a chat here (that would be a whole different course!), but we do set up the structure so we can see people come and go in different rooms. The walkthrough includes creating a simple Room
model and database migration, giving each room just a name for now. Then, we quickly generate a couple of rooms using the factory and pop them into the database.
Next, we whip up some routes and views, so you can head to /room/1
or /room/2
and actually see each room in the browser—super simple for now. In the views, we get ready to show the room name and a list of connected users, which will come to life in the next steps.
By the end of this episode, we have all the basic groundwork and templates ready to start tracking who is in each room. From here, we're all set to start adding the real-time user presence features!