diff --git a/app/api/upload/route.ts b/app/api/upload/route.ts
new file mode 100644
index 0000000..e57dd97
--- /dev/null
+++ b/app/api/upload/route.ts
@@ -0,0 +1,21 @@
+import { put } from '@vercel/blob'
+import { NextResponse } from 'next/server'
+import { customAlphabet } from 'nanoid'
+
+export const runtime = 'edge'
+
+const nanoid = customAlphabet(
+ '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',
+ 7
+) // 7-character random string
+export async function POST(req: Request) {
+ const file = req.body || ''
+ const contentType = req.headers.get('content-type') || 'text/plain'
+ const filename = `${nanoid()}.${contentType.split('/')[1]}`
+ const blob = await put(filename, file, {
+ contentType,
+ access: 'public',
+ })
+
+ return NextResponse.json(blob)
+}
diff --git a/src/app/globals.css b/app/globals.css
similarity index 69%
rename from src/app/globals.css
rename to app/globals.css
index fd81e88..1b4ca7b 100644
--- a/src/app/globals.css
+++ b/app/globals.css
@@ -8,14 +8,6 @@
--background-end-rgb: 255, 255, 255;
}
-@media (prefers-color-scheme: dark) {
- :root {
- --foreground-rgb: 255, 255, 255;
- --background-start-rgb: 0, 0, 0;
- --background-end-rgb: 0, 0, 0;
- }
-}
-
body {
color: rgb(var(--foreground-rgb));
background: linear-gradient(
diff --git a/app/layout.tsx b/app/layout.tsx
new file mode 100644
index 0000000..247f883
--- /dev/null
+++ b/app/layout.tsx
@@ -0,0 +1,34 @@
+import './globals.css'
+import { Inter } from 'next/font/google'
+
+export const metadata = {
+ title: 'owkor',
+ description: 'owkor',
+ manifest: 'site.webmanifest',
+ icons: {
+ icon: ['/favicon-32x32.png', '/favicon-16x16.png'],
+ apple: '/apple-touch-icon.png',
+ other: {
+ rel: 'mask-icon',
+ url: '/safari-pinned-tab.svg',
+ },
+ },
+}
+
+const inter = Inter({
+ variable: '--font-inter',
+ subsets: ['latin'],
+ display: 'swap',
+})
+
+export default function RootLayout({
+ children,
+}: {
+ children: React.ReactNode
+}) {
+ return (
+
+
{children}
+
+ )
+}
diff --git a/app/page.module.css b/app/page.module.css
new file mode 100644
index 0000000..0c920b2
--- /dev/null
+++ b/app/page.module.css
@@ -0,0 +1,7 @@
+.steps {
+ list-style: number;
+}
+
+.connect {
+ margin-top: 20px;
+}
diff --git a/app/page.tsx b/app/page.tsx
new file mode 100644
index 0000000..4547c28
--- /dev/null
+++ b/app/page.tsx
@@ -0,0 +1,47 @@
+import Image from 'next/image'
+import Link from 'next/link'
+import Script from 'next/script'
+import * as React from 'react'
+import styles from './page.module.css'
+
+
+export default function Home() {
+ return (
+
+
+
+ - Plug in your devices to a USB port. We will install firmware to it.
+ - Hit ‘Connect’ and select the correct COM port.
+ - Get firmware installed and connected in less than 3 minutes!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/components/loading-dots.module.css b/components/loading-dots.module.css
new file mode 100644
index 0000000..3b63902
--- /dev/null
+++ b/components/loading-dots.module.css
@@ -0,0 +1,40 @@
+.loading {
+ display: inline-flex;
+ align-items: center;
+}
+
+.loading .spacer {
+ margin-right: 2px;
+}
+
+.loading span {
+ animation-name: blink;
+ animation-duration: 1.4s;
+ animation-iteration-count: infinite;
+ animation-fill-mode: both;
+ width: 5px;
+ height: 5px;
+ border-radius: 50%;
+ display: inline-block;
+ margin: 0 1px;
+}
+
+.loading span:nth-of-type(2) {
+ animation-delay: 0.2s;
+}
+
+.loading span:nth-of-type(3) {
+ animation-delay: 0.4s;
+}
+
+@keyframes blink {
+ 0% {
+ opacity: 0.2;
+ }
+ 20% {
+ opacity: 1;
+ }
+ 100% {
+ opacity: 0.2;
+ }
+}
diff --git a/components/loading-dots.tsx b/components/loading-dots.tsx
new file mode 100644
index 0000000..b8fdfe8
--- /dev/null
+++ b/components/loading-dots.tsx
@@ -0,0 +1,13 @@
+import styles from './loading-dots.module.css'
+
+const LoadingDots = ({ color = '#000' }: { color?: string }) => {
+ return (
+
+
+
+
+
+ )
+}
+
+export default LoadingDots
diff --git a/package-lock.json b/package-lock.json
index 054a2fb..e416cd1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,7 +10,8 @@
"dependencies": {
"next": "14.0.4",
"react": "^18",
- "react-dom": "^18"
+ "react-dom": "^18",
+ "react-hot-toast": "^2.4.1"
},
"devDependencies": {
"@types/node": "^20",
@@ -1192,8 +1193,7 @@
"node_modules/csstype": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
- "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
- "dev": true
+ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="
},
"node_modules/damerau-levenshtein": {
"version": "1.0.8",
@@ -2216,6 +2216,14 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/goober": {
+ "version": "2.1.14",
+ "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.14.tgz",
+ "integrity": "sha512-4UpC0NdGyAFqLNPnhCT2iHpza2q+RAY3GV85a/mRPdzyPQMsj0KmMMuetdIkzWRbJ+Hgau1EZztq8ImmiMGhsg==",
+ "peerDependencies": {
+ "csstype": "^3.0.10"
+ }
+ },
"node_modules/gopd": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
@@ -3636,6 +3644,21 @@
"react": "^18.2.0"
}
},
+ "node_modules/react-hot-toast": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.4.1.tgz",
+ "integrity": "sha512-j8z+cQbWIM5LY37pR6uZR6D4LfseplqnuAO4co4u8917hBUvXlEqyP1ZzqVLcqoyUesZZv/ImreoCeHVDpE5pQ==",
+ "dependencies": {
+ "goober": "^2.1.10"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "react": ">=16",
+ "react-dom": ">=16"
+ }
+ },
"node_modules/react-is": {
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
diff --git a/package.json b/package.json
index 85511c8..fd7d4bd 100644
--- a/package.json
+++ b/package.json
@@ -9,19 +9,20 @@
"lint": "next lint"
},
"dependencies": {
+ "next": "14.0.4",
"react": "^18",
"react-dom": "^18",
- "next": "14.0.4"
+ "react-hot-toast": "^2.4.1"
},
"devDependencies": {
- "typescript": "^5",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
+ "eslint": "^8",
+ "eslint-config-next": "14.0.4",
"postcss": "^8",
"tailwindcss": "^3.3.0",
- "eslint": "^8",
- "eslint-config-next": "14.0.4"
+ "typescript": "^5"
}
}
diff --git a/public/android-chrome-192x192.png b/public/android-chrome-192x192.png
new file mode 100644
index 0000000..20d8cf0
Binary files /dev/null and b/public/android-chrome-192x192.png differ
diff --git a/public/android-chrome-512x512.png b/public/android-chrome-512x512.png
new file mode 100644
index 0000000..68319f4
Binary files /dev/null and b/public/android-chrome-512x512.png differ
diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png
new file mode 100644
index 0000000..eb5cbb6
Binary files /dev/null and b/public/apple-touch-icon.png differ
diff --git a/public/browserconfig.xml b/public/browserconfig.xml
new file mode 100644
index 0000000..b3930d0
--- /dev/null
+++ b/public/browserconfig.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+ #da532c
+
+
+
diff --git a/public/favicon-16x16.png b/public/favicon-16x16.png
new file mode 100644
index 0000000..7adbe13
Binary files /dev/null and b/public/favicon-16x16.png differ
diff --git a/public/favicon-32x32.png b/public/favicon-32x32.png
new file mode 100644
index 0000000..e670ed3
Binary files /dev/null and b/public/favicon-32x32.png differ
diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100644
index 0000000..65d05b3
Binary files /dev/null and b/public/favicon.ico differ
diff --git a/public/github.svg b/public/github.svg
new file mode 100644
index 0000000..37fa923
--- /dev/null
+++ b/public/github.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/manifest_owcare.json b/public/manifest_owcare.json
new file mode 100644
index 0000000..ecae10f
--- /dev/null
+++ b/public/manifest_owcare.json
@@ -0,0 +1,27 @@
+{
+ "name": "Owcare",
+ "version": "0.1.0",
+ "home_assistant_domain": "owcare",
+ "funding_url": "https://owkor.com/guides/supporters.html",
+ "new_install_prompt_erase": false,
+ "builds": [
+ {
+ "chipFamily": "ESP32C3",
+ "parts": [
+ { "path": "bootloader_dout_40m.bin", "offset": 0 },
+ { "path": "partitions.bin", "offset": 32768 },
+ { "path": "boot_app0.bin", "offset": 57344 },
+ { "path": "esp32-c3.bin", "offset": 65536 }
+ ]
+ },
+ {
+ "chipFamily": "ESP32-S3",
+ "parts": [
+ { "path": "bootloader_dout_40m.bin", "offset": 4096 },
+ { "path": "partitions.bin", "offset": 32768 },
+ { "path": "boot_app0.bin", "offset": 57344 },
+ { "path": "esp32-s3.bin", "offset": 65536 }
+ ]
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/public/mstile-150x150.png b/public/mstile-150x150.png
new file mode 100644
index 0000000..73c5db3
Binary files /dev/null and b/public/mstile-150x150.png differ
diff --git a/public/next.svg b/public/next.svg
deleted file mode 100644
index 5174b28..0000000
--- a/public/next.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/public/owkor.svg b/public/owkor.svg
new file mode 100644
index 0000000..dad1ba2
--- /dev/null
+++ b/public/owkor.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/safari-pinned-tab.svg b/public/safari-pinned-tab.svg
new file mode 100644
index 0000000..bd4cb60
--- /dev/null
+++ b/public/safari-pinned-tab.svg
@@ -0,0 +1,60 @@
+
+
+
diff --git a/public/site.webmanifest b/public/site.webmanifest
new file mode 100644
index 0000000..2dd2e15
--- /dev/null
+++ b/public/site.webmanifest
@@ -0,0 +1,19 @@
+{
+ "name": "owkor",
+ "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"
+}
diff --git a/public/vercel.svg b/public/vercel.svg
deleted file mode 100644
index d2f8422..0000000
--- a/public/vercel.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/settings.json b/settings.json
new file mode 100644
index 0000000..89122f3
--- /dev/null
+++ b/settings.json
@@ -0,0 +1,5 @@
+{
+ "files.associations": {
+ "*.css": "tailwindcss"
+ }
+ }
\ No newline at end of file
diff --git a/src/app/favicon.ico b/src/app/favicon.ico
deleted file mode 100644
index 718d6fe..0000000
Binary files a/src/app/favicon.ico and /dev/null differ
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
deleted file mode 100644
index 40e027f..0000000
--- a/src/app/layout.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import type { Metadata } from 'next'
-import { Inter } from 'next/font/google'
-import './globals.css'
-
-const inter = Inter({ subsets: ['latin'] })
-
-export const metadata: Metadata = {
- title: 'Create Next App',
- description: 'Generated by create next app',
-}
-
-export default function RootLayout({
- children,
-}: {
- children: React.ReactNode
-}) {
- return (
-
- {children}
-
- )
-}
diff --git a/src/app/page.tsx b/src/app/page.tsx
deleted file mode 100644
index b973266..0000000
--- a/src/app/page.tsx
+++ /dev/null
@@ -1,113 +0,0 @@
-import Image from 'next/image'
-
-export default function Home() {
- return (
-
-
-
- Get started by editing
- src/app/page.tsx
-
-
-
-
-
-
-
-
-
-
- )
-}
diff --git a/tailwind.config.ts b/tailwind.config.ts
index 1af3b8f..64d7a24 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -2,9 +2,9 @@ import type { Config } from 'tailwindcss'
const config: Config = {
content: [
- './src/pages/**/*.{js,ts,jsx,tsx,mdx}',
- './src/components/**/*.{js,ts,jsx,tsx,mdx}',
- './src/app/**/*.{js,ts,jsx,tsx,mdx}',
+ './pages/**/*.{js,ts,jsx,tsx,mdx}',
+ './components/**/*.{js,ts,jsx,tsx,mdx}',
+ './app/**/*.{js,ts,jsx,tsx,mdx}',
],
theme: {
extend: {
@@ -13,6 +13,9 @@ const config: Config = {
'gradient-conic':
'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
},
+ fontFamily: {
+ default: ['var(--font-inter)'],
+ },
},
},
plugins: [],
diff --git a/tsconfig.json b/tsconfig.json
index e59724b..1acc222 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -8,7 +8,7 @@
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
- "moduleResolution": "bundler",
+ "moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
@@ -19,7 +19,7 @@
}
],
"paths": {
- "@/*": ["./src/*"]
+ "@/*": ["./*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],