Skip to content

Commit

Permalink
Move to app router
Browse files Browse the repository at this point in the history
  • Loading branch information
ljung committed Aug 20, 2024
1 parent f3da8d7 commit cb69192
Show file tree
Hide file tree
Showing 140 changed files with 2,903 additions and 7,099 deletions.
32 changes: 25 additions & 7 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,39 @@ node_modules/
# testing
/coverage

# database
/prisma/db.sqlite
/prisma/db.sqlite-journal
db.sqlite

# next.js
/.next/
/out/
next-env.d.ts

# production
/.next
/build
/.dist

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables
.env
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo

# idea files
.idea
.iml
29 changes: 24 additions & 5 deletions .env
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
# to see if your .env file is working correctly by running `docker-compose config`
# Since the ".env" file is gitignored, you can use the ".env.example" file to
# build a new ".env" file when you clone the repo. Keep this file up-to-date
# when you add new variables to `.env`.

# the site name
# This file will be committed to version control, so make sure not to have any
# secrets in it. If you are cloning this repo, create a copy of this file named
# ".env" and populate it with your secrets.

# When adding additional environment variables, the schema in "/src/env.js"
# should be updated accordingly.

# Example:
# SERVERVAR="foo"
# NEXT_PUBLIC_CLIENTVAR="bar"

# To see if your .env file is working correctly,
# try running `docker-compose config`

# The name of the site
SITE_NAME="Web-SyncPlay"

# your domain from which sessions are being served
# remove trailing slash !!!
# Your domain from which sessions are being served
# REMOVE trailing slash !!!
PUBLIC_DOMAIN="https://web-syncplay.de"

# modify if you pass your own running redis instance
# Modify if you pass your own running redis instance
REDIS_URL="redis://localhost:6379"

# Default URL to play when nothing is provided
DEFAULT_SRC="https://youtu.be/NcBjx_eyvxc4"
30 changes: 30 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Since the ".env" file is gitignored, you can use the ".env.example" file to
# build a new ".env" file when you clone the repo. Keep this file up-to-date
# when you add new variables to `.env`.

# This file will be committed to version control, so make sure not to have any
# secrets in it. If you are cloning this repo, create a copy of this file named
# ".env" and populate it with your secrets.

# When adding additional environment variables, the schema in "/src/env.js"
# should be updated accordingly.

# Example:
# SERVERVAR="foo"
# NEXT_PUBLIC_CLIENTVAR="bar"

# To see if your .env file is working correctly,
# try running `docker-compose config`

# The name of the site
SITE_NAME="Web-SyncPlay"

# Your domain from which sessions are being served
# REMOVE trailing slash !!!
PUBLIC_DOMAIN="https://web-syncplay.de"

# Modify if you pass your own running redis instance
REDIS_URL="redis://localhost:6379"

# Default URL to play when nothing is provided
DEFAULT_SRC="https://youtu.be/NcBjx_eyvxc4"
42 changes: 42 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/** @type {import("eslint").Linter.Config} */
const config = {
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": true
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked"
],
"rules": {
"@typescript-eslint/array-type": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/consistent-type-imports": [
"warn",
{
"prefer": "type-imports",
"fixStyle": "inline-type-imports"
}
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksVoidReturn": {
"attributes": false
}
}
]
}
}
module.exports = config;
3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

33 changes: 25 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,39 @@ node_modules/
# testing
/coverage

# database
/prisma/db.sqlite
/prisma/db.sqlite-journal
db.sqlite

# next.js
/.next/
/out/
next-env.d.ts

# production
/.next
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables
.env
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo

# idea files
.idea
.iml
log.txt
*.iml
53 changes: 27 additions & 26 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,45 +1,46 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.next
node_modules/
/.pnp
.pnp.js

# testing
/db
/coverage

# database
/prisma/db.sqlite
/prisma/db.sqlite-journal
db.sqlite

# next.js
/.next/
/out/
next-env.d.ts

# production
/build
public/sw.js
public/workbox-*.js
public/fallback-*.js
public/*.map

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# local env files
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables
.env
.env*.local

.vscode/
# vercel
.vercel

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
next-env.d.ts
# typescript
*.tsbuildinfo

# idea files
.idea
9 changes: 0 additions & 9 deletions .prettierrc

This file was deleted.

9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
# Install dependencies only when needed
FROM node:21.0-alpine AS deps
FROM oven/bun:1.1.24-alpine AS deps
WORKDIR /app

# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat

COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY package.json bun.lockb ./
RUN bun install --production --frozen-lockfile

# Rebuild the source code only when needed
FROM node:21.0-alpine AS builder
WORKDIR /app

COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN yarn build
RUN npm build

# Production image, copy all the files and run next
FROM node:21.0-alpine AS runner
WORKDIR /app

ENV NODE_ENV="production"
ENV SITE_NAME="Web-SyncPlay"
ENV PUBLIC_DOMAIN="https://web-syncplay.de"
ENV REDIS_URL="redis://redis:6379"
Expand Down
Binary file added bun.lockb
Binary file not shown.
71 changes: 0 additions & 71 deletions components/Embed.tsx

This file was deleted.

Loading

0 comments on commit cb69192

Please sign in to comment.