Skip to content

Commit bbacb32

Browse files
committed
feat: webinar implementation with dyte.io
1 parent 19f207e commit bbacb32

27 files changed

+10179
-17
lines changed

Diff for: src/apps/auth/components/footer.tsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
import { BrandLogo } from '~/components/branding/brand-logo';
21
import {
32
GithubLogoFill,
43
LinkedinLogoFill,
54
TwitterNewLogoFill,
65
} from '@jengaicons/react';
7-
import { Button } from '~/components/atoms/button';
86
import { Link } from '@remix-run/react';
9-
import Wrapper from './wrapper';
7+
import { Button } from '~/components/atoms/button';
8+
import { BrandLogo } from '~/components/branding/brand-logo';
109
import { mainUrl } from '../consts';
11-
import ThemeSwitcher from './theme-switcher';
10+
import Wrapper from './wrapper';
1211

1312
const linkedinUrl = 'https://linkedin.com/company/kloudlite-io';
1413
const gitUrl = 'https://github.com/kloudlite/kloudlite';

Diff for: src/apps/auth/routes/_main+/oauth2.callback.$provider.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { useLoaderData, useNavigate, useSearchParams } from '@remix-run/react';
22
import { useAuthApi } from '~/auth/server/gql/api-provider';
33
import { BrandLogo } from '~/components/branding/brand-logo';
44
import { toast } from '~/components/molecule/toast';
5-
import { base64Encrypt } from '~/console/server/utils/common';
65
import useDebounce from '~/root/lib/client/hooks/use-debounce';
76
import getQueries from '~/root/lib/server/helpers/get-queries';
87
import { IRemixCtx } from '~/root/lib/types/common';
@@ -77,7 +76,7 @@ const CallBack = () => {
7776
const {
7877
data: { email, name },
7978
} = await api.whoAmI({});
80-
const encodedData = base64Encrypt(`email=${email}&name=${name}`);
79+
const encodedData = btoa(`email=${email}&name=${name}`);
8180
window.location.href = `${callback}?${encodedData}`;
8281
return;
8382
}

Diff for: src/apps/auth/routes/_providers+/login.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { PasswordInput, TextInput } from '~/components/atoms/input';
1212
import { ArrowLeft, ArrowRight } from '~/components/icons';
1313
import { toast } from '~/components/molecule/toast';
1414
import { cn } from '~/components/utils';
15-
import { base64Encrypt } from '~/console/server/utils/common';
1615
import { useReload } from '~/root/lib/client/helpers/reloader';
1716
import useForm from '~/root/lib/client/hooks/use-form';
1817
import Yup from '~/root/lib/server/helpers/yup';
@@ -54,8 +53,8 @@ const LoginWithEmail = () => {
5453
const {
5554
data: { email, name },
5655
} = await api.whoAmI({});
57-
const encodedData = base64Encrypt(`email=${email}&name=${name}`);
58-
window.location.href = `${callback}?${encodedData}`;
56+
const encodedData = btoa(`email=${email}&name=${name}`);
57+
window.location.href = `${callback}?userData=${encodedData}`;
5958
return;
6059
}
6160
reloadPage();

Diff for: src/apps/devdoc/web/components/toc.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import type { ReactElement } from 'react';
33
import { useEffect, useMemo, useRef } from 'react';
44
import scrollIntoView from 'scroll-into-view-if-needed';
55

6-
import { Button } from 'kl-design-system/atoms/button';
76
import { ArrowSquareOut } from '@jengaicons/react';
8-
import Link from 'next/link';
97
import { LayoutGroup, motion } from 'framer-motion';
10-
import { BackToTop } from './back-to-top';
11-
import useConfig from '../utils/use-config';
8+
import { Button } from 'kl-design-system/atoms/button';
9+
import Link from 'next/link';
1210
import { useActiveAnchor } from '../utils/active-anchor';
1311
import { cn } from '../utils/commons';
1412
import getGitIssueUrl from '../utils/get-git-issue-url';
13+
import useConfig from '../utils/use-config';
14+
import { BackToTop } from './back-to-top';
1515

1616
export type TOCProps = {
1717
headings: Heading[];

Diff for: src/apps/webinar/.dockerignore

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts

Diff for: src/apps/webinar/.eslintrc.yml

+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
root: true
2+
3+
extends:
4+
- airbnb
5+
- airbnb/hooks
6+
- plugin:prettier/recommended
7+
- plugin:@typescript-eslint/recommended
8+
- plugin:import/typescript
9+
- next/core-web-vitals
10+
- plugin:mdx/recommended
11+
12+
plugins:
13+
- import
14+
- react
15+
- prefer-arrow-functions
16+
- prettier
17+
- "@typescript-eslint"
18+
19+
parser: "@typescript-eslint/parser"
20+
21+
parserOptions:
22+
ecmaFeatures:
23+
jsx: true
24+
ecmaVersion: 12
25+
sourceType: module
26+
27+
env:
28+
es6: true
29+
node: true
30+
browser: true
31+
jest: true
32+
es2021: true
33+
34+
settings:
35+
mdx/code-blocks: true
36+
import/resolver:
37+
node:
38+
extensions: [.js, .jsx, .ts, .tsx, .json]
39+
moduleDirectory:
40+
- node_modules
41+
- app
42+
typescript:
43+
project: ./tsconfig.json
44+
45+
# settings:
46+
# import/resolver:
47+
# node: true
48+
# jsconfig:
49+
# config: ./jsconfig.json
50+
51+
globals:
52+
Logger: false
53+
54+
rules:
55+
# pritter rules
56+
57+
# ts rules
58+
react/no-unescaped-entities: 0
59+
react/jsx-no-useless-fragment: 0
60+
react/jsx-filename-extension: 0
61+
react/require-default-props : 0
62+
"@typescript-eslint/no-unused-vars":
63+
- error
64+
- ignoreRestSiblings: true
65+
varsIgnorePattern: '^_'
66+
argsIgnorePattern: '^_'
67+
68+
"@typescript-eslint/no-explicit-any": 0
69+
"@typescript-eslint/ban-ts-comment": 0
70+
no-shadow: 0
71+
"@next/next/no-img-element": 0
72+
73+
74+
# js rules
75+
react/react-in-jsx-scope: 0
76+
# prefer-arrow-functions/prefer-arrow-functions:
77+
# [
78+
# "warn",
79+
# {
80+
# classPropertiesAllowed: false,
81+
# disallowPrototype: true,
82+
# returnStyle: "unchanged",
83+
# singleReturnOnly: true,
84+
# },
85+
# ]
86+
87+
import/extensions: 0
88+
import/prefer-default-export: off
89+
90+
react/jsx-uses-react: 0
91+
react/jsx-uses-vars: 1
92+
react/jsx-props-no-spreading: 0
93+
react/function-component-definition: 0
94+
prettier/prettier:
95+
- warn
96+
- singleQuote: true
97+
camelcase:
98+
- error
99+
- ignoreDestructuring: true
100+
properties: never
101+
102+
no-underscore-dangle: 0
103+
104+
react-hooks/exhaustive-deps: 0
105+
jsx-a11y/no-static-element-interactions: 0
106+
jsx-a11y/click-events-have-key-events: 0
107+
allow-named-functions: 0
108+
max-classes-per-file: 0
109+
react/prop-types: 0
110+
react/display-name: 0
111+
jsx-a11y/anchor-is-valid: 0
112+
import/order: 1
113+
react/button-has-type: 0
114+
no-console: 0
115+
no-param-reassign:
116+
- error
117+
- props: false
118+
import/no-unresolved:
119+
- error
120+
- ignore:
121+
- \.svg
122+
123+
import/no-extraneous-dependencies: 0
124+
125+
no-unused-vars:
126+
- error
127+
- ignoreRestSiblings: true
128+
varsIgnorePattern: '^_'
129+
argsIgnorePattern: '^_'

Diff for: src/apps/webinar/.gitignore

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts

Diff for: src/apps/webinar/Dockerfile

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM node:20.8.1-alpine as base
2+
RUN npm i -g pnpm
3+
WORKDIR /webinar
4+
COPY package.json ./package.json
5+
RUN pnpm i
6+
COPY . .
7+
RUN pnpm build
8+
9+
ENTRYPOINT npm run start

Diff for: src/apps/webinar/README.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
11+
# or
12+
pnpm dev
13+
# or
14+
bun dev
15+
```
16+
17+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18+
19+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20+
21+
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
22+
23+
## Learn More
24+
25+
To learn more about Next.js, take a look at the following resources:
26+
27+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29+
30+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
31+
32+
## Deploy on Vercel
33+
34+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35+
36+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

Diff for: src/apps/webinar/Taskfile.yaml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
version: '3'
2+
3+
tasks:
4+
default:
5+
cmds:
6+
- task: build
7+
- task: start
8+
9+
dev:
10+
cmds:
11+
- npm run dev
12+
13+
build:
14+
cmds:
15+
- npm run build
16+
17+
container:build:
18+
preconditions:
19+
- sh: '[[ -n "{{.tag}}" ]]'
20+
msg: "var tag must have a value"
21+
vars:
22+
Image: ghcr.io/kloudlite/webinar:{{.tag}}
23+
cmds:
24+
- docker build -t {{.Image}} .
25+
26+
container:push:
27+
preconditions:
28+
- sh: '[[ -n "{{.tag}}" ]]'
29+
msg: "var tag must have a value"
30+
vars:
31+
Image: ghcr.io/kloudlite/webinar:{{.tag}}
32+
cmds:
33+
- docker buildx build -t {{.Image}} --platform linux/amd64 --push .
34+
# - docker buildx build . -t {{.Image}} --platform linux/amd64,linux/arm64 --output=type=image,compression=zstd,force-compression=true,compression-level=12,push=true
35+
# - docker build -t {{.Image}} .
36+
# - docker push {{.Image}}

Diff for: src/apps/webinar/next.config.mjs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {
3+
env: {
4+
customKey: process.env.keyName, // pulls from .env file
5+
},
6+
};
7+
8+
export default nextConfig;

0 commit comments

Comments
 (0)