SlideShare a Scribd company logo
Mike Cavaliere
mikecavaliere.com / @mcavaliere
Fun and

games
with the full-stack

Jamstack
👏🏻 thank you, !!!
👋🏼 Hi, I'm Mike.
Full-Stack web/mobile
❤️
JS, React
Writes words
Gives talks
@mcavaliere
mcavaliere
mikecavaliere.com
🧑🏼‍💻
what is this talk

about?
➡ Engineering requires lots of learning.
➡ Fun helps us learn.
💡 Therefore: have fun while learning and practicing.
work on fun things.
TL;DR:
🎉 Fun 🎉 🔺 Mood
🔺 Attention
🔺 Memory
FUN helps you learn
Source: science
Learn better,
faster,
& longer
this talk
Source: science
How I built a simple game in a day
Real-world skills practiced in v1
How this led to v2
Real-world learnings from v2
Fun and Games with the Full-Stack Jamstack
Mike Cavaliere 🔗 mikecavaliere.com 🔗 @mcavaliere
In case you haven't heard of it...
what is was the ?
JavaScript APIs Markup
+ + = "JAM"
Term coined by
Fun and Games with the Full-Stack Jamstack
Mike Cavaliere 🔗 mikecavaliere.com 🔗 @mcavaliere
In case you haven't heard of it...
what is was the ?
Build things in JS
Compile to HTML
Fetch data w/APIs
In case you haven't heard of it...
what is the ?
🚀 FAST
🔎 SEO
🔐 Secure
📈 Scalable
💰 Saves $$$
💻 **Developer Experience (DX)**
Benefits:
🔗 Jamstack.org
Fun and Games with the Full-Stack Jamstack
Mike Cavaliere 🔗 mikecavaliere.com 🔗 @mcavaliere
what is the Jamstack now?
Build things in anything
Compile to HTML
Fetch data w/APIs
Spoiler: it's the same thing.
🔗 Netlify blog: The Jamstack definition evolved
Fun and Games with the Full-Stack Jamstack
Mike Cavaliere 🔗 mikecavaliere.com 🔗 @mcavaliere
Jamstack frameworks
https://jamstack.org/generators
& many more
Fun and Games with the Full-Stack Jamstack
Mike Cavaliere 🔗 mikecavaliere.com 🔗 @mcavaliere
Enter the
Full-Stack Jamstack
Frameworks that give you full control over the server-side.
Coined by fsjam.org
Part #1: Backstory
How this project got started.
Backstory
Have 8 hours investment time weekly
Demo on Friday
Wanted fun and interactive
Me: 💡 "I'm gonna build a game!"
(🙌🏼 TY, Echobind)
What's the simplest "game" I can build in < 1 day?
What's the simplest "game" I can build in < 1 day?
Everybody

logs in
Click things
Update list of things
on screen.


Highest #clicks on
top.
v1 Goals
Ship in <8 hours
(use investment time)
Fun & interactive
Don't spend money
Use websockets (maybe)
Building the MVP
"Minimum Viable Product."
aka, the simplest version I can ship.
The tools I started the stack
with, which are (mostly) part of
my own standard boilerplate.
🧰 Toolbox 🛠
JS Framework
Database
Data fetching
UI/layout/design
Authentication
v1.0! 🎉
Fun and Games with the Full-Stack Jamstack
Mike Cavaliere 🔗 mikecavaliere.com 🔗 @mcavaliere
building v1
Planning
Gen. scaffold / add

dependencies
GitHub Auth +
DB schema
Feature: emoji

picker
Feature: emoji

list
Tweak details Deploy
v1 "Architecture"
Boilerplate NextAuth
GitHub login/signup
Single-page app
building v1
Building the database
building v1
GitHub auth
Create GitHub OAuth app / API keys
Add next-auth + prisma adapter
Done - boilerplate screens
<EmojiPicker /> <Leaderboard /> <UserList />
building v1
<EmojiPicker /> <Leaderboard /> <UserList />
missive/emoji-mart
click
POST /api/emoji/create
INSERT emoji into DB
Record a single vote
<EmojiPicker /> <Leaderboard /> <UserList />
GET /api/emoji/list
every 200ms
query emoji, JOIN on votes
aggregate & sort by vote count
<span style={{ fontSize: 15 + e._count.votes * 5 }}>
{e.native}
</span>
<EmojiPicker /> <Leaderboard /> <UserList />
GET /api/users/list
every 200ms
V1 (MVP) Takeaways
Lessons & practiced skills.
UI
Page layout / styling
Data fetching
tech skills practiced
Frontend Backend
Data modeling
Database CRUD
API development
General
Type modeling (TypeScript)
Authentication
Product development (!)
Library proficiency
Shipping fast
"Good enough" iteration
other SkillS Improved
How to ship fast
Learning time accumulates
Being selective increases focus
Limit new learning


Start with tools you already know.
Don't reinvent the ☸️


Search before building.
Aim for "good enough."


Add TODOs for later.
making it better
Upgrades.
v1 areas for

improvement
UX: Emoji get tooooo big
UX: Updates slowly
UX: No animation
UX: How do we "win"?
Tech: Code is a mess; can't add

features easily
v2.0! 🎉
Let's 🤪 play!
https://emoji-battle.vercel.app
(and maybe break the app)
Websockets / optimistic rendering
15-second rounds w/countdown
End-of-round stats
building v2
Rearchitected
Design additions, animations
building v2
Animation
building v2
🙏Shout out to
Adding Websockets
🚀 Real-time!
🙏 Shout out to
Note: there are different

ways to achieve this.
building v2
Rounds architecture
building v2
How countdown works
currentStep == 13
building v2
React rearchitecting
Take state out of components
Move into React contexts
<RoundProvider>
<EmojisProvider>
Drop SWR, add react-query
Add useEffectReducer()
Move websockets, effects to custom hooks
Separate side effects
👍🏼Decouple all the things.👍🏼
Unnecessary details:
V2 Takeaways
Lessons & practiced skills.
Code reuse patterns
State management
Refactoring patterns
learnings
Optimistic rendering
Layout animations
Declarative/imperative

animations
React architectural patterns
Nested contexts
Side effect management
React
UI Dev
Software architecture
Also
Microservices
Websockets / realtime

events
What's next?
Battling on
💥 Sound effects
💻 Game mechanics
🗡 Weapons (take away votes)
📱 Mobile friendliness
⏱ Longer rounds
🤪 Random animations
? Who knows.
Suggestions welcome!
What's next?
Open for contributions
mcavaliere/emoji-battle
mcavaliere/emoji-battle-api
➡ Engineering requires lots of learning.
➡ Fun helps us learn.
💡 Therefore: have fun while learning and practicing.
work on fun things.
Recap:
mcavaliere/emoji-battle
thank you for watching!
mikecavaliere.com
@mcavaliere
🧑🏼‍💻
Feedback

appreciated
🙏

More Related Content

Similar to Fun and Games with the Full-Stack Jamstack (KCDC 2022).pdf

Building a game engine with jQuery
Building a game engine with jQueryBuilding a game engine with jQuery
Building a game engine with jQuery
Paul Bakaus
 
Building Droids with JavaScript
Building Droids with JavaScriptBuilding Droids with JavaScript
Building Droids with JavaScript
Andrew Fisher
 
Les animations sur WordPress - avec Damien
Les animations sur WordPress - avec DamienLes animations sur WordPress - avec Damien
Les animations sur WordPress - avec Damien
Julien Dereumaux
 
Maker Boot Camp
Maker Boot CampMaker Boot Camp
Maker Boot Camp
St. Petersburg College
 
Skill Session - Web Multi Device
Skill Session - Web Multi DeviceSkill Session - Web Multi Device
Skill Session - Web Multi Device
filirom1
 
Responsive web design & mobile web development - a technical and business app...
Responsive web design & mobile web development - a technical and business app...Responsive web design & mobile web development - a technical and business app...
Responsive web design & mobile web development - a technical and business app...Atos_Worldline
 
[DevRelCon Tokyo 2017] Creative Technical Content for Better Developer Experi...
[DevRelCon Tokyo 2017] Creative Technical Content for Better Developer Experi...[DevRelCon Tokyo 2017] Creative Technical Content for Better Developer Experi...
[DevRelCon Tokyo 2017] Creative Technical Content for Better Developer Experi...
Tomomi Imura
 
RWD in the Wild
RWD in the WildRWD in the Wild
RWD in the Wild
Rich Quick
 
JAZOON'13 - Sven Peters - How to do Kick-Ass Software Development
JAZOON'13 - Sven Peters - How to do Kick-Ass Software DevelopmentJAZOON'13 - Sven Peters - How to do Kick-Ass Software Development
JAZOON'13 - Sven Peters - How to do Kick-Ass Software Developmentjazoon13
 
Sutd Game Lab's prototyping tips
Sutd Game Lab's prototyping tipsSutd Game Lab's prototyping tips
Sutd Game Lab's prototyping tips
Phaedra Pang
 
Prototyping user interactions in web apps
Prototyping user interactions in web appsPrototyping user interactions in web apps
Prototyping user interactions in web apps
Patrick NDJIENTCHEU
 
Leveling up your JavaScipt - DrupalJam 2017
Leveling up your JavaScipt - DrupalJam 2017Leveling up your JavaScipt - DrupalJam 2017
Leveling up your JavaScipt - DrupalJam 2017
Christian Heilmann
 
Hacking to be performant
Hacking to be performantHacking to be performant
Hacking to be performant
Apoorv Saxena
 
Unleashing WebGL & WebAudio with babylon.js
Unleashing WebGL & WebAudio with babylon.jsUnleashing WebGL & WebAudio with babylon.js
Unleashing WebGL & WebAudio with babylon.js
davrous
 
Build a better(reactive) word press
Build a better(reactive) word pressBuild a better(reactive) word press
Build a better(reactive) word press
Bhushan Jawle
 
SharePoint Development 101
SharePoint Development 101SharePoint Development 101
SharePoint Development 101Greg Hurlman
 
Don't let your Service be speechless – Clive K. Lavery
Don't let your Service be speechless – Clive K. LaveryDon't let your Service be speechless – Clive K. Lavery
Don't let your Service be speechless – Clive K. Lavery
Service Experience Camp
 
Building Web Hack Interfaces
Building Web Hack InterfacesBuilding Web Hack Interfaces
Building Web Hack Interfaces
Christian Heilmann
 
Nebraska Trainer's Institute eLearning Presentaiotn
Nebraska Trainer's Institute eLearning PresentaiotnNebraska Trainer's Institute eLearning Presentaiotn
Nebraska Trainer's Institute eLearning Presentaiotn
easelsolutions
 
Game development project
Game development projectGame development project
Game development project
Gogikar Dhanraj
 

Similar to Fun and Games with the Full-Stack Jamstack (KCDC 2022).pdf (20)

Building a game engine with jQuery
Building a game engine with jQueryBuilding a game engine with jQuery
Building a game engine with jQuery
 
Building Droids with JavaScript
Building Droids with JavaScriptBuilding Droids with JavaScript
Building Droids with JavaScript
 
Les animations sur WordPress - avec Damien
Les animations sur WordPress - avec DamienLes animations sur WordPress - avec Damien
Les animations sur WordPress - avec Damien
 
Maker Boot Camp
Maker Boot CampMaker Boot Camp
Maker Boot Camp
 
Skill Session - Web Multi Device
Skill Session - Web Multi DeviceSkill Session - Web Multi Device
Skill Session - Web Multi Device
 
Responsive web design & mobile web development - a technical and business app...
Responsive web design & mobile web development - a technical and business app...Responsive web design & mobile web development - a technical and business app...
Responsive web design & mobile web development - a technical and business app...
 
[DevRelCon Tokyo 2017] Creative Technical Content for Better Developer Experi...
[DevRelCon Tokyo 2017] Creative Technical Content for Better Developer Experi...[DevRelCon Tokyo 2017] Creative Technical Content for Better Developer Experi...
[DevRelCon Tokyo 2017] Creative Technical Content for Better Developer Experi...
 
RWD in the Wild
RWD in the WildRWD in the Wild
RWD in the Wild
 
JAZOON'13 - Sven Peters - How to do Kick-Ass Software Development
JAZOON'13 - Sven Peters - How to do Kick-Ass Software DevelopmentJAZOON'13 - Sven Peters - How to do Kick-Ass Software Development
JAZOON'13 - Sven Peters - How to do Kick-Ass Software Development
 
Sutd Game Lab's prototyping tips
Sutd Game Lab's prototyping tipsSutd Game Lab's prototyping tips
Sutd Game Lab's prototyping tips
 
Prototyping user interactions in web apps
Prototyping user interactions in web appsPrototyping user interactions in web apps
Prototyping user interactions in web apps
 
Leveling up your JavaScipt - DrupalJam 2017
Leveling up your JavaScipt - DrupalJam 2017Leveling up your JavaScipt - DrupalJam 2017
Leveling up your JavaScipt - DrupalJam 2017
 
Hacking to be performant
Hacking to be performantHacking to be performant
Hacking to be performant
 
Unleashing WebGL & WebAudio with babylon.js
Unleashing WebGL & WebAudio with babylon.jsUnleashing WebGL & WebAudio with babylon.js
Unleashing WebGL & WebAudio with babylon.js
 
Build a better(reactive) word press
Build a better(reactive) word pressBuild a better(reactive) word press
Build a better(reactive) word press
 
SharePoint Development 101
SharePoint Development 101SharePoint Development 101
SharePoint Development 101
 
Don't let your Service be speechless – Clive K. Lavery
Don't let your Service be speechless – Clive K. LaveryDon't let your Service be speechless – Clive K. Lavery
Don't let your Service be speechless – Clive K. Lavery
 
Building Web Hack Interfaces
Building Web Hack InterfacesBuilding Web Hack Interfaces
Building Web Hack Interfaces
 
Nebraska Trainer's Institute eLearning Presentaiotn
Nebraska Trainer's Institute eLearning PresentaiotnNebraska Trainer's Institute eLearning Presentaiotn
Nebraska Trainer's Institute eLearning Presentaiotn
 
Game development project
Game development projectGame development project
Game development project
 

Recently uploaded

假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
cuobya
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
JeyaPerumal1
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Florence Consulting
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
zoowe
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
harveenkaur52
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
vmemo1
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
cuobya
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
Trending Blogers
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
CIOWomenMagazine
 

Recently uploaded (20)

假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
 

Fun and Games with the Full-Stack Jamstack (KCDC 2022).pdf

  • 1. Mike Cavaliere mikecavaliere.com / @mcavaliere Fun and games with the full-stack Jamstack
  • 3. 👋🏼 Hi, I'm Mike. Full-Stack web/mobile ❤️ JS, React Writes words Gives talks @mcavaliere mcavaliere mikecavaliere.com 🧑🏼‍💻
  • 4. what is this talk about?
  • 5. ➡ Engineering requires lots of learning. ➡ Fun helps us learn. 💡 Therefore: have fun while learning and practicing. work on fun things. TL;DR:
  • 6. 🎉 Fun 🎉 🔺 Mood 🔺 Attention 🔺 Memory FUN helps you learn Source: science Learn better, faster, & longer
  • 7. this talk Source: science How I built a simple game in a day Real-world skills practiced in v1 How this led to v2 Real-world learnings from v2
  • 8. Fun and Games with the Full-Stack Jamstack Mike Cavaliere 🔗 mikecavaliere.com 🔗 @mcavaliere In case you haven't heard of it... what is was the ? JavaScript APIs Markup + + = "JAM" Term coined by
  • 9. Fun and Games with the Full-Stack Jamstack Mike Cavaliere 🔗 mikecavaliere.com 🔗 @mcavaliere In case you haven't heard of it... what is was the ? Build things in JS Compile to HTML Fetch data w/APIs
  • 10. In case you haven't heard of it... what is the ? 🚀 FAST 🔎 SEO 🔐 Secure 📈 Scalable 💰 Saves $$$ 💻 **Developer Experience (DX)** Benefits: 🔗 Jamstack.org
  • 11. Fun and Games with the Full-Stack Jamstack Mike Cavaliere 🔗 mikecavaliere.com 🔗 @mcavaliere what is the Jamstack now? Build things in anything Compile to HTML Fetch data w/APIs Spoiler: it's the same thing. 🔗 Netlify blog: The Jamstack definition evolved
  • 12. Fun and Games with the Full-Stack Jamstack Mike Cavaliere 🔗 mikecavaliere.com 🔗 @mcavaliere Jamstack frameworks https://jamstack.org/generators & many more
  • 13. Fun and Games with the Full-Stack Jamstack Mike Cavaliere 🔗 mikecavaliere.com 🔗 @mcavaliere Enter the Full-Stack Jamstack Frameworks that give you full control over the server-side. Coined by fsjam.org
  • 14. Part #1: Backstory How this project got started.
  • 15. Backstory Have 8 hours investment time weekly Demo on Friday Wanted fun and interactive Me: 💡 "I'm gonna build a game!" (🙌🏼 TY, Echobind)
  • 16. What's the simplest "game" I can build in < 1 day?
  • 17. What's the simplest "game" I can build in < 1 day? Everybody logs in Click things Update list of things on screen. Highest #clicks on top.
  • 18. v1 Goals Ship in <8 hours (use investment time) Fun & interactive Don't spend money Use websockets (maybe)
  • 19. Building the MVP "Minimum Viable Product." aka, the simplest version I can ship.
  • 20. The tools I started the stack with, which are (mostly) part of my own standard boilerplate. 🧰 Toolbox 🛠 JS Framework Database Data fetching UI/layout/design Authentication
  • 22. Fun and Games with the Full-Stack Jamstack Mike Cavaliere 🔗 mikecavaliere.com 🔗 @mcavaliere building v1 Planning Gen. scaffold / add dependencies GitHub Auth + DB schema Feature: emoji picker Feature: emoji list Tweak details Deploy
  • 23. v1 "Architecture" Boilerplate NextAuth GitHub login/signup Single-page app
  • 25. building v1 GitHub auth Create GitHub OAuth app / API keys Add next-auth + prisma adapter Done - boilerplate screens
  • 26. <EmojiPicker /> <Leaderboard /> <UserList /> building v1
  • 27. <EmojiPicker /> <Leaderboard /> <UserList /> missive/emoji-mart click POST /api/emoji/create INSERT emoji into DB Record a single vote
  • 28. <EmojiPicker /> <Leaderboard /> <UserList /> GET /api/emoji/list every 200ms query emoji, JOIN on votes aggregate & sort by vote count <span style={{ fontSize: 15 + e._count.votes * 5 }}> {e.native} </span>
  • 29. <EmojiPicker /> <Leaderboard /> <UserList /> GET /api/users/list every 200ms
  • 30. V1 (MVP) Takeaways Lessons & practiced skills.
  • 31. UI Page layout / styling Data fetching tech skills practiced Frontend Backend Data modeling Database CRUD API development General Type modeling (TypeScript) Authentication Product development (!)
  • 32. Library proficiency Shipping fast "Good enough" iteration other SkillS Improved
  • 33. How to ship fast Learning time accumulates Being selective increases focus Limit new learning Start with tools you already know. Don't reinvent the ☸️ Search before building. Aim for "good enough." Add TODOs for later.
  • 35. v1 areas for improvement UX: Emoji get tooooo big UX: Updates slowly UX: No animation UX: How do we "win"? Tech: Code is a mess; can't add features easily
  • 38. Websockets / optimistic rendering 15-second rounds w/countdown End-of-round stats building v2 Rearchitected Design additions, animations
  • 40. building v2 🙏Shout out to Adding Websockets 🚀 Real-time!
  • 42. Note: there are different ways to achieve this. building v2 Rounds architecture
  • 43. building v2 How countdown works currentStep == 13
  • 44. building v2 React rearchitecting Take state out of components Move into React contexts <RoundProvider> <EmojisProvider> Drop SWR, add react-query Add useEffectReducer() Move websockets, effects to custom hooks Separate side effects 👍🏼Decouple all the things.👍🏼 Unnecessary details:
  • 45. V2 Takeaways Lessons & practiced skills.
  • 46. Code reuse patterns State management Refactoring patterns learnings Optimistic rendering Layout animations Declarative/imperative animations React architectural patterns Nested contexts Side effect management React UI Dev Software architecture Also Microservices Websockets / realtime events
  • 48. 💥 Sound effects 💻 Game mechanics 🗡 Weapons (take away votes) 📱 Mobile friendliness ⏱ Longer rounds 🤪 Random animations ? Who knows. Suggestions welcome! What's next? Open for contributions mcavaliere/emoji-battle mcavaliere/emoji-battle-api
  • 49. ➡ Engineering requires lots of learning. ➡ Fun helps us learn. 💡 Therefore: have fun while learning and practicing. work on fun things. Recap:
  • 50. mcavaliere/emoji-battle thank you for watching! mikecavaliere.com @mcavaliere 🧑🏼‍💻 Feedback appreciated 🙏