DEV Community

Discussion on: Show me your best Open Source project

Collapse
kamo profile image
KAIDI • Edited on

Svelte web app that list repositories of a given programming language

The Demo.

What is the application?

A simple web-application that fetches the trending git repositories of a programming language and displays them.

Tools we're going to use:

  1. [Svelte] (svelte.dev/) for developing the app.
  2. [SnowPack] (snowpack.dev/) for building the app.
  3. [Vercel] (vercel.com/) for deploying the app.

Project architecture

the project architecture is very simple Alt Text

Let's begin

In the "src" folder we create App.svelte, it's the principal component.

const getReposByLang = async () => {
  if (!reposMap.has(repoLang)) page = 0;
  isSearching = true;
  if (reposMap.has(repoLang) && !page === 0) {
    isSearching = false;
    return;
  }
  await getRepos(repoLang, page).then((res) => {
    if (reposMap.has(repoLang)) {
      reposMap.set(
Enter fullscreen mode Exit fullscreen mode