Skip to content

Commit

Permalink
Merge pull request #10 from AQUASINE/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
AQUASINE authored Apr 22, 2024
2 parents 92c8089 + 79d1cab commit c285471
Show file tree
Hide file tree
Showing 61 changed files with 1,108 additions and 234 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

myenv

node_modules
dist
dist-ssr
Expand Down
50 changes: 30 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,56 @@
# electron-vite-vue
# Podium Live

🥳 Really simple `Electron` + `Vue` + `Vite` boilerplate.
Twitch/YouTube ranking client intended to help streamers develop interesting apps for their viewers.

<!-- [![awesome-vite](https://awesome.re/mentioned-badge.svg)](https://github.com/vitejs/awesome-vite) -->
<!-- [![Netlify Status](https://api.netlify.com/api/v1/badges/ae3863e3-1aec-4eb1-8f9f-1890af56929d/deploy-status)](https://app.netlify.com/sites/electron-vite/deploys) -->
<!-- [![GitHub license](https://img.shields.io/github/license/caoxiemeihao/electron-vite-vue)](https://github.com/electron-vite/electron-vite-vue/blob/main/LICENSE) -->
<!-- [![GitHub stars](https://img.shields.io/github/stars/caoxiemeihao/electron-vite-vue?color=fa6470)](https://github.com/electron-vite/electron-vite-vue) -->
<!-- [![GitHub forks](https://img.shields.io/github/forks/caoxiemeihao/electron-vite-vue)](https://github.com/electron-vite/electron-vite-vue) -->
[![GitHub Build](https://github.com/electron-vite/electron-vite-vue/actions/workflows/build.yml/badge.svg)](https://github.com/electron-vite/electron-vite-vue/actions/workflows/build.yml)
[![GitHub Discord](https://img.shields.io/badge/chat-discord-blue?logo=discord)](https://discord.gg/sRqjYpEAUK)
[![GitHub Build](https://github.com/AQUASINE/podium/actions/workflows/build.yml/badge.svg)](https://github.com/electron-vite/electron-vite-vue/actions/workflows/build.yml)
[![Static Badge](https://img.shields.io/badge/Documentation-blue)](https://docs.podiumlive.dev/)

## Features

📦 Out of the box
🎯 Based on the official [template-vue-ts](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-vue-ts), less invasive
🌱 Extensible, really simple directory structure
💪 Support using Node.js API in Electron-Renderer
🔩 Support C/C++ native addons
🖥 It's easy to implement multiple windows
- Create ruleset pipelines that will rank your chatters based on their activity in chat.
- Find the best messages and best users based on whatever criteria you want.

## TODO
- [ ] Add items to todo list


## Quick Setup

```sh
# clone the project
git clone https://github.com/electron-vite/electron-vite-vue.git
git clone https://github.com/AQUASINE/podium.git

# enter the project directory
cd electron-vite-vue
cd podium

# install dependency
# install dependencies
pip install -r requirements.txt
npm install
```

# develop
npm run dev
Note that before running the project, you need to create a `config.json` file in the root directory with the following content:

```json
{
"TWITCH_OAUTH": "oauth:xxxxxxxxxxxxxxxxxx",
"BOT_USERNAME": "your_twitch_username",
"OPENAI_KEY": "sk-xxxxxxxxxxxxxxxxxxxxx"
}
```

## Debug
Generate your Twitch OAuth token [here](https://twitchapps.com/tmi/), and use the account name you used to generate the token as `BOT_USERNAME`.

![electron-vite-react-debug.gif](https://github.com/electron-vite/electron-vite-react/blob/main/electron-vite-react-debug.gif?raw=true)
Get your OpenAI key [here](https://platform.openai.com/settings/profile?tab=api-keys).

```sh
# develop
npm run dev
```

## Directory

Expand Down Expand Up @@ -74,6 +87,3 @@ export default {
-->

## FAQ

- [C/C++ addons, Node.js modules - Pre-Bundling](https://github.com/electron-vite/vite-plugin-electron-renderer#dependency-pre-bundling)
- [dependencies vs devDependencies](https://github.com/electron-vite/vite-plugin-electron-renderer#dependencies-vs-devdependencies)
28 changes: 28 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Podium",
description: "Message/User ranking client for Twitch/YouTube Live",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Home', link: '/' },
{ text: 'Examples', link: '/markdown-examples' }
],

sidebar: [
{
text: 'Examples',
items: [
{ text: 'Markdown Examples', link: '/markdown-examples' },
{ text: 'Runtime API Examples', link: '/api-examples' }
]
}
],

socialLinks: [
{ icon: 'github', link: 'https://github.com/AQUASINE/podium' }
]
}
})
49 changes: 49 additions & 0 deletions docs/api-examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
outline: deep
---

# Runtime API Examples

This page demonstrates usage of some of the runtime APIs provided by VitePress.

The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:

```md
<script setup>
import { useData } from 'vitepress'

const { theme, page, frontmatter } = useData()
</script>

## Results

### Theme Data
<pre>{{ theme }}</pre>

### Page Data
<pre>{{ page }}</pre>

### Page Frontmatter
<pre>{{ frontmatter }}</pre>
```

<script setup>
import { useData } from 'vitepress'

const { site, theme, page, frontmatter } = useData()
</script>

## Results

### Theme Data
<pre>{{ theme }}</pre>

### Page Data
<pre>{{ page }}</pre>

### Page Frontmatter
<pre>{{ frontmatter }}</pre>

## More

Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).
25 changes: 25 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home

hero:
name: "Podium"
text: "Ranking client for Twitch"
tagline: Give your chatters a way to compete for the top spot in your chat.
actions:
- theme: brand
text: Markdown Examples
link: /markdown-examples
- theme: alt
text: API Examples
link: /api-examples

features:
- title: Feature A
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature B
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature C
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
---

85 changes: 85 additions & 0 deletions docs/markdown-examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Markdown Extension Examples

This page demonstrates some of the built-in markdown extensions provided by VitePress.

## Syntax Highlighting

VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting:

**Input**

````md
```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```
````

**Output**

```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```

## Custom Containers

**Input**

```md
::: info
This is an info box.
:::

::: tip
This is a tip.
:::

::: warning
This is a warning.
:::

::: danger
This is a dangerous warning.
:::

::: details
This is a details block.
:::
```

**Output**

::: info
This is an info box.
:::

::: tip
This is a tip.
:::

::: warning
This is a warning.
:::

::: danger
This is a dangerous warning.
:::

::: details
This is a details block.
:::

## More

Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown).
Binary file removed electron-vite-vue.gif
Binary file not shown.
6 changes: 6 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<script src="http://localhost:8098"></script>
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Lexend:wght@100..900&family=Outfit:wght@100..900&display=swap" rel="stylesheet">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';"/>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<title>Podium</title>
</head>
<body>
Expand Down
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build && electron-builder",
"preview": "vite preview"
"preview": "vite preview",
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs",
"docs:deploy": "npm run docs:build && gh-pages -d docs/.vitepress/dist"
},
"devDependencies": {
"@mdi/font": "^7.4.47",
Expand All @@ -38,6 +42,7 @@
"vite": "^5.0.10",
"vite-plugin-electron": "^0.28.0",
"vite-plugin-electron-renderer": "^0.14.5",
"vitepress": "^1.1.3",
"vue": "^3.4.1",
"vue-tsc": "^1.8.27"
},
Expand All @@ -48,14 +53,19 @@
"chartjs": "^0.3.24",
"codemirror": "^6.0.1",
"electron-store": "^8.2.0",
"gh-pages": "^6.1.1",
"highlight.js": "^11.9.0",
"highlightjs": "^9.16.2",
"three": "^0.163.0",
"uuid": "^9.0.1",
"vue-codemirror": "^6.1.1",
"vue-draggable": "^2.0.6",
"vue-draggable-next": "^2.2.1",
"vue-draggable-resizable": "^3.0.0",
"vue-resizable": "^2.1.7",
"vue-router": "^4.3.1",
"vue-select": "^4.0.0-beta.6",
"vuedraggable": "^2.24.3",
"vuetify": "^3.5.5",
"vuex": "^4.1.0"
}
Expand Down
Binary file added public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>
Binary file added public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon.ico
Binary file not shown.
Binary file added public/mstile-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mstile-310x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mstile-310x310.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mstile-70x70.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
Binary file added requirements.txt
Binary file not shown.
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import LeftSidebar from "./components/LeftSidebar.vue";
import UsersView from "./components/UsersView.vue";
import {mapState} from "vuex";
import AppTopbar from "./components/AppTopbar.vue";
import CenterPanel from "./CenterPanel.vue";
import CenterPanel from "./components/rule/CenterPanel.vue";
export default {
name: 'App',
Expand Down
12 changes: 0 additions & 12 deletions src/components/AlwaysRuleContent.vue

This file was deleted.

Loading

0 comments on commit c285471

Please sign in to comment.