Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.

Commit e7eb5e6

Browse files
committed
Initial commit
Created from https://vercel.com/new
0 parents  commit e7eb5e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+33976
-0
lines changed

.env

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Application config
2+
VUE_APP_API_USER_WEBSOCKET_URI=wss://user-gateway.castyapp.com
3+
VUE_APP_API_THEATER_WEBSOCKET_URI=wss://theater-gateway.castyapp.com
4+
5+
# API http requests config
6+
VUE_APP_API_SCHEMA=https
7+
VUE_APP_API_BASE=api.castyapp.com
8+
VUE_APP_API_VERSION=v1
9+
VUE_APP_CDN_URI=https://cdn.castyapp.com
10+
11+
# Google oauth configs
12+
VUE_APP_API_GOOGLE_ANALYTICS_TRACK_ID=UA-161464756-1
13+
VUE_APP_API_GOOGLE_CLIENT_ID=333498721206-5s2s31pbh26rlquclst8frr8pml873sc.apps.googleusercontent.com
14+
VUE_APP_API_GOOGLE_REDIRECT_URI=https://castyapp.com/oauth/google/callback
15+
16+
# Discord oauth configs
17+
VUE_APP_API_DISCORD_CLIENT_ID=592544135383351335
18+
VUE_APP_API_DISCORD_REDIRECT_URI=https://castyapp.com/oauth/discord/callback
19+
20+
# Spotify oauth configs
21+
VUE_APP_API_SPOTIFY_CLIENT_ID=80ac55a12cd54278bbe55e6e0d776576
22+
VUE_APP_API_SPOTIFY_REDIRECT_URI=https://castyapp.com/oauth/spotify/callback
23+
24+
# Recaptcha config
25+
VUE_APP_API_RECAPTCHA_ENABLED=true
26+
VUE_APP_API_RECAPTCHA_SITE_KEY=9a1aff42-21bc-4941-9df9-8701b12d8338

.env.example

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Application config
2+
VUE_APP_API_USER_WEBSOCKET_URI=ws://localhost:3000/user
3+
VUE_APP_API_THEATER_WEBSOCKET_URI=ws://localhost:3000/theater
4+
5+
# API http requests config
6+
VUE_APP_API_SCHEMA=http
7+
VUE_APP_API_BASE=localhost:9002
8+
9+
VUE_APP_CDN_URI=http://localhost:5555
10+
11+
# Google oauth configs
12+
VUE_APP_API_GOOGLE_ANALYTICS_TRACK_ID=
13+
VUE_APP_API_GOOGLE_CLIENT_ID=
14+
VUE_APP_API_GOOGLE_REDIRECT_URI=
15+
16+
# Discord oauth configs
17+
VUE_APP_API_DISCORD_CLIENT_ID=
18+
VUE_APP_API_DISCORD_REDIRECT_URI=
19+
20+
# Spotify oauth configs
21+
VUE_APP_API_SPOTIFY_CLIENT_ID=
22+
VUE_APP_API_SPOTIFY_REDIRECT_URI=
23+
24+
# Recaptcha config
25+
VUE_APP_API_RECAPTCHA_SITE_KEY=

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**/*.vue
2+
**/*.js
3+
**/*

.gitignore

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
14+
# Editor directories and files
15+
.idea
16+
.vscode
17+
*.suo
18+
*.ntvs*
19+
*.njsproj
20+
*.sln
21+
*.sw?
22+
docker-compose.yml

Caddyfile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
:80 {
2+
root * /srv
3+
file_server
4+
encode gzip
5+
try_files {path} /index.html
6+
handle_errors {
7+
@404 {
8+
expression {http.error.status_code} == 404
9+
}
10+
rewrite @404 /404.html
11+
file_server
12+
}
13+
}

Dockerfile

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# stage1 as builder
2+
FROM node:12-alpine as builder
3+
4+
WORKDIR /build
5+
6+
# Copy the package.json and install dependencies
7+
COPY yarn.lock .
8+
COPY package.json .
9+
RUN yarn install --frozen-lockfile
10+
11+
# Copy rest of the files
12+
COPY . .
13+
14+
# Build the project
15+
RUN yarn build
16+
17+
FROM caddy:2.1.1
18+
19+
COPY Caddyfile /etc/caddy/Caddyfile
20+
21+
COPY --from=builder /build/dist /srv
22+
23+
EXPOSE 80
24+
25+
ENTRYPOINT ["caddy"]
26+
CMD ["run", "-config", "/etc/caddy/Caddyfile"]

README.md

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Casty VueJs Project
2+
3+
### Project setup
4+
```bash
5+
$ git clone https://github.com/CastyLab/dashboard.git
6+
```
7+
8+
#### Install dependencies via npm
9+
```bash
10+
$ npm install
11+
```
12+
13+
### Configuration
14+
make a copy of `.env.example` file and call it `.env`
15+
```bash
16+
$ cp .env.example .env
17+
```
18+
19+
### **Environments**
20+
```env
21+
# Websocket configurations
22+
# Setup user and theater websocket gateways!
23+
VUE_APP_API_USER_WEBSOCKET_URI=ws://localhost:3000/user
24+
VUE_APP_API_THEATER_WEBSOCKET_URI=ws://localhost:3000/theater
25+
26+
# API http requests config
27+
VUE_APP_API_SCHEMA=http
28+
VUE_APP_API_BASE=localhost:9002
29+
VUE_APP_API_VERSION=v1
30+
31+
# Google oauth configs
32+
VUE_APP_API_GOOGLE_ANALYTICS_TRACK_ID=
33+
VUE_APP_API_GOOGLE_CLIENT_ID=
34+
VUE_APP_API_GOOGLE_REDIRECT_URI=http://localhost:8000/oauth/google/callback
35+
36+
# Discord oauth configs
37+
VUE_APP_API_DISCORD_CLIENT_ID=
38+
VUE_APP_API_DISCORD_REDIRECT_URI=http://localhost:8000/oauth/discord/callback
39+
40+
# Recaptcha config
41+
# This should match the api.server project google recaptcha variable
42+
VUE_APP_API_RECAPTCHA_KEY=
43+
```
44+
45+
### Serve project on development server
46+
```bash
47+
$ npm run serve
48+
```
49+
50+
### Compiles and minifies for production
51+
```bash
52+
$ npm run build
53+
```
54+
55+
### Building docker image
56+
```bash
57+
$ docker build . --tag=casty.dash
58+
```
59+
60+
### Run docker image
61+
```bash
62+
$ docker run -dp 80:80 --restart always casty.dash
63+
```
64+
65+
### Customize configuration
66+
See [Configuration Reference](https://cli.vuejs.org/config/).

babel.config.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/app'
4+
],
5+
plugins: [
6+
"@babel/plugin-syntax-dynamic-import",
7+
]
8+
};

package.json

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"name": "casty-vuejs-dash",
3+
"version": "0.0.1",
4+
"description": "Casty vuejs dashboard",
5+
"author": "Alireza Josheghani <[email protected]>",
6+
"scripts": {
7+
"start": "vue-cli-service serve",
8+
"build": "vue-cli-service build"
9+
},
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/castyapp/dashboard"
13+
},
14+
"dependencies": {
15+
"@hcaptcha/vue-hcaptcha": "^0.3.0",
16+
"animate.css": "^4.1.1",
17+
"axios": "^0.21.1",
18+
"bootstrap": "^4.6.0",
19+
"bootstrap-select": "^1.13.18",
20+
"casty-proto": "1.4.3",
21+
"core-js": "^3.10.0",
22+
"hls.js": "^1.0.0",
23+
"humanize-duration": "^3.25.1",
24+
"mini-css-extract-plugin": "^1.4.0",
25+
"moment-timezone": "^0.5.33",
26+
"plyr": "^3.6.4",
27+
"@popperjs/core": "^2.9.2",
28+
"v-title": "^1.0.13",
29+
"vue": "^2.6.12",
30+
"vue-chat-scroll": "^1.4.0",
31+
"vue-click-outside": "^1.1.0",
32+
"vue-content-loading": "^1.6.0",
33+
"vue-linkify": "^1.0.1",
34+
"vue-loaders":"^4.1.4",
35+
"vue-loading-button": "^0.2.0",
36+
"vue-multiselect": "^2.1.6",
37+
"vue-notification": "^1.3.20",
38+
"vue-router": "^3.5.1",
39+
"vue-top-progress": "^0.7.0",
40+
"vuex": "^3.6.2"
41+
},
42+
"devDependencies": {
43+
"@vue/cli-plugin-babel": "^4.5.12",
44+
"@vue/cli-plugin-eslint": "^4.5.12",
45+
"@vue/cli-service": "^4.5.12",
46+
"@babel/eslint-parser": "^7.13.14",
47+
"eslint": "^7.23.0",
48+
"eslint-plugin-vue": "^7.8.0",
49+
"vue-template-compiler": "^2.6.12"
50+
},
51+
"eslintConfig": {
52+
"root": true,
53+
"env": {
54+
"node": true
55+
},
56+
"extends": [
57+
"plugin:vue/essential",
58+
"eslint:recommended"
59+
],
60+
"rules": {},
61+
"parserOptions": {
62+
"parser": "babel-eslint"
63+
}
64+
},
65+
"postcss": {
66+
"plugins": {
67+
"autoprefixer": {}
68+
}
69+
},
70+
"license": "MIT"
71+
}

public/favicon.png

1.63 KB
Loading

public/index.html

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Casty</title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<link rel='shortcut icon' type='image/x-icon' href='/favicon.png' />
8+
<meta name="description" content="🍿 A Place to watch movies, videos, podcasts with your friends along together!"/>
9+
<meta property="og:locale" content="en" />
10+
<meta property="og:type" content="website" />
11+
<meta property="og:title" content="Casty" />
12+
<meta property="og:description" content="🍿 A Place to watch movies, videos, podcasts with your friends along together!" />
13+
<meta property="og:url" content="https://casty.ir" />
14+
<meta property="og:site_name" content="Casty" />
15+
<meta name="theme-color" content="#181818" />
16+
</head>
17+
<body>
18+
<div id="app"></div>
19+
<noscript>
20+
<p>Please enable JavaScript to use this page!</p>
21+
</noscript>
22+
</body>
23+
</html>

src/Master.vue

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<template>
2+
<div class="main-app">
3+
<transition name="router-animation"
4+
enter-active-class="animated fadeIn"
5+
leave-active-class="animated fadeOut"
6+
mode="out-in">
7+
<router-view name="main" style="animation-duration: 0.3s !important;" />
8+
</transition>
9+
</div>
10+
</template>
11+
12+
<script>
13+
import "animate.css/animate.min.css";
14+
export default {}
15+
</script>

0 commit comments

Comments
 (0)