├── public ├── robots.txt ├── favicon.ico └── noise.png ├── .github ├── funding.yml ├── ISSUE_TEMPLATE │ ├── question.yml │ ├── feature-request.yml │ └── bug-report.yml ├── workflows │ ├── build.yml │ ├── nuxthub.yml │ ├── semantic-pull-request.yml │ └── label-pr.yml ├── release.yml └── pull_request_template.md ├── server ├── tsconfig.json ├── api │ └── stream.get.ts └── routes │ └── chat.ts ├── app ├── app.vue ├── utils │ ├── tags.ts │ └── socials.ts ├── app.config.ts ├── components │ ├── Player.vue │ ├── Tags.vue │ ├── NbViewer.vue │ ├── Chat.vue │ ├── ChatOverlay.vue │ ├── ChatMessage.vue │ └── OverlayPage.vue ├── pages │ ├── end.vue │ ├── pause.vue │ ├── start.vue │ └── index.vue ├── types │ ├── chat.ts │ └── stream.ts ├── assets │ ├── icons │ │ └── shelve.svg │ └── style │ │ └── main.css ├── composables │ ├── useTwitchBadges.ts │ ├── useTwitchChat.ts │ ├── useTwitchEmotes.ts │ └── useStream.ts └── layouts │ ├── default.vue │ └── overlay.vue ├── .npmrc ├── eslint.config.mjs ├── tsconfig.json ├── renovate.json ├── shelve.json ├── types └── irc-message.d.ts ├── .gitignore ├── nuxt.config.ts ├── package.json ├── README.md └── LICENSE /public/robots.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.github/funding.yml: -------------------------------------------------------------------------------- 1 | github: [HugoRCD] 2 | -------------------------------------------------------------------------------- /server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../.nuxt/tsconfig.server.json" 3 | } 4 | -------------------------------------------------------------------------------- /app/app.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HugoRCD/twitch-assets/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HugoRCD/twitch-assets/HEAD/public/noise.png -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | shamefully-hoist=true 2 | auto-install-peers=true 3 | ignore-workspace-root-check=true 4 | -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import { createConfig } from "@hrcd/eslint-config" 2 | 3 | export default createConfig() 4 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // https://nuxt.com/docs/guide/concepts/typescript 3 | "extends": "./.nuxt/tsconfig.json" 4 | } 5 | -------------------------------------------------------------------------------- /app/utils/tags.ts: -------------------------------------------------------------------------------- 1 | export const tags = [ 2 | 'Nuxt', 3 | 'Vue', 4 | 'Tailwind', 5 | 'TypeScript', 6 | 'Raycast' 7 | ] 8 | -------------------------------------------------------------------------------- /app/app.config.ts: -------------------------------------------------------------------------------- 1 | export default defineAppConfig({ 2 | ui: { 3 | colors: { 4 | neutral: 'neutral' 5 | } 6 | } 7 | }) 8 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "local>HugoRCD/renovate-config" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /shelve.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/HugoRCD/shelve/main/packages/types/schema.json", 3 | "project": "twitch", 4 | "defaultEnv": "development", 5 | "slug": "hugo" 6 | } 7 | -------------------------------------------------------------------------------- /app/components/Player.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /types/irc-message.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'irc-message' { 2 | interface TwitchIRCMessage { 3 | command: string 4 | params: string[] 5 | prefix?: string 6 | tags?: Record 7 | } 8 | 9 | export function parse(message: string): TwitchIRCMessage | null 10 | } 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Nuxt dev/build outputs 2 | .output 3 | .data 4 | .nuxt 5 | .nitro 6 | .cache 7 | dist 8 | 9 | # Node dependencies 10 | node_modules 11 | 12 | # Logs 13 | logs 14 | *.log 15 | 16 | # Misc 17 | .DS_Store 18 | .fleet 19 | .idea 20 | 21 | # Local env files 22 | .env 23 | .env.* 24 | !.env.example 25 | -------------------------------------------------------------------------------- /app/pages/end.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 14 | -------------------------------------------------------------------------------- /app/utils/socials.ts: -------------------------------------------------------------------------------- 1 | export const socials = [ 2 | { 3 | name: 'hugorcd', 4 | icon: 'i-simple-icons-github', 5 | }, 6 | { 7 | name: 'hugorcd__', 8 | icon: 'i-simple-icons-x', 9 | }, 10 | { 11 | name: '@hrcd.fr', 12 | icon: 'i-simple-icons-bluesky', 13 | }, 14 | { 15 | name: 'hugo.rcd_', 16 | icon: 'i-simple-icons-instagram', 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /app/pages/pause.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | -------------------------------------------------------------------------------- /app/pages/start.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | -------------------------------------------------------------------------------- /app/types/chat.ts: -------------------------------------------------------------------------------- 1 | export interface ChatMessage { 2 | username: string 3 | message: string 4 | timestamp: string 5 | badges: Record 6 | emotes?: Record 7 | color?: string 8 | rawEmotes?: string 9 | } 10 | 11 | export interface BadgeSets { 12 | [badge: string]: { 13 | versions: { 14 | [version: string]: { 15 | image_url_1x: string 16 | image_url_2x: string 17 | image_url_4x: string 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/components/Tags.vue: -------------------------------------------------------------------------------- 1 | 23 | -------------------------------------------------------------------------------- /app/components/NbViewer.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 21 | -------------------------------------------------------------------------------- /app/components/Chat.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.yml: -------------------------------------------------------------------------------- 1 | name: "💬 Question" 2 | description: Ask a question about the project. 3 | labels: ["question"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Before requesting a question, please make sure that you have read through our [documentation](https://hrcd.fr) and existing [issues](https://github.com/HugoRCD/hr-folio/issues) to see if the feature has already been requested or implemented. If it has, please add your reaction to the existing issue instead of creating a new one. 9 | - type: textarea 10 | id: description 11 | attributes: 12 | label: Description 13 | validations: 14 | required: true 15 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Check if packages can be built 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - '**' 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v4 16 | - uses: actions/setup-node@v4 17 | with: 18 | node-version: '22.15.1' 19 | 20 | - name: Install pnpm 21 | uses: pnpm/action-setup@v2 22 | with: 23 | version: latest 24 | run_install: false 25 | 26 | - name: 📦 Install dependencies 27 | run: pnpm install 28 | 29 | - name: 🛠️ Build 30 | run: pnpm run build 31 | -------------------------------------------------------------------------------- /app/assets/icons/shelve.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nuxt.config.ts: -------------------------------------------------------------------------------- 1 | // https://nuxt.com/docs/api/configuration/nuxt-config 2 | export default defineNuxtConfig({ 3 | compatibilityDate: '2024-11-01', 4 | 5 | devtools: { enabled: true }, 6 | 7 | future: { 8 | compatibilityVersion: 4 9 | }, 10 | 11 | hub: { 12 | workers: true 13 | }, 14 | 15 | nitro: { 16 | experimental: { 17 | websocket: true 18 | } 19 | }, 20 | 21 | css: ['~/assets/style/main.css'], 22 | 23 | runtimeConfig: { 24 | twitch: { 25 | clientId: '', 26 | clientSecret: '', 27 | oauthToken: '' 28 | } 29 | }, 30 | 31 | modules: [ 32 | '@nuxt/ui', 33 | '@nuxt/image', 34 | '@vueuse/nuxt', 35 | '@nuxthub/core', 36 | 'motion-v/nuxt', 37 | '@nuxtjs/mdc', 38 | ], 39 | }) -------------------------------------------------------------------------------- /app/types/stream.ts: -------------------------------------------------------------------------------- 1 | export interface TwitchUser { 2 | id: string 3 | login: string 4 | display_name: string 5 | type: string 6 | broadcaster_type: string 7 | description: string 8 | profile_image_url: string 9 | offline_image_url: string 10 | view_count: number 11 | created_at: string 12 | } 13 | 14 | export interface TwitchStream { 15 | id: string 16 | user_id: string 17 | user_login: string 18 | user_name: string 19 | game_id: string 20 | game_name: string 21 | type: string 22 | title: string 23 | viewer_count: number 24 | started_at: string 25 | language: string 26 | thumbnail_url: string 27 | tag_ids?: string[] 28 | is_mature: boolean 29 | } 30 | 31 | export interface StreamData { 32 | user: TwitchUser 33 | stream: TwitchStream | null 34 | } 35 | -------------------------------------------------------------------------------- /app/pages/index.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 30 | -------------------------------------------------------------------------------- /app/components/ChatOverlay.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.yml: -------------------------------------------------------------------------------- 1 | name: "🚀 Feature request" 2 | description: Suggest an idea or enhancement for the project. 3 | labels: ["enhancement"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Before requesting a feature, please make sure that you have read through our [documentation](https://hrcd.fr) and existing [issues](https://github.com/HugoRCD/hr-folio/issues) to see if the feature has already been requested or implemented. If it has, please add your reaction to the existing issue instead of creating a new one. 9 | - type: textarea 10 | id: description 11 | attributes: 12 | label: Description 13 | description: A clear and concise description of what you think would be an helpful addition to the project, including the possible use cases and alternatives you have considered. 14 | validations: 15 | required: true 16 | - type: textarea 17 | id: additional 18 | attributes: 19 | label: Additional context 20 | description: If applicable, add any other context or screenshots here. 21 | -------------------------------------------------------------------------------- /.github/workflows/nuxthub.yml: -------------------------------------------------------------------------------- 1 | name: Deploy to NuxtHub 2 | on: push 3 | 4 | jobs: 5 | deploy: 6 | name: "Deploy to NuxtHub" 7 | runs-on: ubuntu-latest 8 | environment: 9 | name: ${{ github.ref == 'refs/heads/main' && 'production' || 'preview' }} 10 | url: ${{ steps.deploy.outputs.deployment-url }} 11 | permissions: 12 | contents: read 13 | id-token: write 14 | 15 | steps: 16 | - uses: actions/checkout@v4 17 | 18 | - name: Install pnpm 19 | uses: pnpm/action-setup@v4 20 | 21 | - name: Install Node.js 22 | uses: actions/setup-node@v4 23 | with: 24 | node-version: 22 25 | cache: 'pnpm' 26 | 27 | - name: Install dependencies 28 | run: pnpm install 29 | 30 | - name: Ensure NuxtHub module is installed 31 | run: pnpx nuxthub@latest ensure 32 | 33 | - name: Build application 34 | run: pnpm build 35 | 36 | - name: Deploy to NuxtHub 37 | uses: nuxt-hub/action@v1 38 | id: deploy 39 | with: 40 | project-key: twitch-f5y4 41 | -------------------------------------------------------------------------------- /app/assets/style/main.css: -------------------------------------------------------------------------------- 1 | @import "tailwindcss"; 2 | @import "@nuxt/ui"; 3 | 4 | @theme static { 5 | --font-serif: "Instrument Serif", serif; 6 | --font-sans: "Geist", sans-serif; 7 | --font-mono: "Geist Mono", sans-serif; 8 | } 9 | 10 | :root { 11 | --ui-primary: rgb(40, 83, 255) !important; 12 | --ui-bg: rgb(248, 243, 238); 13 | } 14 | 15 | .dark { 16 | --ui-primary: rgb(8, 73, 236) !important; 17 | --ui-bg: rgb(2, 2, 2); 18 | } 19 | 20 | html, body, #__nuxt, #__layout { 21 | width: 100%; 22 | height: 100%; 23 | } 24 | 25 | /* Main Noise effect */ 26 | .noise { 27 | animation: noise 2s steps(10) infinite; 28 | } 29 | 30 | @keyframes noise { 31 | 0%, 20%, 40%, 60%, 80%, 100% { 32 | transform: translate(0, 0); 33 | } 34 | 10% { 35 | transform: translate(-5%, -10%); 36 | } 37 | 30% { 38 | transform: translate(5%, 10%); 39 | } 40 | 50% { 41 | transform: translate(-15%, 5%); 42 | } 43 | 70% { 44 | transform: translate(10%, -5%); 45 | } 46 | 90% { 47 | transform: translate(5%, -10%); 48 | } 49 | } -------------------------------------------------------------------------------- /.github/release.yml: -------------------------------------------------------------------------------- 1 | changelog: 2 | exclude: 3 | labels: 4 | - ignore-for-release 5 | authors: 6 | - octocat 7 | categories: 8 | - title: Breaking Changes 💥 9 | labels: 10 | - breaking 11 | - title: Features 🚀 12 | labels: 13 | - feature 14 | - title: Enhancements 🌈 15 | labels: 16 | - enhancement 17 | - title: Bug Fixes 🐞 18 | labels: 19 | - bug 20 | - title: Build System 🛠 21 | labels: 22 | - build 23 | - title: Continuous Integration 🔄 24 | labels: 25 | - ci 26 | - title: Documentation 📚 27 | labels: 28 | - documentation 29 | - title: Tests 🧪 30 | labels: 31 | - test 32 | - title: Refactoring 🛠 33 | labels: 34 | - refactor 35 | - title: Dependency Updates 📦 36 | labels: 37 | - dependencies 38 | - title: Performance Improvements ⚡️ 39 | labels: 40 | - performance 41 | - title: Style 💅 42 | labels: 43 | - style 44 | - title: Revert 🔄 45 | labels: 46 | - revert 47 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nuxt-app", 3 | "private": true, 4 | "type": "module", 5 | "scripts": { 6 | "build": "nuxt build", 7 | "dev": "nuxt dev", 8 | "generate": "nuxt generate", 9 | "preview": "nuxt preview", 10 | "postinstall": "nuxt prepare", 11 | "lint": "eslint .", 12 | "lint:fix": "eslint --fix .", 13 | "deploy": "nuxthub deploy" 14 | }, 15 | "dependencies": { 16 | "@iconify-json/heroicons": "^1.2.2", 17 | "@iconify-json/lucide": "^1.2.44", 18 | "@iconify-json/simple-icons": "^1.2.34", 19 | "@iconify-json/vscode-icons": "^1.2.21", 20 | "@nuxt/image": "^1.10.0", 21 | "@nuxt/ui": "^3.1.2", 22 | "@nuxthub/core": "0.8.27", 23 | "@nuxtjs/mdc": "0.17.0", 24 | "@shelve/cli": "^4.1.6", 25 | "@vueuse/nuxt": "13.2.0", 26 | "irc-message": "^3.0.2", 27 | "motion-plus": "^0.1.9", 28 | "motion-plus-vue": "^1.1.5", 29 | "motion-v": "1.0.2", 30 | "nuxt": "^3.17.3", 31 | "vue": "latest", 32 | "ws": "^8.18.2" 33 | }, 34 | "devDependencies": { 35 | "@hrcd/eslint-config": "^3.0.3", 36 | "@types/ws": "^8.18.1" 37 | }, 38 | "packageManager": "pnpm@8.6.5+sha1.a074a371066567dcdeb19a1d1bd9a78cf3c9faa3" 39 | } 40 | -------------------------------------------------------------------------------- /app/composables/useTwitchBadges.ts: -------------------------------------------------------------------------------- 1 | import { useFetch } from '#app' 2 | import type { BadgeSets } from '~/types/chat' 3 | 4 | export const useTwitchBadges = (channelId: string) => { 5 | const globalBadges = ref({}) 6 | const channelBadges = ref({}) 7 | 8 | useFetch('https://badges.twitch.tv/v1/badges/global/display', { 9 | onResponse({ response }) { 10 | globalBadges.value = response._data?.badge_sets || {} 11 | } 12 | }) 13 | 14 | useFetch(`https://badges.twitch.tv/v1/badges/channels/${channelId}/display`, { 15 | onResponse({ response }) { 16 | channelBadges.value = response._data?.badge_sets || {} 17 | } 18 | }) 19 | 20 | function getBadgeUrl(badge: string, version: string): string | undefined { 21 | const channel = channelBadges.value[badge]?.versions[version]?.image_url_1x 22 | const globalBadge = globalBadges.value[badge]?.versions[version]?.image_url_1x 23 | if (channel) return channel 24 | if (globalBadge) return globalBadge 25 | if (badge === 'broadcaster' && version === '1') { 26 | return 'https://static-cdn.jtvnw.net/badges/v1/5527c58c-fb7d-422d-b71b-f309dcb85cc1/1' 27 | } 28 | } 29 | 30 | return { getBadgeUrl } 31 | } 32 | -------------------------------------------------------------------------------- /app/composables/useTwitchChat.ts: -------------------------------------------------------------------------------- 1 | import type { ChatMessage } from '~/types/chat' 2 | 3 | export const useTwitchChat = () => { 4 | const toast = useToast() 5 | const messages = useState('twitch-chat-messages', () => []) 6 | const isConnected = computed(() => status.value === 'OPEN') 7 | 8 | const { status, send, open, close } = useWebSocket('/chat', { 9 | autoReconnect: { 10 | retries: 3, 11 | delay: 5000, 12 | onFailed: () => { 13 | console.error('Failed to connect to Twitch chat after 3 retries') 14 | } 15 | }, 16 | onMessage: (ws, event) => { 17 | const message = JSON.parse(event.data) as ChatMessage 18 | console.log(message) 19 | if (message.message.includes('fesse')) { 20 | toast.add({ 21 | title: `Fesse de ${message.username}`, 22 | description: 'Fesse', 23 | }) 24 | } 25 | messages.value = [...messages.value, message].slice(-100) 26 | } 27 | }) 28 | 29 | onMounted(() => { 30 | open() 31 | }) 32 | 33 | onUnmounted(() => { 34 | close() 35 | }) 36 | 37 | return { 38 | messages, 39 | isConnected, 40 | connect: open, 41 | disconnect: close, 42 | send 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/layouts/default.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 27 | -------------------------------------------------------------------------------- /app/components/ChatMessage.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 38 | -------------------------------------------------------------------------------- /app/composables/useTwitchEmotes.ts: -------------------------------------------------------------------------------- 1 | interface EmotePosition { 2 | id: string 3 | start: number 4 | end: number 5 | } 6 | 7 | export function parseTwitchEmotes(emotesTag: string | undefined, message: string) { 8 | if (typeof emotesTag !== 'string' || emotesTag === '') return [{ text: message }] 9 | const emotes: { id: string; positions: [number, number][] }[] = [] 10 | const emoteParts = emotesTag.split('/') 11 | for (const part of emoteParts) { 12 | const [id, positions] = part.split(':') 13 | if (!id || !positions) continue 14 | emotes.push({ 15 | id, 16 | positions: positions.split(',').map(pos => { 17 | const [start, end] = pos.split('-').map(Number) 18 | return [start, end] as [number, number] 19 | }) 20 | }) 21 | } 22 | const result: { text: string; emoteId?: string }[] = [] 23 | let lastIndex = 0 24 | for (const emote of emotes) { 25 | for (const [start, end] of emote.positions) { 26 | if (lastIndex < start) { 27 | result.push({ text: message.slice(lastIndex, start) }) 28 | } 29 | result.push({ text: message.slice(start, end + 1), emoteId: emote.id }) 30 | lastIndex = end + 1 31 | } 32 | } 33 | if (lastIndex < message.length) { 34 | result.push({ text: message.slice(lastIndex) }) 35 | } 36 | return result 37 | } 38 | 39 | export function getTwitchEmoteUrl(emoteId: string, size: 1 | 2 | 3 = 1) { 40 | return `https://static-cdn.jtvnw.net/emoticons/v2/${emoteId}/default/dark/${size}.0` 41 | } 42 | -------------------------------------------------------------------------------- /app/composables/useStream.ts: -------------------------------------------------------------------------------- 1 | import type { StreamData } from '~/types/stream' 2 | 3 | export const useStream = () => { 4 | const stream = useState('stream-data', () => null) 5 | const isLive = computed(() => !!stream.value?.stream) 6 | 7 | const POLLING_INTERVALS = { 8 | LIVE: 10000, 9 | OFFLINE: 30000, 10 | } 11 | 12 | let pollingInterval: NodeJS.Timeout | null = null 13 | 14 | const fetchStreamData = async () => { 15 | try { 16 | const response = await $fetch('/api/stream') 17 | if (response) { 18 | stream.value = response 19 | } 20 | } catch (error) { 21 | console.error('Error fetching stream data:', error) 22 | } 23 | } 24 | 25 | const startPolling = () => { 26 | if (pollingInterval) return 27 | 28 | const poll = () => { 29 | fetchStreamData() 30 | const interval = isLive.value ? POLLING_INTERVALS.LIVE : POLLING_INTERVALS.OFFLINE 31 | pollingInterval = setTimeout(poll, interval) 32 | } 33 | 34 | poll() 35 | } 36 | 37 | const stopPolling = () => { 38 | if (pollingInterval) { 39 | clearTimeout(pollingInterval) 40 | pollingInterval = null 41 | } 42 | } 43 | 44 | watch(isLive, () => { 45 | if (pollingInterval) { 46 | stopPolling() 47 | startPolling() 48 | } 49 | }) 50 | 51 | onMounted(() => { 52 | fetchStreamData() 53 | startPolling() 54 | }) 55 | 56 | onUnmounted(() => { 57 | stopPolling() 58 | }) 59 | 60 | return { 61 | stream, 62 | isLive, 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 20 | 21 | ### 🔗 Linked issue 22 | 23 | 24 | 25 | ### 📚 Description 26 | 27 | 28 | 29 | 30 | ### 📝 Checklist 31 | 32 | 33 | 34 | 35 | 36 | - [ ] I have linked an issue or discussion. 37 | - [ ] I have updated the documentation accordingly. 38 | -------------------------------------------------------------------------------- /.github/workflows/semantic-pull-request.yml: -------------------------------------------------------------------------------- 1 | name: validate pr title 2 | 3 | on: 4 | pull_request_target: 5 | types: 6 | - opened 7 | - reopened 8 | - edited 9 | - synchronize 10 | 11 | permissions: 12 | pull-requests: write 13 | 14 | jobs: 15 | validate-pr: 16 | name: Validate PR title 17 | if: ${{ !contains(github.actor, 'renovate') }} 18 | 19 | runs-on: ubuntu-latest 20 | steps: 21 | - uses: amannn/action-semantic-pull-request@v5 22 | id: lint_pr_title 23 | with: 24 | types: | 25 | breaking 26 | feat 27 | fix 28 | build 29 | ci 30 | docs 31 | enhancement 32 | chore 33 | performance 34 | style 35 | test 36 | refactor 37 | revert 38 | env: 39 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 40 | 41 | - uses: marocchino/sticky-pull-request-comment@v2 42 | # When the previous steps fail, the workflow would stop. By adding this 43 | # condition you can continue the execution with the populated error message. 44 | if: always() && (steps.lint_pr_title.outputs.error_message != null) 45 | with: 46 | header: pr-title-lint-error 47 | message: | 48 | Hey there and thank you for opening this pull request! 👋🏼 49 | 50 | We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted. 51 | 52 | Details: 53 | 54 | ``` 55 | ${{ steps.lint_pr_title.outputs.error_message }} 56 | ``` 57 | 58 | # Delete a previous comment when the issue has been resolved 59 | - if: ${{ steps.lint_pr_title.outputs.error_message == null }} 60 | uses: marocchino/sticky-pull-request-comment@v2 61 | with: 62 | header: pr-title-lint-error 63 | message: | 64 | Thank you for following the naming conventions! 🙏 65 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.yml: -------------------------------------------------------------------------------- 1 | name: "🐛 Bug report" 2 | description: Report a bug to help us improve the project. 3 | labels: ["bug"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Before reporting a bug, please make sure that you have read through our [documentation](https://hrcd.fr) and existing [issues](https://github.com/HugoRCD/hr-folio/issues) to see if the bug has already been reported or fixed. If it has, please add your reaction to the existing issue instead of creating a new one. 9 | - type: textarea 10 | id: env 11 | attributes: 12 | label: Environment 13 | description: | 14 | Please complete the following information, for example: 15 | - OS: Windows 10 16 | - Browser: Chrome 88 17 | - Node.js version: 14.15.4 18 | - Package manager: npm 6.14.10 19 | validations: 20 | required: true 21 | - type: input 22 | id: version 23 | attributes: 24 | label: Version 25 | placeholder: v2.8.0 26 | validations: 27 | required: true 28 | - type: textarea 29 | id: reproduction 30 | attributes: 31 | label: Reproduction 32 | description: A reproduction is strongly encouraged, to help us identify the issue and fix it. You can use a code sandbox or a repository to reproduce the issue. 33 | placeholder: https://stackblitz.com/edit/blanked 34 | validations: 35 | required: true 36 | - type: textarea 37 | id: description 38 | attributes: 39 | label: Description 40 | description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. 41 | validations: 42 | required: true 43 | - type: textarea 44 | id: additonal 45 | attributes: 46 | label: Additional context 47 | description: If applicable, add any other context or screenshots here. 48 | - type: textarea 49 | id: logs 50 | attributes: 51 | label: Logs 52 | description: | 53 | Optional if provided reproduction. Please try not to insert an image but copy paste the log text. 54 | render: shell-script 55 | -------------------------------------------------------------------------------- /.github/workflows/label-pr.yml: -------------------------------------------------------------------------------- 1 | name: Label PR 2 | 3 | on: 4 | pull_request_target: 5 | types: 6 | - opened 7 | branches: 8 | - main 9 | 10 | jobs: 11 | add-pr-labels: 12 | name: Add PR labels 13 | runs-on: ubuntu-latest 14 | permissions: 15 | pull-requests: write 16 | steps: 17 | - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 18 | env: 19 | PULL_REQUEST_TITLE: ${{ github.event.pull_request.title }} 20 | with: 21 | script: | 22 | const labelsToAdd = [] 23 | 24 | const pullRequest = { 25 | number: ${{ github.event.pull_request.number }}, 26 | title: process.env.PULL_REQUEST_TITLE, 27 | labelsNames: ${{ toJson(github.event.pull_request.labels.*.name) }} 28 | } 29 | 30 | // Select label based on the type in PR title 31 | const pullRequestTypeToLabelName = { 32 | breaking: 'breaking', 33 | feat: 'feature', 34 | fix: 'bug', 35 | build: 'build', 36 | ci: 'ci', 37 | docs: 'documentation', 38 | enhancement: 'enhancement', 39 | chore: 'dependencies', 40 | perf: 'performance', 41 | style: 'style', 42 | test: 'test', 43 | refactor: 'refactor', 44 | revert: 'revert' 45 | } 46 | 47 | for (const [pullRequestType, labelName] of Object.entries( 48 | pullRequestTypeToLabelName 49 | )) { 50 | if ( 51 | pullRequest.title.startsWith(pullRequestType) && 52 | !pullRequest.labelsNames.includes( 53 | pullRequestTypeToLabelName[pullRequestType] 54 | ) 55 | ) { 56 | labelsToAdd.push(labelName) 57 | 58 | break 59 | } 60 | } 61 | 62 | // Add selected labels 63 | if (labelsToAdd.length > 0) { 64 | github.rest.issues.addLabels({ 65 | issue_number: pullRequest.number, 66 | owner: context.repo.owner, 67 | repo: context.repo.repo, 68 | labels: labelsToAdd 69 | }) 70 | } 71 | -------------------------------------------------------------------------------- /server/api/stream.get.ts: -------------------------------------------------------------------------------- 1 | import { H3Event } from 'h3' 2 | import { z } from 'zod' 3 | 4 | const USERS_SCHEMA = z.object({ 5 | data: z.array(z.object({ 6 | id: z.string(), 7 | login: z.string(), 8 | display_name: z.string(), 9 | type: z.string(), 10 | broadcaster_type: z.string(), 11 | description: z.string(), 12 | profile_image_url: z.string(), 13 | offline_image_url: z.string(), 14 | view_count: z.number(), 15 | created_at: z.string(), 16 | })), 17 | }) 18 | 19 | const STREAMS_SCHEMA = z.object({ 20 | data: z.array(z.object({ 21 | id: z.string(), 22 | user_id: z.string(), 23 | user_login: z.string(), 24 | user_name: z.string(), 25 | game_id: z.string(), 26 | game_name: z.string(), 27 | type: z.string(), 28 | title: z.string(), 29 | viewer_count: z.number(), 30 | started_at: z.string(), 31 | language: z.string(), 32 | thumbnail_url: z.string(), 33 | tag_ids: z.array(z.string()).optional(), 34 | is_mature: z.boolean(), 35 | })), 36 | pagination: z.object({ 37 | cursor: z.string().optional(), 38 | }).optional(), 39 | }) 40 | 41 | type GetAccessTokenParams = { 42 | clientId: string; 43 | clientSecret: string; 44 | }; 45 | 46 | async function getAccessToken({ 47 | clientId, 48 | clientSecret, 49 | }: GetAccessTokenParams): Promise { 50 | const body = new FormData() 51 | body.append('client_id', clientId) 52 | body.append('client_secret', clientSecret) 53 | body.append('grant_type', 'client_credentials') 54 | 55 | try { 56 | const result = await $fetch('https://id.twitch.tv/oauth2/token', { 57 | method: 'POST', 58 | body, 59 | }) 60 | return result.access_token as string 61 | } catch (e) { 62 | console.log(e) 63 | throw createError({ 64 | status: 500, 65 | message: 'Error getting access token', 66 | }) 67 | } 68 | } 69 | 70 | async function fetchTwitchUserAndStream(event: H3Event) { 71 | const { clientId, clientSecret } = useRuntimeConfig(event).twitch 72 | const accessToken = await getAccessToken({ clientId, clientSecret }) 73 | const login = 'hugo_rcd' 74 | 75 | // Fetch user info 76 | const userRaw = await $fetch('https://api.twitch.tv/helix/users', { 77 | query: { login }, 78 | headers: { 79 | Authorization: `Bearer ${accessToken}`, 80 | 'Client-Id': clientId, 81 | }, 82 | }) 83 | const userParsed = USERS_SCHEMA.parse(userRaw) 84 | const user = userParsed.data[0] ?? null 85 | 86 | // Fetch stream info 87 | const streamRaw = await $fetch('https://api.twitch.tv/helix/streams', { 88 | query: { user_login: login, first: 1 }, 89 | headers: { 90 | Authorization: `Bearer ${accessToken}`, 91 | 'Client-Id': clientId, 92 | }, 93 | }) 94 | const streamParsed = STREAMS_SCHEMA.parse(streamRaw) 95 | const stream = streamParsed.data[0] ?? null 96 | 97 | return { user, stream } 98 | } 99 | 100 | export default defineEventHandler(async (event) => { 101 | return await fetchTwitchUserAndStream(event) 102 | }) 103 | -------------------------------------------------------------------------------- /server/routes/chat.ts: -------------------------------------------------------------------------------- 1 | import { Socket, createConnection } from 'net' 2 | import { parse } from 'irc-message' 3 | import { useRuntimeConfig } from '#imports' 4 | import type { ChatMessage } from '~/types/chat' 5 | 6 | function parseBadges(badgesStr: string | undefined): Record { 7 | console.log('badgesStr', badgesStr) 8 | if (!badgesStr && typeof badgesStr !== 'string' && badgesStr !== 'true') return {} 9 | return badgesStr.split(',').reduce((acc, badge) => { 10 | const [name, version] = badge.split('/') 11 | if (name && version) acc[name] = version 12 | return acc 13 | }, {} as Record) 14 | } 15 | 16 | function parseEmotes(emotesStr: string | undefined): Record { 17 | if (!emotesStr || emotesStr === '') return {} 18 | try { 19 | return JSON.parse(emotesStr) 20 | } catch { 21 | return {} 22 | } 23 | } 24 | 25 | let ircClient: Socket | null = null 26 | let ircConnected = false 27 | const wsClients: Set = new Set() 28 | 29 | function connectToTwitchChat(broadcast: (msg: ChatMessage) => void) { 30 | if (ircConnected && ircClient) return 31 | const { twitch } = useRuntimeConfig() 32 | const { clientId, oauthToken } = twitch 33 | if (!oauthToken) return 34 | 35 | if (!ircClient) { 36 | ircClient = createConnection(6667, 'irc.chat.twitch.tv', () => { 37 | ircConnected = true 38 | ircClient!.write(`PASS ${oauthToken}\r\n`) 39 | ircClient!.write(`NICK ${clientId}\r\n`) 40 | ircClient!.write('CAP REQ :twitch.tv/membership twitch.tv/tags twitch.tv/commands\r\n') 41 | ircClient!.write('JOIN #hugo_rcd\r\n') 42 | }) 43 | } 44 | ircClient.removeAllListeners('data') 45 | ircClient.on('data', (data: Buffer) => { 46 | const rawMessage = data.toString() 47 | const messages = rawMessage.split('\r\n') 48 | for (const message of messages) { 49 | if (!message) continue 50 | const parsed = parse(message) 51 | if (!parsed) continue 52 | if (parsed.command === 'PRIVMSG') { 53 | const chatMessage: ChatMessage = { 54 | username: parsed.tags?.['display-name'] || parsed.prefix?.split('!')[0] || '', 55 | message: parsed.params?.[1] || '', 56 | timestamp: new Date().toISOString(), 57 | badges: parseBadges(parsed.tags?.['badges']), 58 | color: parsed.tags?.['color'], 59 | rawEmotes: parsed.tags?.['emotes'] || '' 60 | } 61 | broadcast(chatMessage) 62 | } 63 | if (parsed.command === 'PING' && ircClient) { 64 | ircClient.write('PONG :tmi.twitch.tv\r\n') 65 | } 66 | } 67 | }) 68 | ircClient.removeAllListeners('error') 69 | ircClient.on('error', () => { 70 | ircConnected = false 71 | setTimeout(() => connectToTwitchChat(broadcast), 5000) 72 | }) 73 | ircClient.removeAllListeners('close') 74 | ircClient.on('close', () => { 75 | ircConnected = false 76 | setTimeout(() => connectToTwitchChat(broadcast), 5000) 77 | }) 78 | } 79 | 80 | export default defineWebSocketHandler({ 81 | open(peer) { 82 | wsClients.add(peer) 83 | if (wsClients.size === 1) { 84 | connectToTwitchChat((msg) => { 85 | for (const client of wsClients) { 86 | client.send(JSON.stringify(msg)) 87 | } 88 | }) 89 | } 90 | }, 91 | close(peer) { 92 | wsClients.delete(peer) 93 | } 94 | }) 95 | -------------------------------------------------------------------------------- /app/layouts/overlay.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 81 | 82 | 87 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |

My Nuxt-Powered Twitch Assets

3 |

Ever thought about building your Twitch stream assets with Nuxt? Turns out, it's not only possible, it's awesome!

4 |

This repository contains all the dynamic overlays, alerts, and tools I use for my personal Twitch stream, all built with Nuxt and Vue.

5 |

6 | Watch My Stream · 7 | See Them In Action 8 |

9 |
10 | 11 | --- 12 | 13 | ## ✨ Why Nuxt for Twitch Assets? 14 | 15 | You might not think of Nuxt when planning your stream visuals, but it offers some incredible advantages: 16 | 17 | * **Full Creative Control:** Leverage the power of Vue components and modern web technologies to create truly unique and interactive assets. 18 | * **Dynamic Content:** Easily integrate real-time data, APIs (like the Twitch API I'm already using!), or even server-side logic with Nitro. 19 | * **Reactivity:** Vue's reactivity makes for smooth and responsive overlays that can react to stream events. 20 | * **Familiar Workflow:** If you're a web developer, you're already in your comfort zone! 21 | * **Open Source & Customizable:** This repo serves as a live example. Fork it, learn from it, and adapt it for your own stream! 22 | * **Powered by @nuxt_hub & Cloudflare Workers:** Deployed on the edge for optimal performance and enabling real-time features like WebSockets. 23 | 24 | ## 🚀 Current State & Future Vision 25 | 26 | This project is actively under development. Here's a glimpse of what's here and what's planned: 27 | 28 | **Implemented:** 29 | * Integration with the Twitch API (for basic data, more to come!). 30 | * Deployment on [@nuxt_hub](https://x.com/nuxt_hub) using Cloudflare Workers. 31 | 32 | **Roadmap / To-Do (The exciting stuff I'm building!):** 33 | * 🖼️ **Customizable Overlays:** Starting Soon, Be Right Back, Stream Ending screens. 34 | * 💬 **Interactive Elements:** Real-time chat display, follower/subscriber/raid alerts (leveraging WebSockets!). 35 | * 📊 **Dynamic Information Display:** Current project, music playing, social media handles, sponsor logos. 36 | * 🎨 **Themeable Design:** Easily switch looks or create your own themes. 37 | * 🔧 **Easy Configuration Interface:** (Potentially a simple UI to manage asset settings). 38 | * 🌐 **Optimized Browser Sources:** Ensuring smooth performance in OBS, Streamlabs, etc. 39 | 40 | The goal is to showcase a comprehensive suite of Nuxt-powered stream assets! 41 | 42 |
🛠️ Getting Started (Basic Nuxt Setup) 43 | 44 | This project is a standard Nuxt application. 45 | 46 | 1. Clone the repo: 47 | ```bash 48 | git clone https://github.com/HugoRCD/twitch-assets.git 49 | ``` 50 | 2. Navigate to the project directory: 51 | ```bash 52 | cd twitch-assets 53 | ``` 54 | 3. Install dependencies (using PNPM): 55 | ```bash 56 | pnpm install 57 | ``` 58 | 4. Configure your Twitch API credentials and other settings in `.env` (create one from `.env.example` if provided) for the chat you will need to create a special token here (https://twitchtokengenerator.com). 59 | 5. Run the Nuxt development server: 60 | ```bash 61 | pnpm dev 62 | ``` 63 | 6. Add the relevant Nuxt routes (e.g., `http://localhost:3000/starting-soon`) as Browser Sources in your streaming software. 64 | 65 |
66 | 67 | ## 💡 Get Inspired! 68 | 69 | Feel free to browse the code as it develops, see how things are structured, and get inspired to build your own Nuxt-powered stream assets. You might be surprised by what's possible! 70 | 71 | While this project hosts *my* personal assets, the patterns and techniques can be adapted for any stream. 72 | 73 | ## 🤝 Contributing & Feedback 74 | 75 | This is primarily a showcase of my personal setup and a learning journey in building these assets. However, if you have cool ideas, find bugs, or want to share how you've adapted this, feel free to open an issue or discussion! 76 | 77 | And if you find this inspiring, a star ⭐ on the repo is always appreciated! 78 | 79 | ## 📝 License 80 | 81 | Distributed under the Apache-2.0 License. See `LICENSE` for more information. 82 | 83 | --- 84 | 85 |
86 | Happy Streaming! Built with Nuxt 💚 & Deployed on @nuxt_hub 87 |
88 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2024-present Hugo Richard 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /app/components/OverlayPage.vue: -------------------------------------------------------------------------------- 1 | 58 | 59 | 633 | 634 | 639 | --------------------------------------------------------------------------------