Skip to content

The definitive list of the best of (consumer facing) open source.

Added home page

Lucas3790ec0b660c
diff --git a/apps/web-client/src/App.vue b/apps/web-client/src/App.vue
index 0a03d5a..35658b6 100644
--- a/apps/web-client/src/App.vue
+++ b/apps/web-client/src/App.vue
@@ -1,17 +1,13 @@
-<script setup lang="ts">
-
-</script>
<template>
- <MainHeader>
-
- </MainHeader>
-
- <RouterView />
+ <main>
+ <router-view />
+ </main>
</template>
<style scoped>
</style>
+
diff --git a/apps/web-client/src/assets/base.css b/apps/web-client/src/assets/base.css
index 0028e91..a4345b7 100644
--- a/apps/web-client/src/assets/base.css
+++ b/apps/web-client/src/assets/base.css
@@ -1,4 +1,23 @@
/* color palette from <https://github.com/vuejs/theme> */
+
+@theme {
+ --color-gray-1: #111111;
+ --color-gray-2: #222222;
+ --color-gray-3: #333333;
+ --color-gray-4: #444444;
+ --color-gray-5: #555555;
+ --color-gray-6: #666666;
+ --color-gray-7: #777777;
+ --color-gray-8: #888888;
+ --color-gray-9: #999999;
+ --color-gray-a: #aaaaaa;
+ --color-gray-b: #bbbbbb;
+ --color-gray-c: #cccccc;
+ --color-gray-d: #dddddd;
+ --color-gray-e: #eeeeee;
+}
+
+
:root {
--vt-c-white: #ffffff;
--vt-c-white-soft: #f8f8f8;
@@ -21,23 +40,6 @@
--vt-c-text-dark-2: rgba(235, 235, 235, 0.64);
}
-:root {
- --gray-1: #111111;
- --gray-2: #222222;
- --gray-3: #333333;
- --gray-4: #444444;
- --gray-5: #555555;
- --gray-6: #666666;
- --gray-7: #777777;
- --gray-8: #888888;
- --gray-9: #999999;
- --gray-a: #aaaaaa;
- --gray-b: #bbbbbb;
- --gray-c: #cccccc;
- --gray-d: #dddddd;
- --gray-e: #eeeeee;
-}
-
/* semantic color variables for this project */
:root {
--color-background: var(--vt-c-white);
@@ -52,7 +54,7 @@
--section-gap: 160px;
}
-
+/*
@media (prefers-color-scheme: dark) {
:root {
--color-background: var(--vt-c-black);
@@ -66,13 +68,13 @@
--color-text: var(--vt-c-text-dark-2);
}
}
+ */
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
- font-weight: normal;
}
body {
diff --git a/apps/web-client/src/assets/main.css b/apps/web-client/src/assets/main.css
index 3e82b9c..08f3359 100644
--- a/apps/web-client/src/assets/main.css
+++ b/apps/web-client/src/assets/main.css
@@ -1,18 +1,11 @@
@import './base.css';
@import "tailwindcss";
-#app {
- max-width: 1280px;
-}
-
-html {
- background-color: black;
-}
.line-x {
- @apply min-h-px bg-gray2;
+ @apply min-h-px bg-gray-2;
}
.line-y {
- @apply min-w-px bg-gray2;
+ @apply min-w-px bg-gray-2;
}
diff --git a/apps/web-client/src/components/ApplicationCard.vue b/apps/web-client/src/components/ApplicationCard.vue
new file mode 100644
index 0000000..67037ac
--- /dev/null
+++ b/apps/web-client/src/components/ApplicationCard.vue
@@ -0,0 +1,33 @@
+
+<template>
+ <div class="border border-gray-200 p-2">
+ <h2>{{ app.name }}</h2>
+ <p>{{ app.description }}</p>
+
+ <div class="">
+ <span class="">{{ app.stars.toLocaleString() }}</span>
+ <span class="">Language: {{ app.language }}</span>
+ <span class="">License: {{ app.license }}</span>
+ <span class="">Category: {{ app.category }}</span>
+ </div>
+
+ <div class="">
+ <a :href="app.repo_url" target="_blank" rel="noopener noreferrer">GitHub Repo</a>
+ <a v-if="app.homepage_url" :href="app.homepage_url" target="_blank" rel="noopener noreferrer"
+ >Homepage</a
+ >
+ </div>
+ </div>
+</template>
+
+<script setup lang="ts">
+import type { Application } from '@/types'
+
+defineProps<{
+ app: Application
+}>()
+</script>
+
+<style scoped>
+
+</style>
diff --git a/apps/web-client/src/components/MainHeader.vue b/apps/web-client/src/components/MainHeader.vue
index 4000de0..9aadaf6 100644
--- a/apps/web-client/src/components/MainHeader.vue
+++ b/apps/web-client/src/components/MainHeader.vue
@@ -1,7 +1,7 @@
<template>
- <div>
+ <header class="w-full p-6 flex items-center justify-center text-white">
definitive-opensource
- </div>
+ </header>
</template>
<style scoped>
diff --git a/apps/web-client/src/router/index.ts b/apps/web-client/src/router/index.ts
index e69de29..8deadd7 100644
--- a/apps/web-client/src/router/index.ts
+++ b/apps/web-client/src/router/index.ts
@@ -0,0 +1,22 @@
+
+import { createRouter, createWebHistory } from 'vue-router'
+import HomeView from '../views/HomeView.vue'
+import ListView from '../views/ListView.vue'
+
+const router = createRouter({
+ history: createWebHistory(),
+ routes: [
+ {
+ path: '/',
+ name: 'home',
+ component: HomeView,
+ },
+ {
+ path: '/list',
+ name: 'list',
+ component: ListView,
+ },
+ ],
+})
+
+export default router
diff --git a/apps/web-client/src/types/index.ts b/apps/web-client/src/types/index.ts
new file mode 100644
index 0000000..b76f345
--- /dev/null
+++ b/apps/web-client/src/types/index.ts
@@ -0,0 +1,15 @@
+
+export interface Application {
+ name: string
+ description: string
+ repo_url: string
+ tags: string[]
+ platforms: string[]
+ category: string
+ flags: string[]
+ license: string
+ stars: number
+ language: string
+ homepage_url: string
+ last_commit: string
+}
diff --git a/apps/web-client/src/views/HomeView.vue b/apps/web-client/src/views/HomeView.vue
new file mode 100644
index 0000000..a6521f2
--- /dev/null
+++ b/apps/web-client/src/views/HomeView.vue
@@ -0,0 +1,10 @@
+
+<template>
+ <div class="h-screen flex items-center justify-center w-full text-2xl gap-2">
+ <div>Our mission is to make open source accessible to all.</div>
+
+ <router-link to="/list"><div class="text-black font-semibold">Browse</div></router-link>
+ </div>
+</template>
+
+<style scoped></style>
diff --git a/apps/web-client/src/views/ListView.vue b/apps/web-client/src/views/ListView.vue
new file mode 100644
index 0000000..60236de
--- /dev/null
+++ b/apps/web-client/src/views/ListView.vue
@@ -0,0 +1,48 @@
+
+<template>
+ <div class="">
+
+ <div v-if="loading" class="status">Loading applications...</div>
+
+ <div v-else-if="error" class="text-red-500">
+ {{ error }}
+ </div>
+
+ <div v-else class="flex flex-col gap-2 p-5">
+ <ApplicationCard v-for="app in applications" :key="app.repo_url" :app="app" />
+ </div>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { ref, onMounted } from 'vue'
+import ApplicationCard from '../components/ApplicationCard.vue'
+import type { Application } from '@/types'
+
+const applications = ref<Application[]>([])
+const loading = ref(true)
+const error = ref<string | null>(null)
+
+onMounted(async () => {
+ try {
+ const response = await fetch(
+ 'https://raw.githubusercontent.com/mustbeperfect/definitive-opensource/refs/heads/main/core/data/dynamic/applications_generated.json',
+ )
+
+ if (!response.ok) {
+ throw new Error(`Error fetching data: ${response.statusText}`)
+ }
+
+ const data = await response.json()
+
+ applications.value = data.applications
+ } catch (e) {
+ error.value = e instanceof Error ? e.message : 'An unknown error occurred'
+ console.error(e)
+ } finally {
+ loading.value = false
+ }
+})
+</script>
+
+<style scoped></style>