Sitecore hackathon
February 29 - 02:00 AM local time. Way too early to get up on a Saturday morning, but it's that day of the year again: the annual
Sitecore hackathon day! 82 teams from 23 countries this year, and we -BeeGhentle- are one of them.
It will be my 5th participation, 6th if you count the one were I abandoned sick as well. I've had various results over those years: complete failure, submissions, almost-submissions and one victory. But each year we learned a lot and had fun. And that is what the hackathon is about.
Of course it is also about creating an open source application and getting ideas, examples (and maybe modules) out in the community. With a bit of time pressure as you get 24 hours straight to finish, and a little competition as well to make it even more exiting.
Learning
As mentioned, the hackathon is an excellent opportunity to learn. You could stick to your daily tasks and routine, but it's more fun if you try something new. As you only have limited time, one of the things to manage is how much time you can spend on learning and how much on actually building something to deliver.
Getting ideas, managing your time, making the right decisions and handling pressure when the "start finishing" tweets start coming.. it all makes part of the learning process.
Normally every participant should have learned something new on a technical perspective during the hackathon. But I'm quite sure they also learned something on a more personal level - still business/work related though. And if you participated with a team that also works together the rest of the year (as I did), you probably also learned something about how your team functions.
from Priceless GIFs via Gfycat
Team "Bee Ghentle" 2020
This year I entered the competition with 2 of my (junior) colleagues. Our front-end beard-guy Sam had some experience with SXA but now was immersed into the wonders of SXA 9.3. Bearded handyman Alex had some encounters with marketing terminology, extending Forms (and meeting the limitations), Unicorns and his new best friend "Helix". I hope you learned a lot guys - you did a good job!
First step: an idea
The topics this year were quite surprising and somewhat challenging:
- "Sitecore Meetup Website": create a site for the Sitecore user groups to replace "Meetup"
- "Sitecore Marketplace Website": create a new marketplace website
- "Sitecore Hackathon Website": create a new website for the hackathon (or how to get people to create your website for free - just kidding, it would be a pleasure doing this)
Still a bit sleepy we decided to go for the first topic. We though the Commerce geniuses would build an awesome marketplace and the JSS experts would come up with a mind-blowing yearly-one-pager for the hackathon. We installed SXA and got started...
Our idea(s) might be a bit different than others, as we went a bit creative and didn't stick to what might be seen as the current situation.
We wanted to create a solution for all user groups. Why? Because we can. We could have gone for one site per user group, but we thought that one site to
rule group them all would benefit people as user groups might start working together that way.
Next part of the idea was the fact that user group organizers know Sitecore. That is an assumption, but if they don't they should be fired as organizer. With a bit of security it should be possible to give organizers the ability to edit their own stuff in Sitecore directly. It's still a Content Management System - so let it handle content. This way we didn't have to worry about forms to create user group events. After all, it's a Sitecore hackathon, not a form-writing contest.
We also decided to skip a lot of tasks that we normally would do in a website because they seemed out-of-scope for a hackathon. So we didn't care about a 404 page, security headers, ... and focused on getting a mvp version that worked with some nice fancy tricks to show some Sitecore potential. Unfortunately we weren't able to do all of it - I must admit we do miss some functionality (e.g. unsubscribe - personalizing the subscribe button could help to do that trick) and we would have liked to get visitors recommended sessions based on your xDB profile.. but we ran out of time.
The build
We did manage to deliver a working version - or at least we hope it works once installed on another instance :)
The code and documentation can be found on
Github (you can also find all other submissions there) - the video is also on
Github.
We started with a faceted overview of the available user groups.
We should display the user group logo's on this page, but that is content - we tested with one image to make sure it works.
Selecting the user group brings the visitor to the group page with some general information and an overview of the events of that group - with the first upcoming event highlighted on top.
An event also has a (not-fully-styled) detail page with the sessions and speakers in more detail. We decided to share speakers across user groups as some of them tend to speak at quite a few.
Visitors of user groups can register on the site - a (extranet) Sitecore user is created. We had some ideas with EXM and marketing automation here but those didn't make the cut for the deadline.
Once registered and logged in, you can subscribe to an event with a simple click (as we already you). Each event also displays the people that are coming.
As a finishing touch we created a component on the homepage that displays all events you subscribed for (this should be the upcoming events you subscribed, which is just a small change to the index query but we had no more time to test that so we decided to go as is). A Sitecore site needs something personalized, right?
The techy stuff
Creating the site in SXA was rather trivial for me. We did write a few extensions that helped us showing what we wanted with as little code and as much flexibility as possible.
On some parts we had to make decisions that were not perfect. To store the visitors of the user group, we took a shortcut writing them in the Sitecore database(s). Yes, this will not work on a scaled setup - we know. But we didn't manage to find the time setting up a custom database to store them.
The faceted overview was done with standard SXA components and scopes. To display the first upcoming event we used a c
ustom datasource which we registered as item query to be used in a page list. Extra queries to display other lists of events could be easily created this way.
For the "Who's coming" feature and the "My next event" I created a
Scriban extension. To get the
users next event was a fairly easy query on the Sitecore index and we returned the event Item - this way we can display anything we want about the event in the Scriban template.
To display
who is coming to the event was more challenging as I actually wanted to return the Sitecore users to the Scriban template so we could select any property we wanted there. That didn't seem to work so we had to settle with a function that returned the names. Still pretty neat though.
Next steps
I was still wondering about users in Scriban so I did what every Sitecore developer should do: I asked it on
Sitecore StackExchange. And as expected, I did get an answer and it even seems possible... so that might be a next blog post ;)
Go home
We had some stress, we had some fun - we learned - we delivered something... maybe not everything we hoped for (did we aim too high?), but anyway, the hackathon 2020 is over. If all goes well we'll celebrate it at Sugcon in Budapest - whoever wins, they will have deserved it.
I didn't check all the code on Github - I did watch the
video playlist on Youtube (which does not include our video as it's not on Youtube). I've seen some (potentially) great entries.. but if I see the entries in the meetup topic I do notice we really took another angle. We'll leave it to the honorable judges to decide what they think about it... I still think we had a good approach.
But most importantly: we enjoyed it - and we're still alive!
Again next year?