diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 72e9aa4..0000000 --- a/.dockerignore +++ /dev/null @@ -1,7 +0,0 @@ -Dockerfile -.dockerignore -node_modules -npm-debug.log -README.md -.next -.git \ No newline at end of file diff --git a/.gitignore b/.gitignore index 32b9661..7dd654b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,28 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? + # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies @@ -36,5 +61,9 @@ yarn-error.log* next-env.d.ts .syncignore -#log -app.log \ No newline at end of file +# log +app.log + +# doc +doc/.vitepress/dist +doc/.vitepress/cache \ No newline at end of file diff --git a/.npmrc b/.npmrc deleted file mode 100644 index cb15887..0000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -public-hoist-pattern[]=*@nextui-org/* \ No newline at end of file diff --git a/.prettierrc b/.prettierrc index 9c2105a..255a135 100644 --- a/.prettierrc +++ b/.prettierrc @@ -3,7 +3,6 @@ "tabWidth": 4, "trailingComma": "none", "singleQuote": false, - "printWidth": 120, + "printWidth": 100, "endOfLine": "lf" - } - \ No newline at end of file +} diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index dccf5a7..0000000 --- a/Dockerfile +++ /dev/null @@ -1,67 +0,0 @@ -FROM node:18-alpine AS base - -# Install dependencies only when needed -FROM base AS deps -# 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 -WORKDIR /app - -# Install dependencies based on the preferred package manager -COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc ./ -RUN \ - if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ - elif [ -f package-lock.json ]; then npm ci; \ - elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \ - else echo "Lockfile not found." && exit 1; \ - fi - - -# Rebuild the source code only when needed -FROM base AS builder -WORKDIR /app -COPY --from=deps /app/node_modules ./node_modules -COPY . . - -# Next.js collects completely anonymous telemetry data about general usage. -# Learn more here: https://nextjs.org/telemetry -# Uncomment the following line in case you want to disable telemetry during the build. -ENV NEXT_TELEMETRY_DISABLED 1 - -RUN \ - if [ -f yarn.lock ]; then yarn run build; \ - elif [ -f package-lock.json ]; then npm run build; \ - elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \ - else echo "Lockfile not found." && exit 1; \ - fi - -# Production image, copy all the files and run next -FROM base AS runner -WORKDIR /app - -ENV NODE_ENV production -# Uncomment the following line in case you want to disable telemetry during runtime. -ENV NEXT_TELEMETRY_DISABLED 1 - -RUN addgroup --system --gid 1001 nodejs -RUN adduser --system --uid 1001 nextjs - -COPY --from=builder /app/public ./public - -# Set the correct permission for prerender cache -RUN mkdir .next -RUN chown nextjs:nodejs .next - -# Automatically leverage output traces to reduce image size -# https://nextjs.org/docs/advanced-features/output-file-tracing -COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ -COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static - -USER nextjs - -EXPOSE 4594 - -ENV PORT 4594 - -# server.js is created by next build from the standalone output -# https://nextjs.org/docs/pages/api-reference/next-config-js/output -CMD HOSTNAME="0.0.0.0" node server.js \ No newline at end of file diff --git a/README.md b/README.md index 524672b..34fc82d 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -# SparkHome +# sparkast + +sparkast is your ultimate productivity tool that gives you the answer to all within a single searchbox. diff --git a/app/[locale]/global.css b/app/[locale]/global.css deleted file mode 100644 index f6c5a4b..0000000 --- a/app/[locale]/global.css +++ /dev/null @@ -1,28 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -:root { - --foreground-rgb: 0, 0, 0; - --background-start-rgb: 214, 219, 220; - --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(to bottom, transparent, rgb(var(--background-end-rgb))) rgb(var(--background-start-rgb)); -} - -@layer utilities { - .text-balance { - text-wrap: balance; - } -} diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx deleted file mode 100644 index e69b227..0000000 --- a/app/[locale]/layout.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import type { Metadata } from "next"; -import { Inter } from "next/font/google"; -import "./global.css"; -import { NextIntlClientProvider, useMessages } from "next-intl"; -import { ThemeProvider } from "next-themes"; -import { Providers } from "../providers"; - -const inter = Inter({ subsets: ["latin"] }); - -export const metadata: Metadata = { - title: "SparkHome", - description: "Your best browser homepage, with a magic searchbox.", - icons: { - icon: "/favicon.ico" - } -}; - -export default function LocaleLayout({ - children, - params: { locale } -}: { - children: React.ReactNode; - params: { locale: string }; -}) { - const messages = useMessages(); - return ( - - - - - - {children} - - - - - - ); -} diff --git a/app/[locale]/not-found.tsx b/app/[locale]/not-found.tsx deleted file mode 100644 index 6bb1994..0000000 --- a/app/[locale]/not-found.tsx +++ /dev/null @@ -1,11 +0,0 @@ -"use client"; -import { useTranslations } from "next-intl"; - -export default function NotFound() { - const t = useTranslations("404"); - return ( -
-

{t('title')}

-
- ); -} diff --git a/app/[locale]/page.tsx b/app/[locale]/page.tsx deleted file mode 100644 index 9e29a97..0000000 --- a/app/[locale]/page.tsx +++ /dev/null @@ -1,12 +0,0 @@ -"use client"; - -import { RecoilRoot } from "recoil"; -import Homepage from "../../components"; - -export default function Home() { - return ( - - - - ); -} diff --git a/app/[locale]/tools/base64/page.tsx b/app/[locale]/tools/base64/page.tsx deleted file mode 100644 index 8cae272..0000000 --- a/app/[locale]/tools/base64/page.tsx +++ /dev/null @@ -1,82 +0,0 @@ -"use client"; - -import Switcher from "@/components/switcher"; -import Notice from "@/components/tools/notice"; -import base64ToHex from "@/lib/base64ToHex"; -import copyToClipboard from "@/lib/copy"; -import normalizeHex from "@/lib/normalizeHex"; -import { validBase64 } from "@/lib/onesearch/baseCheck"; -import { useTranslations } from "next-intl"; -import { useEffect, useState } from "react"; -import { utoa, atou } from "unicode-encode"; - -export default function Base64() { - const t = useTranslations("tools"); - const [mode, setMode] = useState("Encode"); - const [message, setMessage] = useState(""); - const [messageResult, setMessageResult] = useState(""); - const [isHex, setHex] = useState(false); - const [info, setInfo] = useState(""); - const [type, setType] = useState(""); - useEffect(() => { - setType(""); - setInfo(""); - setHex(false); - if (mode == "Encode") { - setMessageResult(utoa(message)); - } else { - if (validBase64(message)) { - try { - setMessageResult(atou(message)); - } catch (e) { - setMessageResult(normalizeHex(base64ToHex(message))); - setHex(true); - setType("info"); - setInfo("Showing HEX result."); - } - } else if (message.trim() !== "") { - setMessageResult(""); - setType("warning"); - setInfo("Invalid Base64."); - } else { - setMessageResult(""); - } - } - }, [mode, message]); - return ( -
-

{t("base64.title")}

- -