Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mod-catalog",
"version": "0.2.0",
"version": "0.3.0",
"type": "module",
"private": true,
"scripts": {
Expand Down
168 changes: 28 additions & 140 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,151 +1,40 @@
<script setup lang="ts">
import { ref } from 'vue';
import { ref, computed } from 'vue';

import Header from './components/Header.vue';
import Hero from './components/Hero.vue';
import VideoCarousel from './components/VideoCarousel.vue';
import VideoDetailsDialog from './components/VideoDetailsDialog.vue';
import catalogData from './catalogData';


const modalDetailOpen = ref(false);
const selectedVideoId = ref<string | null>(null);

const featuredArchitectures = [
{
id: '1',
title: 'Module Federation: Compartilhando Código Entre Microfrontends',
thumbnail: 'https://images.unsplash.com/photo-1431576901776-e539bd916ba2?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxzb2Z0d2FyZSUyMGFyY2hpdGVjdHVyZXxlbnwxfHx8fDE3NjExMDIyNDF8MA&ixlib=rb-4.1.0&q=80&w=1080',
duration: '32 min',
category: 'Arquitetura',
},
{
id: '2',
title: 'Comunicação entre Microfrontends: Event Bus e Context',
thumbnail: 'https://images.unsplash.com/photo-1642229407420-a659dac2f029?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxtaWNyb3NlcnZpY2VzJTIwdGVjaG5vbG9neXxlbnwxfHx8fDE3NjExMDIyNDJ8MA&ixlib=rb-4.1.0&q=80&w=1080',
duration: '28 min',
category: 'Comunicação',
},
{
id: '3',
title: 'Design System Distribuído para Microfrontends',
thumbnail: 'https://images.unsplash.com/photo-1593720213428-28a5b9e94613?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxmcm9udGVuZCUyMGRldmVsb3BtZW50fGVufDF8fHx8MTc2MTEwMjI0Mnww&ixlib=rb-4.1.0&q=80&w=1080',
duration: '41 min',
category: 'Design',
},
{
id: '4',
title: 'Deploy e CI/CD para Arquitetura Microfrontend',
thumbnail: 'https://images.unsplash.com/photo-1667984390538-3dea7a3fe33d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxjbG91ZCUyMGNvbXB1dGluZ3xlbnwxfHx8fDE3NjEwODM0MDl8MA&ixlib=rb-4.1.0&q=80&w=1080',
duration: '36 min',
category: 'DevOps',
},
{
id: '5',
title: 'Micro Frontend com Single-SPA Framework',
thumbnail: 'https://images.unsplash.com/photo-1457305237443-44c3d5a30b89?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHx3ZWIlMjBkZXZlbG9wbWVudHxlbnwxfHx8fDE3NjEwNTI3ODh8MA&ixlib=rb-4.1.0&q=80&w=1080',
duration: '52 min',
category: 'Framework',
},
{
id: '6',
title: 'Estratégias de Roteamento em Microfrontends',
thumbnail: 'https://images.unsplash.com/photo-1515879218367-8466d910aaa4?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxwcm9ncmFtbWluZyUyMGNvZGV8ZW58MXx8fHwxNzYxMDE0NjQ3fDA&ixlib=rb-4.1.0&q=80&w=1080',
duration: '24 min',
category: 'Roteamento',
},
];

const practicalMicrofrontends = [
{
id: '7',
title: 'Construindo um E-commerce com Microfrontends',
thumbnail: 'https://images.unsplash.com/photo-1558181445-eca4774b2a37?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxkZXZlbG9wZXIlMjB3b3Jrc3BhY2V8ZW58MXx8fHwxNzYxMDgzODM3fDA&ixlib=rb-4.1.0&q=80&w=1080',
duration: '1h 15min',
category: 'Prático',
},
{
id: '8',
title: 'Gerenciamento de Estado Global em Microfrontends',
thumbnail: 'https://images.unsplash.com/photo-1519389950473-47ba0277781c?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxkaWdpdGFsJTIwdGVjaG5vbG9neXxlbnwxfHx8fDE3NjEwMDg4ODJ8MA&ixlib=rb-4.1.0&q=80&w=1080',
duration: '38 min',
category: 'Estado',
},
{
id: '9',
title: 'Performance e Otimização em Arquitetura Distribuída',
thumbnail: 'https://images.unsplash.com/photo-1644261766628-3af7203be678?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxhcGklMjBpbnRlZ3JhdGlvbnxlbnwxfHx8fDE3NjEwMTU1Mzh8MA&ixlib=rb-4.1.0&q=80&w=1080',
duration: '45 min',
category: 'Performance',
},
{
id: '10',
title: 'Testes End-to-End em Microfrontends',
thumbnail: 'https://images.unsplash.com/photo-1519662978799-2f05096d3636?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxtb2Rlcm4lMjBhcmNoaXRlY3R1cmV8ZW58MXx8fHwxNzYxMDQ1MDQzfDA&ixlib=rb-4.1.0&q=80&w=1080',
duration: '33 min',
category: 'Testes',
},
{
id: '11',
title: 'Monitoramento e Observabilidade de Microfrontends',
thumbnail: 'https://images.unsplash.com/photo-1551288049-bebda4e38f71?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxkYXRhJTIwdmlzdWFsaXphdGlvbnxlbnwxfHx8fDE3NjEwMDg1NjZ8MA&ixlib=rb-4.1.0&q=80&w=1080',
duration: '29 min',
category: 'Monitoramento',
},
{
id: '12',
title: 'Migração de Monolito para Microfrontends',
thumbnail: 'https://images.unsplash.com/photo-1595623654300-b27329804025?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHx0ZWNobm9sb2d5JTIwY29kaW5nfGVufDF8fHx8MTc2MTA3Njc4NHww&ixlib=rb-4.1.0&q=80&w=1080',
duration: '58 min',
category: 'Migração',
},
];
function openDetails(id: string) {
selectedVideoId.value = id;
modalDetailOpen.value = true;
}

const advancedPatterns = [
{
id: '13',
title: 'Micro Frontends com React e Vue no Mesmo Projeto',
thumbnail: 'https://images.unsplash.com/photo-1593720213428-28a5b9e94613?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxmcm9udGVuZCUyMGRldmVsb3BtZW50fGVufDF8fHx8MTc2MTEwMjI0Mnww&ixlib=rb-4.1.0&q=80&w=1080',
duration: '42 min',
category: 'Avançado',
},
{
id: '14',
title: 'Server-Side Rendering em Microfrontends',
thumbnail: 'https://images.unsplash.com/photo-1667984390538-3dea7a3fe33d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxjbG91ZCUyMGNvbXB1dGluZ3xlbnwxfHx8fDE3NjEwODM0MDl8MA&ixlib=rb-4.1.0&q=80&w=1080',
duration: '51 min',
category: 'SSR',
},
{
id: '15',
title: 'Edge Computing e Microfrontends',
thumbnail: 'https://images.unsplash.com/photo-1642229407420-a659dac2f029?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxtaWNyb3NlcnZpY2VzJTIwdGVjaG5vbG9neXxlbnwxfHx8fDE3NjExMDIyNDJ8MA&ixlib=rb-4.1.0&q=80&w=1080',
duration: '37 min',
category: 'Edge',
},
{
id: '16',
title: 'Segurança e Autenticação Distribuída',
thumbnail: 'https://images.unsplash.com/photo-1515879218367-8466d910aaa4?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxwcm9ncmFtbWluZyUyMGNvZGV8ZW58MXx8fHwxNzYxMDE0NjQ3fDA&ixlib=rb-4.1.0&q=80&w=1080',
duration: '44 min',
category: 'Segurança',
},
{
id: '17',
title: 'GraphQL Federation em Microfrontends',
thumbnail: 'https://images.unsplash.com/photo-1644261766628-3af7203be678?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxhcGklMjBpbnRlZ3JhdGlvbnxlbnwxfHx8fDE3NjEwMTU1Mzh8MA&ixlib=rb-4.1.0&q=80&w=1080',
duration: '39 min',
category: 'GraphQL',
},
{
id: '18',
title: 'Micro Frontends em Aplicações Mobile',
thumbnail: 'https://images.unsplash.com/photo-1519389950473-47ba0277781c?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxkaWdpdGFsJTIwdGVjaG5vbG9neXxlbnwxfHx8fDE3NjEwMDg4ODJ8MA&ixlib=rb-4.1.0&q=80&w=1080',
duration: '48 min',
category: 'Mobile',
},
];

function handleShowDetails() {
modalDetailOpen.value = true;
openDetails('1');
}

const selectedVideo = computed(() =>
selectedVideoId.value ? (catalogData as any).byId[selectedVideoId.value] : null
);

const relatedVideos = computed(() => {
const current = selectedVideo.value as any;
if (!current || !current.relatedIds) return [] as any[];
return current.relatedIds.map((id: string) => (catalogData as any).byId[id]).filter(Boolean);
});

function handleRedirectPlayer() {
if ((window as any)?.shellNavigate) {
(window as any).shellNavigate("/player");
}
}
</script>

Expand All @@ -166,16 +55,15 @@ function handleShowDetails() {
<div class="relative z-10">
<Header />
<main class="z-10">
<Hero @on-show-details="handleShowDetails" />
<VideoCarousel class="mt-4" title="Arquiteturas em Destaque" :videos="featuredArchitectures" />
<VideoCarousel title="Microfrontends na Prática" :videos="practicalMicrofrontends" />
<VideoCarousel title="Padrões Avançados" :videos="advancedPatterns" />
<Hero @on-show-details="handleShowDetails" @on-watch-now="handleRedirectPlayer" />
<VideoCarousel v-for="carousel in (catalogData as any).carousels" :key="carousel.id" class="mt-4"
:title="carousel.title" :videos="carousel.videos" @select="openDetails" />
</main>

</div>

<!-- <SearchModal open={searchOpen} onOpenChange={setSearchOpen} /> -->
<VideoDetailsDialog v-model:open="modalDetailOpen" />
<VideoDetailsDialog v-model:open="modalDetailOpen" :video="selectedVideo" :related="relatedVideos" />
</div>
</template>
<style>
Expand Down
Loading