Home >Web Front-end >JS Tutorial >Building GitHub Airlines
G'day folks! Today I want to share a fun little project I whipped up in just a couple of hours - GitHub Airlines, a web app that turns your GitHub profile into a proper fancy boarding pass. Because why should your GitHub stats be boring when they could be aviation-themed? ?️
You know those moments when you're procrastinating on GitHub, looking at your stats for the millionth time? Well, I thought, "Wouldn't it be brilliant if these numbers looked more like a boarding pass?" And thus, GitHub Airlines was born!
GitHub Airlines is a React app that:
We kept it simple but modern:
First things first, we got our Vite React TypeScript project up and running. Vite's brilliant for quick development - it's proper fast!
We kept it simple with the REST API - no need for authentication, just straight public data fetching:
const fetchGitHubData = async (username: string) => { const [userResponse, reposResponse] = await Promise.all([ fetch(`https://api.github.com/users/${username}`), fetch(`https://api.github.com/users/${username}/repos`) ]); // Transform the data into boarding pass format };
This was the fun bit! We used Tailwind CSS to create a proper airline ticket look:
Because nobody likes a boarding pass that doesn't fit on their phone, right?
Want to see your GitHub profile as a boarding pass? Check out the live demo or grab the source code.
This was just a 2-hour build, but there's so much more we could add:
The project is completely open source, and we'd love your contributions! Whether it's adding new features, fixing bugs, or just giving feedback - every bit helps!
Have you built any fun projects with the GitHub API? Or got any ideas for making GitHub Airlines even better? Drop a comment below - I'd love to hear your thoughts!
And remember, the sky's not the limit when you're coding! ✈️
The above is the detailed content of Building GitHub Airlines. For more information, please follow other related articles on the PHP Chinese website!