Skip to content
This repository has been archived by the owner on Aug 24, 2020. It is now read-only.

よろしくお願いします! #49

Open
wants to merge 83 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
21aaf8e
clone my template
kobakazu0429 Feb 19, 2020
d67e9b8
add react-google-login, axios
kobakazu0429 Feb 19, 2020
d9de7a3
change rule: no-empty
kobakazu0429 Feb 19, 2020
6453056
create RestClient
kobakazu0429 Feb 19, 2020
73393d6
add mobx mobx-react-lite
kobakazu0429 Feb 19, 2020
0c0badf
create apis, stores
kobakazu0429 Feb 19, 2020
252415f
add dot-env
kobakazu0429 Feb 19, 2020
76b9360
upgrade react-router-dom
kobakazu0429 Feb 19, 2020
77d527b
create sign_in page and route
kobakazu0429 Feb 19, 2020
7e0fd5f
fix type: partial
kobakazu0429 Feb 19, 2020
0033686
isDevelopment: non-auth & use mock-api
kobakazu0429 Feb 20, 2020
6984526
webpack-dev-server useLocalIp: true
kobakazu0429 Feb 20, 2020
c490131
remove lists before save
kobakazu0429 Feb 20, 2020
ddaefb8
set font family
kobakazu0429 Feb 20, 2020
0af0a5e
add MovieItem
kobakazu0429 Feb 20, 2020
aa35891
add react-player
kobakazu0429 Feb 20, 2020
5a04791
move directory: MovieItem
kobakazu0429 Feb 20, 2020
6934e2c
set key
kobakazu0429 Feb 20, 2020
99b161f
add PlayerPage
kobakazu0429 Feb 20, 2020
116adb8
add Modal
kobakazu0429 Feb 20, 2020
c725b2c
create button
kobakazu0429 Feb 20, 2020
4846ff2
add env: USE_MOCK_SERVER
kobakazu0429 Feb 20, 2020
ddc369a
add insertPlaylistItems
kobakazu0429 Feb 20, 2020
efabcfe
fix Modal
kobakazu0429 Feb 20, 2020
8f6ffff
create TextField
kobakazu0429 Feb 20, 2020
0b4436b
create AddPlaylistItem
kobakazu0429 Feb 20, 2020
7dfb7ac
fix
kobakazu0429 Feb 20, 2020
349b0e8
add insertPlaylists
kobakazu0429 Feb 22, 2020
ee923ef
add AddPlaylists
kobakazu0429 Feb 22, 2020
1447adf
add react-icon
kobakazu0429 Feb 22, 2020
ce8dd28
change color name: error -> warning
kobakazu0429 Feb 22, 2020
1bc724c
create WarningButton
kobakazu0429 Feb 22, 2020
f27fedb
change TextField border width
kobakazu0429 Feb 22, 2020
a5e7cc6
set default text color
kobakazu0429 Feb 22, 2020
6b31b49
create EditPlaylistItem
kobakazu0429 Feb 22, 2020
d9e6ffe
add radius to modal-container
kobakazu0429 Feb 22, 2020
94ef8df
redesign modal content
kobakazu0429 Feb 22, 2020
c4bd0aa
comfortable more button
kobakazu0429 Feb 23, 2020
a814fbf
fix type
kobakazu0429 Feb 23, 2020
c05a51c
deletable playlistItems
kobakazu0429 Feb 23, 2020
5392789
fix type
kobakazu0429 Feb 23, 2020
bcfc15f
change method name: deletePlaylistItems -> deletePlaylistItem
kobakazu0429 Feb 23, 2020
2480941
add method: deletePlaylist
kobakazu0429 Feb 23, 2020
59d0b90
change comp name: MovieItem -> Video
kobakazu0429 Feb 23, 2020
de8ac8c
add Playlist, EditPlaylist
kobakazu0429 Feb 23, 2020
cd8810e
add title
kobakazu0429 Feb 23, 2020
975c556
fix npm commands for netlify
kobakazu0429 Feb 23, 2020
f08d71a
rename to restClient
kobakazu0429 Feb 23, 2020
155d156
rename to RestClient
kobakazu0429 Feb 23, 2020
452a292
remove npx
kobakazu0429 Feb 23, 2020
efd1887
fix import name
kobakazu0429 Feb 23, 2020
3bdae95
enable dotenv systemvars
kobakazu0429 Feb 23, 2020
505ceae
move to client
kobakazu0429 Feb 23, 2020
504f602
typeorm init --name server --database sqlite
kobakazu0429 Feb 23, 2020
bb23224
yarn install
kobakazu0429 Feb 24, 2020
9ae585b
add linter
kobakazu0429 Feb 24, 2020
5c5a3a0
add express submodules
kobakazu0429 Feb 24, 2020
31e39cf
add strong-error-handler
kobakazu0429 Feb 24, 2020
af50166
add dotenv
kobakazu0429 Feb 24, 2020
c7028f7
add ts-node-dev
kobakazu0429 Feb 24, 2020
4dda714
add express
kobakazu0429 Feb 24, 2020
6520b70
add class-transformer class-validator
kobakazu0429 Feb 24, 2020
91d6c2d
add tsconfig-paths
kobakazu0429 Feb 24, 2020
77dab8c
add server base
kobakazu0429 Feb 24, 2020
3bb2a70
add User
kobakazu0429 Feb 24, 2020
166904d
fix controller name
kobakazu0429 Feb 24, 2020
bf56a2e
googleId to unique
kobakazu0429 Feb 24, 2020
ed59c94
add UserPlaylist
kobakazu0429 Feb 24, 2020
7249bda
rename api path
kobakazu0429 Feb 24, 2020
c076841
add NotFoundError
kobakazu0429 Feb 24, 2020
ad2e259
add YoutubeVideo
kobakazu0429 Feb 24, 2020
3a0a737
add .env
kobakazu0429 Feb 24, 2020
4f7e3e6
fix UserController
kobakazu0429 Feb 24, 2020
e8912f4
add type number
kobakazu0429 Feb 25, 2020
a0a9bf0
add TimeStore
kobakazu0429 Feb 25, 2020
de89552
inser videos to TimeStore
kobakazu0429 Feb 25, 2020
e2e232e
addable time
kobakazu0429 Feb 25, 2020
e9bbf6d
add max-width
kobakazu0429 Feb 25, 2020
4fb67d3
AB
kobakazu0429 Feb 25, 2020
492e1b4
add nextVideo()
kobakazu0429 Feb 25, 2020
88d1c2b
[wip]
kobakazu0429 Feb 25, 2020
915ec35
not open
kobakazu0429 Feb 25, 2020
9f7cacb
add how to dev
kobakazu0429 Feb 25, 2020
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
31 changes: 31 additions & 0 deletions kobakazu0429/client/.circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: 2.0
jobs:
build:
working_directory: ~/workspace
docker:
- image: node:12
steps:
- checkout

- restore_cache:
keys:
- v1-dependencies-{{ checksum "yarn.lock" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run:
name: Install Dependencies
command: yarn install

- save_cache:
key: yarn-{{ checksum "yarn.lock" }}
paths:
- ~/workspace/node_modules

- run:
name: Lint
command: yarn lint

- run:
name: Build
command: yarn build
13 changes: 13 additions & 0 deletions kobakazu0429/client/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
4 changes: 4 additions & 0 deletions kobakazu0429/client/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
NODE_ENV=development
USE_MOCK_API=false
MOCK_API_ENDPOINT=http://localhost:5050
GOOGLE_OAUTH_CLIENT_ID=xxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
88 changes: 88 additions & 0 deletions kobakazu0429/client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Build by Webpack
build/
dist/
9 changes: 9 additions & 0 deletions kobakazu0429/client/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": true,
"singleQuote": false,
"printWidth": 80,
"useTabs": false,
"trailingComma": "none",
"bracketSpacing": true,
"jsxBracketSameLine": false
}
5 changes: 5 additions & 0 deletions kobakazu0429/client/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"javascript.preferences.quoteStyle": "double",
"typescript.preferences.quoteStyle": "double",
"editor.formatOnSave": true
}
27 changes: 27 additions & 0 deletions kobakazu0429/client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Dancing Player

## How to dev

### Setup

```bash
# ... Setup node, yarn and clone this PR.
$ cd kobakazu0429/client
$ cp.env.sample .env
# 環境に合わせて .env を書き換えてください.
# 環境変数は GOOGLE_OAUTH_CLIENT_ID のみ書き換えれば大丈夫だと思います.

$ yarn install

# http://localhost:5000 を開くと確認できるはずです.
$ yarn dev
```

### Commands

```bash
# written in package.json
$ yarn dev # Start webpack-dev-server
$ yarn build # Build to dist/
$ yarn lint # Check type and syntax
```
59 changes: 59 additions & 0 deletions kobakazu0429/client/config/webpack.config.common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
"use strict";

const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
const Dotenv = require("dotenv-webpack")

module.exports = {
entry: { app: path.resolve(__dirname, "../src/index.tsx") },

resolve: {
extensions: [".js", ".ts", ".jsx", ".tsx"],
alias: {
"@": path.resolve(__dirname, "../src")
}
},

plugins: [
new HtmlWebpackPlugin({ template: "./public/index.html" }),
new ForkTsCheckerWebpackPlugin({
workers: 1,
tslint: true
}),
new Dotenv({
systemvars: true
})
],

module: {
rules: [
{
enforce: "pre",
test: /\.(ts|tsx)?$/,
use: [
{
loader: "tslint-loader",
options: {
typeCheck: true,
fix: true
}
}
]
},
{
test: /\.(ts|tsx)?$/,
loader: "ts-loader",
exclude: /node_modules/,
options: { transpileOnly: true }
},
{
test: /\.css$/,
loaders: [
"style-loader",
{ loader: "css-loader", options: { url: false } }
]
}
]
}
};
57 changes: 57 additions & 0 deletions kobakazu0429/client/config/webpack.config.dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
"use strict";

const path = require("path");
const merge = require("webpack-merge");
const common = require("./webpack.config.common.js");

module.exports = merge(common, {
mode: "development",
devtool: "inline-source-map",

devServer: {
host: "0.0.0.0",
port: 5000,
useLocalIp: true,
disableHostCheck: true,
contentBase: path.resolve(__dirname, "../public"),
watchContentBase: true,
noInfo: true,
hot: true,
open: false,
historyApiFallback: true,
overlay: true,
inline: true
},

module: {
rules: [
{
test: /\.(jpg|png|gif|eot|ttf|svg)$/,
use: [
{
loader: "file-loader",
options: {
name: "[path][name].[ext]",
outputPath: "/",
publicPath: "http://localhost:5000/"
}
}
]
},
{
test: /\.(woff|woff2)$/,
use: [
{
loader: "url-loader",
options: {
name: "[path][name].[ext]",
outputPath: "/",
mimetype: "application/font-woff",
publicPath: "http://localhost:5000/"
}
}
]
}
]
}
});
38 changes: 38 additions & 0 deletions kobakazu0429/client/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
"use strict";

const path = require("path");
const merge = require("webpack-merge");
const common = require("./webpack.config.common.js");

const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const ManifestPlugin = require("webpack-manifest-plugin");

module.exports = merge(common, {
mode: "production",
devtool: "source-map",

output: {
path: path.resolve(__dirname, "../dist/"),
filename: "[name]-[hash].js"
},

plugins: [new CleanWebpackPlugin(), new ManifestPlugin()],

module: {
rules: [
{
test: /\.(jpg|png|gif|woff|woff2|eot|ttf|svg)$/,
use: [
{
loader: "file-loader",
options: {
name: "[path][name]-[hash].[ext]",
outputPath: "/",
publicPath: "../dist"
}
}
]
}
]
}
});
Loading