chore: restructure packages of the project (#7)

* chore: restructure validation package

* chore: move zod only to validation package

* chore: rename packages from alparr to homarr

* chore: move mantine core, dates and icons library to ui package, move most other mantine packages to seperate packages for further customization and centralization

* chore: fix formatting

* fix: wrong typecheck command in turbo generator

* chore: fix formatting

* chore: address pull request feedback

* chore: fix ci check issues
This commit is contained in:
Meier Lukas
2024-01-02 14:18:37 +01:00
committed by GitHub
parent a082f70470
commit fa19966fcc
67 changed files with 562 additions and 304 deletions

View File

@@ -6,7 +6,7 @@
"packageRules": [ "packageRules": [
{ {
"matchPackagePatterns": [ "matchPackagePatterns": [
"^@alparr/" "^@homarr/"
], ],
"enabled": false "enabled": false
} }

View File

@@ -1,23 +1,33 @@
// Importing env files here to validate on build // Importing env files here to validate on build
import "./src/env.mjs"; import "./src/env.mjs";
import "@alparr/auth/env.mjs"; import "@homarr/auth/env.mjs";
/** @type {import("next").NextConfig} */ /** @type {import("next").NextConfig} */
const config = { const config = {
reactStrictMode: true, reactStrictMode: true,
/** Enables hot reloading for local packages without a build step */ /** Enables hot reloading for local packages without a build step */
transpilePackages: [ transpilePackages: [
"@alparr/api", "@homarr/api",
"@alparr/auth", "@homarr/auth",
"@alparr/db", "@homarr/db",
"@alparr/ui", "@homarr/ui",
"@alparr/validation", "@homarr/validation",
"@homarr/form",
"@homarr/notifications",
"@homarr/spotlight",
], ],
/** We already do linting and typechecking as separate tasks in CI */ /** We already do linting and typechecking as separate tasks in CI */
eslint: { ignoreDuringBuilds: true }, eslint: { ignoreDuringBuilds: true },
typescript: { ignoreBuildErrors: true }, typescript: { ignoreBuildErrors: true },
experimental: { experimental: {
optimizePackageImports: ["@mantine/core", "@mantine/hooks"], optimizePackageImports: [
"@mantine/core",
"@mantine/hooks",
"@mantine/dates",
"@mantine/notifications",
"@mantine/form",
"@mantine/spotlight",
],
}, },
}; };

View File

@@ -1,5 +1,5 @@
{ {
"name": "@alparr/nextjs", "name": "@homarr/nextjs",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
@@ -13,21 +13,18 @@
"with-env": "dotenv -e ../../.env --" "with-env": "dotenv -e ../../.env --"
}, },
"dependencies": { "dependencies": {
"@alparr/api": "workspace:^0.1.0", "@homarr/api": "workspace:^0.1.0",
"@alparr/auth": "workspace:^0.1.0", "@homarr/auth": "workspace:^0.1.0",
"@alparr/db": "workspace:^0.1.0", "@homarr/db": "workspace:^0.1.0",
"@alparr/translation": "workspace:^", "@homarr/translation": "workspace:^0.1.0",
"@alparr/ui": "workspace:^0.1.0", "@homarr/ui": "workspace:^0.1.0",
"@alparr/validation": "workspace:^0.1.0", "@homarr/notifications": "workspace:^0.1.0",
"@mantine/core": "^7.3.1", "@homarr/validation": "workspace:^0.1.0",
"@mantine/dates": "^7.3.1", "@homarr/spotlight": "workspace:^0.1.0",
"@mantine/form": "^7.3.1", "@homarr/form": "workspace:^0.1.0",
"@mantine/hooks": "^7.3.1", "@mantine/hooks": "^7.3.1",
"@mantine/notifications": "^7.3.1",
"@mantine/spotlight": "^7.3.1",
"@mantine/tiptap": "^7.3.1", "@mantine/tiptap": "^7.3.1",
"@t3-oss/env-nextjs": "^0.7.1", "@t3-oss/env-nextjs": "^0.7.1",
"@tabler/icons-react": "^2.42.0",
"@tanstack/react-query": "^5.8.7", "@tanstack/react-query": "^5.8.7",
"@tanstack/react-query-devtools": "^5.8.7", "@tanstack/react-query-devtools": "^5.8.7",
"@tanstack/react-query-next-experimental": "5.8.7", "@tanstack/react-query-next-experimental": "5.8.7",
@@ -43,13 +40,12 @@
"postcss-preset-mantine": "^1.11.1", "postcss-preset-mantine": "^1.11.1",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"superjson": "2.2.1", "superjson": "2.2.1"
"zod": "^3.22.2"
}, },
"devDependencies": { "devDependencies": {
"@alparr/eslint-config": "workspace:^0.2.0", "@homarr/eslint-config": "workspace:^0.2.0",
"@alparr/prettier-config": "workspace:^0.1.0", "@homarr/prettier-config": "workspace:^0.1.0",
"@alparr/tsconfig": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0",
"@types/node": "^18.18.13", "@types/node": "^18.18.13",
"@types/react": "^18.2.42", "@types/react": "^18.2.42",
"@types/react-dom": "^18.2.17", "@types/react-dom": "^18.2.17",
@@ -61,10 +57,10 @@
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,
"extends": [ "extends": [
"@alparr/eslint-config/base", "@homarr/eslint-config/base",
"@alparr/eslint-config/nextjs", "@homarr/eslint-config/nextjs",
"@alparr/eslint-config/react" "@homarr/eslint-config/react"
] ]
}, },
"prettier": "@alparr/prettier-config" "prettier": "@homarr/prettier-config"
} }

View File

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@@ -1,7 +1,7 @@
import type { PropsWithChildren } from "react"; import type { PropsWithChildren } from "react";
import { defaultLocale } from "@alparr/translation"; import { defaultLocale } from "@homarr/translation";
import { I18nProviderClient } from "@alparr/translation/client"; import { I18nProviderClient } from "@homarr/translation/client";
export const NextInternationalProvider = ({ export const NextInternationalProvider = ({
children, children,

View File

@@ -2,21 +2,21 @@
import { useState } from "react"; import { useState } from "react";
import { useRouter } from "next/navigation"; import { useRouter } from "next/navigation";
import { signIn } from "@homarr/auth/client";
import { useForm, zodResolver } from "@homarr/form";
import { useScopedI18n } from "@homarr/translation/client";
import { import {
Alert, Alert,
Button, Button,
IconAlertTriangle,
PasswordInput, PasswordInput,
rem, rem,
Stack, Stack,
TextInput, TextInput,
} from "@mantine/core"; } from "@homarr/ui";
import { useForm, zodResolver } from "@mantine/form"; import type { z } from "@homarr/validation";
import { IconAlertTriangle } from "@tabler/icons-react"; import { validation } from "@homarr/validation";
import type { z } from "zod";
import { signIn } from "@alparr/auth/client";
import { useScopedI18n } from "@alparr/translation/client";
import { signInSchema } from "@alparr/validation";
export const LoginForm = () => { export const LoginForm = () => {
const t = useScopedI18n("user"); const t = useScopedI18n("user");
@@ -24,7 +24,7 @@ export const LoginForm = () => {
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState<string>(); const [error, setError] = useState<string>();
const form = useForm<FormType>({ const form = useForm<FormType>({
validate: zodResolver(signInSchema), validate: zodResolver(validation.user.signIn),
initialValues: { initialValues: {
name: "", name: "",
password: "", password: "",
@@ -79,4 +79,4 @@ export const LoginForm = () => {
); );
}; };
type FormType = z.infer<typeof signInSchema>; type FormType = z.infer<typeof validation.user.signIn>;

View File

@@ -1,6 +1,5 @@
import { Card, Center, Stack, Text, Title } from "@mantine/core"; import { getScopedI18n } from "@homarr/translation/server";
import { Card, Center, Stack, Text, Title } from "@homarr/ui";
import { getScopedI18n } from "@alparr/translation/server";
import { LogoWithTitle } from "~/components/layout/logo"; import { LogoWithTitle } from "~/components/layout/logo";
import { LoginForm } from "./_components/login-form"; import { LoginForm } from "./_components/login-form";

View File

@@ -1,14 +1,17 @@
"use client"; "use client";
import { useRouter } from "next/navigation"; import { useRouter } from "next/navigation";
import { Button, PasswordInput, Stack, TextInput } from "@mantine/core";
import { useForm, zodResolver } from "@mantine/form";
import type { z } from "zod";
import { useScopedI18n } from "@alparr/translation/client"; import { useForm, zodResolver } from "@homarr/form";
import { initUserSchema } from "@alparr/validation"; import {
showErrorNotification,
showSuccessNotification,
} from "@homarr/notifications";
import { useScopedI18n } from "@homarr/translation/client";
import { Button, PasswordInput, Stack, TextInput } from "@homarr/ui";
import type { z } from "@homarr/validation";
import { validation } from "@homarr/validation";
import { showErrorNotification, showSuccessNotification } from "~/notification";
import { api } from "~/utils/api"; import { api } from "~/utils/api";
export const InitUserForm = () => { export const InitUserForm = () => {
@@ -16,7 +19,7 @@ export const InitUserForm = () => {
const t = useScopedI18n("user"); const t = useScopedI18n("user");
const { mutateAsync, error, isPending } = api.user.initUser.useMutation(); const { mutateAsync, error, isPending } = api.user.initUser.useMutation();
const form = useForm<FormType>({ const form = useForm<FormType>({
validate: zodResolver(initUserSchema), validate: zodResolver(validation.user.init),
validateInputOnBlur: true, validateInputOnBlur: true,
validateInputOnChange: true, validateInputOnChange: true,
initialValues: { initialValues: {
@@ -75,4 +78,4 @@ export const InitUserForm = () => {
); );
}; };
type FormType = z.infer<typeof initUserSchema>; type FormType = z.infer<typeof validation.user.init>;

View File

@@ -1,8 +1,8 @@
import { notFound } from "next/navigation"; import { notFound } from "next/navigation";
import { Card, Center, Stack, Text, Title } from "@mantine/core";
import { db } from "@alparr/db"; import { db } from "@homarr/db";
import { getScopedI18n } from "@alparr/translation/server"; import { getScopedI18n } from "@homarr/translation/server";
import { Card, Center, Stack, Text, Title } from "@homarr/ui";
import { LogoWithTitle } from "~/components/layout/logo"; import { LogoWithTitle } from "~/components/layout/logo";
import { InitUserForm } from "./_components/init-user-form"; import { InitUserForm } from "./_components/init-user-form";

View File

@@ -1,15 +1,17 @@
import type { Metadata } from "next"; import type { Metadata } from "next";
import { Inter } from "next/font/google"; import { Inter } from "next/font/google";
import "@mantine/core/styles.css"; import "@homarr/ui/styles.css";
import "@mantine/dates/styles.css"; import "@homarr/notifications/styles.css";
import "@mantine/notifications/styles.css";
import { headers } from "next/headers"; import { headers } from "next/headers";
import { ColorSchemeScript, MantineProvider } from "@mantine/core";
import { Notifications } from "@mantine/notifications";
import { uiConfiguration } from "@alparr/ui"; import { Notifications } from "@homarr/notifications";
import {
ColorSchemeScript,
MantineProvider,
uiConfiguration,
} from "@homarr/ui";
import { NextInternationalProvider } from "./_client-providers/next-international"; import { NextInternationalProvider } from "./_client-providers/next-international";
import { TRPCReactProvider } from "./_client-providers/trpc"; import { TRPCReactProvider } from "./_client-providers/trpc";

View File

@@ -1,4 +1,4 @@
import { Center, Loader } from "@mantine/core"; import { Center, Loader } from "@homarr/ui";
export default function CommonLoading() { export default function CommonLoading() {
return ( return (

View File

@@ -1,4 +1,4 @@
import { Center } from "@mantine/core"; import { Center } from "@homarr/ui";
export default function CommonNotFound() { export default function CommonNotFound() {
return <Center h="100vh">404</Center>; return <Center h="100vh">404</Center>;

View File

@@ -1,7 +1,6 @@
import { Button, Stack, Title } from "@mantine/core"; import { auth } from "@homarr/auth";
import { db } from "@homarr/db";
import { auth } from "@alparr/auth"; import { Button, Stack, Title } from "@homarr/ui";
import { db } from "@alparr/db";
export default async function HomePage() { export default async function HomePage() {
const currentSession = await auth(); const currentSession = await auth();

View File

@@ -1,6 +1,6 @@
import type { NextRequest } from "next/server"; import type { NextRequest } from "next/server";
import { createHandlers } from "@alparr/auth"; import { createHandlers } from "@homarr/auth";
export const GET = async (req: NextRequest) => { export const GET = async (req: NextRequest) => {
return await createHandlers(isCredentialsRequest(req)).handlers.GET(req); return await createHandlers(isCredentialsRequest(req)).handlers.GET(req);

View File

@@ -1,7 +1,7 @@
import { fetchRequestHandler } from "@trpc/server/adapters/fetch"; import { fetchRequestHandler } from "@trpc/server/adapters/fetch";
import { appRouter, createTRPCContext } from "@alparr/api"; import { appRouter, createTRPCContext } from "@homarr/api";
import { auth } from "@alparr/auth"; import { auth } from "@homarr/auth";
/** /**
* Configure basic CORS headers * Configure basic CORS headers

View File

@@ -1,12 +1,13 @@
import Image from "next/image"; import Image from "next/image";
import { Group, Title } from "@mantine/core";
import { Group, Title } from "@homarr/ui";
interface LogoProps { interface LogoProps {
size: number; size: number;
} }
export const Logo = ({ size = 60 }: LogoProps) => ( export const Logo = ({ size = 60 }: LogoProps) => (
<Image src="/logo/alparr.png" alt="Alparr logo" width={size} height={size} /> <Image src="/logo/homarr.png" alt="homarr logo" width={size} height={size} />
); );
export const LogoWithTitle = () => ( export const LogoWithTitle = () => (

View File

@@ -1,6 +1,6 @@
import type { NextRequest } from "next/server"; import type { NextRequest } from "next/server";
import { I18nMiddleware } from "@alparr/translation/middleware"; import { I18nMiddleware } from "@homarr/translation/middleware";
export function middleware(request: NextRequest) { export function middleware(request: NextRequest) {
return I18nMiddleware(request); return I18nMiddleware(request);

View File

@@ -1,7 +1,7 @@
import { createTRPCReact } from "@trpc/react-query"; import { createTRPCReact } from "@trpc/react-query";
import type { AppRouter } from "@alparr/api"; import type { AppRouter } from "@homarr/api";
export const api = createTRPCReact<AppRouter>(); export const api = createTRPCReact<AppRouter>();
export { type RouterInputs, type RouterOutputs } from "@alparr/api"; export { type RouterInputs, type RouterOutputs } from "@homarr/api";

View File

@@ -1,5 +1,5 @@
{ {
"extends": "@alparr/tsconfig/base.json", "extends": "@homarr/tsconfig/base.json",
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {

View File

@@ -1,5 +1,5 @@
{ {
"name": "alparr", "name": "homarr",
"private": true, "private": true,
"engines": { "engines": {
"node": ">=18.18.2" "node": ">=18.18.2"
@@ -21,7 +21,7 @@
"typecheck": "turbo typecheck" "typecheck": "turbo typecheck"
}, },
"devDependencies": { "devDependencies": {
"@alparr/prettier-config": "workspace:^0.1.0", "@homarr/prettier-config": "workspace:^0.1.0",
"@turbo/gen": "^1.10.16", "@turbo/gen": "^1.10.16",
"prettier": "^3.1.0", "prettier": "^3.1.0",
"turbo": "^1.10.16", "turbo": "^1.10.16",
@@ -32,5 +32,5 @@
"@auth/core": "0.18.0" "@auth/core": "0.18.0"
} }
}, },
"prettier": "@alparr/prettier-config" "prettier": "@homarr/prettier-config"
} }

View File

@@ -1,5 +1,5 @@
{ {
"name": "@alparr/api", "name": "@homarr/api",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"main": "./index.ts", "main": "./index.ts",
@@ -12,18 +12,17 @@
"typecheck": "tsc --noEmit" "typecheck": "tsc --noEmit"
}, },
"dependencies": { "dependencies": {
"@alparr/auth": "workspace:^0.1.0", "@homarr/auth": "workspace:^0.1.0",
"@alparr/db": "workspace:^0.1.0", "@homarr/db": "workspace:^0.1.0",
"@alparr/validation": "workspace:^0.1.0", "@homarr/validation": "workspace:^0.1.0",
"@trpc/client": "next", "@trpc/client": "next",
"@trpc/server": "next", "@trpc/server": "next",
"superjson": "2.2.1", "superjson": "2.2.1"
"zod": "^3.22.2"
}, },
"devDependencies": { "devDependencies": {
"@alparr/eslint-config": "workspace:^0.2.0", "@homarr/eslint-config": "workspace:^0.2.0",
"@alparr/prettier-config": "workspace:^0.1.0", "@homarr/prettier-config": "workspace:^0.1.0",
"@alparr/tsconfig": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0",
"eslint": "^8.53.0", "eslint": "^8.53.0",
"prettier": "^3.1.0", "prettier": "^3.1.0",
"typescript": "^5.3.3" "typescript": "^5.3.3"
@@ -31,8 +30,8 @@
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,
"extends": [ "extends": [
"@alparr/eslint-config/base" "@homarr/eslint-config/base"
] ]
}, },
"prettier": "@alparr/prettier-config" "prettier": "@homarr/prettier-config"
} }

View File

@@ -2,15 +2,15 @@ import "server-only";
import { TRPCError } from "@trpc/server"; import { TRPCError } from "@trpc/server";
import { createSalt, hashPassword } from "@alparr/auth"; import { createSalt, hashPassword } from "@homarr/auth";
import { createId, schema } from "@alparr/db"; import { createId, schema } from "@homarr/db";
import { initUserSchema } from "@alparr/validation"; import { validation } from "@homarr/validation";
import { createTRPCRouter, publicProcedure } from "../trpc"; import { createTRPCRouter, publicProcedure } from "../trpc";
export const userRouter = createTRPCRouter({ export const userRouter = createTRPCRouter({
initUser: publicProcedure initUser: publicProcedure
.input(initUserSchema) .input(validation.user.init)
.mutation(async ({ ctx, input }) => { .mutation(async ({ ctx, input }) => {
const firstUser = await ctx.db.query.users.findFirst({ const firstUser = await ctx.db.query.users.findFirst({
columns: { columns: {

View File

@@ -8,11 +8,11 @@
*/ */
import { initTRPC, TRPCError } from "@trpc/server"; import { initTRPC, TRPCError } from "@trpc/server";
import superjson from "superjson"; import superjson from "superjson";
import { ZodError } from "zod";
import { auth } from "@alparr/auth"; import { auth } from "@homarr/auth";
import type { Session } from "@alparr/auth"; import type { Session } from "@homarr/auth";
import { db } from "@alparr/db"; import { db } from "@homarr/db";
import { ZodError } from "@homarr/validation";
/** /**
* 1. CONTEXT * 1. CONTEXT

View File

@@ -1,5 +1,5 @@
{ {
"extends": "@alparr/tsconfig/base.json", "extends": "@homarr/tsconfig/base.json",
"compilerOptions": { "compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
}, },

View File

@@ -3,7 +3,7 @@ import { DrizzleAdapter } from "@auth/drizzle-adapter";
import NextAuth from "next-auth"; import NextAuth from "next-auth";
import Credentials from "next-auth/providers/credentials"; import Credentials from "next-auth/providers/credentials";
import { db } from "@alparr/db"; import { db } from "@homarr/db";
import { credentialsConfiguration } from "./providers/credentials"; import { credentialsConfiguration } from "./providers/credentials";
import { EmptyNextAuthProvider } from "./providers/empty"; import { EmptyNextAuthProvider } from "./providers/empty";

View File

@@ -1,5 +1,5 @@
{ {
"name": "@alparr/auth", "name": "@homarr/auth",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"main": "./index.ts", "main": "./index.ts",
@@ -12,7 +12,7 @@
"typecheck": "tsc --noEmit" "typecheck": "tsc --noEmit"
}, },
"dependencies": { "dependencies": {
"@alparr/db": "workspace:^0.1.0", "@homarr/db": "workspace:^0.1.0",
"@auth/core": "^0.18.4", "@auth/core": "^0.18.4",
"@auth/drizzle-adapter": "^0.3.9", "@auth/drizzle-adapter": "^0.3.9",
"@t3-oss/env-nextjs": "^0.7.1", "@t3-oss/env-nextjs": "^0.7.1",
@@ -21,14 +21,13 @@
"next": "^14.0.3", "next": "^14.0.3",
"next-auth": "5.0.0-beta.4", "next-auth": "5.0.0-beta.4",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0"
"zod": "^3.22.2"
}, },
"devDependencies": { "devDependencies": {
"@alparr/eslint-config": "workspace:^0.2.0", "@homarr/eslint-config": "workspace:^0.2.0",
"@alparr/prettier-config": "workspace:^0.1.0", "@homarr/prettier-config": "workspace:^0.1.0",
"@alparr/tsconfig": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0",
"@alparr/validation": "workspace:^0.1.0", "@homarr/validation": "workspace:^0.1.0",
"@types/bcrypt": "5.0.2", "@types/bcrypt": "5.0.2",
"@types/cookies": "0.7.10", "@types/cookies": "0.7.10",
"eslint": "^8.53.0", "eslint": "^8.53.0",
@@ -38,8 +37,8 @@
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,
"extends": [ "extends": [
"@alparr/eslint-config/base" "@homarr/eslint-config/base"
] ]
}, },
"prettier": "@alparr/prettier-config" "prettier": "@homarr/prettier-config"
} }

View File

@@ -1,9 +1,9 @@
import type Credentials from "@auth/core/providers/credentials"; import type Credentials from "@auth/core/providers/credentials";
import bcrypt from "bcrypt"; import bcrypt from "bcrypt";
import { db, eq } from "@alparr/db"; import { db, eq } from "@homarr/db";
import { users } from "@alparr/db/schema/sqlite"; import { users } from "@homarr/db/schema/sqlite";
import { signInSchema } from "@alparr/validation"; import { validation } from "@homarr/validation";
type CredentialsConfiguration = Parameters<typeof Credentials>[0]; type CredentialsConfiguration = Parameters<typeof Credentials>[0];
@@ -21,7 +21,7 @@ export const credentialsConfiguration = {
}, },
}, },
async authorize(credentials) { async authorize(credentials) {
const data = await signInSchema.parseAsync(credentials); const data = await validation.user.signIn.parseAsync(credentials);
const user = await db.query.users.findFirst({ const user = await db.query.users.findFirst({
where: eq(users.name, data.name), where: eq(users.name, data.name),

View File

@@ -1,5 +1,5 @@
{ {
"extends": "@alparr/tsconfig/base.json", "extends": "@homarr/tsconfig/base.json",
"compilerOptions": { "compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
}, },

View File

@@ -1,5 +1,5 @@
{ {
"name": "@alparr/db", "name": "@homarr/db",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"main": "./index.ts", "main": "./index.ts",
@@ -19,9 +19,9 @@
"drizzle-orm": "^0.29.1" "drizzle-orm": "^0.29.1"
}, },
"devDependencies": { "devDependencies": {
"@alparr/eslint-config": "workspace:^0.2.0", "@homarr/eslint-config": "workspace:^0.2.0",
"@alparr/prettier-config": "workspace:^0.1.0", "@homarr/prettier-config": "workspace:^0.1.0",
"@alparr/tsconfig": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0",
"@types/better-sqlite3": "7.6.8", "@types/better-sqlite3": "7.6.8",
"dotenv-cli": "^7.3.0", "dotenv-cli": "^7.3.0",
"drizzle-kit": "^0.20.6", "drizzle-kit": "^0.20.6",
@@ -32,8 +32,8 @@
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,
"extends": [ "extends": [
"@alparr/eslint-config/base" "@homarr/eslint-config/base"
] ]
}, },
"prettier": "@alparr/prettier-config" "prettier": "@homarr/prettier-config"
} }

View File

@@ -1,5 +1,5 @@
{ {
"extends": "@alparr/tsconfig/base.json", "extends": "@homarr/tsconfig/base.json",
"compilerOptions": { "compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
}, },

2
packages/form/index.ts Normal file
View File

@@ -0,0 +1,2 @@
export * from "./src";
export * from "@mantine/form";

View File

@@ -0,0 +1,38 @@
{
"name": "@homarr/form",
"private": true,
"version": "0.1.0",
"exports": {
".": "./index.ts"
},
"typesVersions": {
"*": {
"*": [
"src/*"
]
}
},
"license": "MIT",
"scripts": {
"clean": "rm -rf .turbo node_modules",
"lint": "eslint .",
"format": "prettier --check . --ignore-path ../../.gitignore",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",
"@homarr/prettier-config": "workspace:^0.1.0",
"@homarr/tsconfig": "workspace:^0.1.0",
"eslint": "^8.53.0",
"typescript": "^5.3.3"
},
"eslintConfig": {
"extends": [
"@homarr/eslint-config/base"
]
},
"prettier": "@homarr/prettier-config",
"dependencies": {
"@mantine/form": "^7.3.2"
}
}

View File

@@ -0,0 +1 @@
export const name = "form";

View File

@@ -0,0 +1,8 @@
{
"extends": "@homarr/tsconfig/base.json",
"compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": ["*.ts", "src"],
"exclude": ["node_modules"]
}

View File

@@ -0,0 +1,2 @@
export * from "./src";
export { Notifications } from "@mantine/notifications";

View File

@@ -0,0 +1,40 @@
{
"name": "@homarr/notifications",
"private": true,
"version": "0.1.0",
"exports": {
".": "./index.ts",
"./styles.css": "./src/styles.css"
},
"typesVersions": {
"*": {
"*": [
"src/*"
]
}
},
"license": "MIT",
"scripts": {
"clean": "rm -rf .turbo node_modules",
"lint": "eslint .",
"format": "prettier --check . --ignore-path ../../.gitignore",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",
"@homarr/prettier-config": "workspace:^0.1.0",
"@homarr/tsconfig": "workspace:^0.1.0",
"eslint": "^8.53.0",
"typescript": "^5.3.3"
},
"dependencies": {
"@mantine/notifications": "7.3.2",
"@homarr/ui": "workspace:^0.1.0"
},
"eslintConfig": {
"extends": [
"@homarr/eslint-config/base"
]
},
"prettier": "@homarr/prettier-config"
}

View File

@@ -1,7 +1,7 @@
import { rem } from "@mantine/core";
import type { NotificationData } from "@mantine/notifications"; import type { NotificationData } from "@mantine/notifications";
import { notifications } from "@mantine/notifications"; import { notifications } from "@mantine/notifications";
import { IconCheck, IconX } from "@tabler/icons-react";
import { IconCheck, IconX, rem } from "@homarr/ui";
type CommonNotificationProps = Pick<NotificationData, "title" | "message">; type CommonNotificationProps = Pick<NotificationData, "title" | "message">;

View File

@@ -0,0 +1 @@
@import "@mantine/notifications/styles.css";

View File

@@ -0,0 +1,8 @@
{
"extends": "@homarr/tsconfig/base.json",
"compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": ["*.ts", "src"],
"exclude": ["node_modules"]
}

View File

@@ -0,0 +1 @@
export * from "./src";

View File

@@ -0,0 +1,38 @@
{
"name": "@homarr/spotlight",
"private": true,
"version": "0.1.0",
"exports": {
".": "./index.ts"
},
"typesVersions": {
"*": {
"*": [
"src/*"
]
}
},
"license": "MIT",
"scripts": {
"clean": "rm -rf .turbo node_modules",
"lint": "eslint .",
"format": "prettier --check . --ignore-path ../../.gitignore",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",
"@homarr/prettier-config": "workspace:^0.1.0",
"@homarr/tsconfig": "workspace:^0.1.0",
"eslint": "^8.53.0",
"typescript": "^5.3.3"
},
"eslintConfig": {
"extends": [
"@homarr/eslint-config/base"
]
},
"prettier": "@homarr/prettier-config",
"dependencies": {
"@mantine/spotlight": "^7.3.2"
}
}

View File

@@ -0,0 +1 @@
export const name = "spotlight";

View File

@@ -0,0 +1,8 @@
{
"extends": "@homarr/tsconfig/base.json",
"compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": ["*.ts", "src"],
"exclude": ["node_modules"]
}

View File

@@ -1,5 +1,5 @@
{ {
"name": "@alparr/translation", "name": "@homarr/translation",
"private": true, "private": true,
"version": "0.1.0", "version": "0.1.0",
"exports": { "exports": {
@@ -23,18 +23,18 @@
"typecheck": "tsc --noEmit" "typecheck": "tsc --noEmit"
}, },
"devDependencies": { "devDependencies": {
"@alparr/eslint-config": "workspace:^0.2.0", "@homarr/eslint-config": "workspace:^0.2.0",
"@alparr/prettier-config": "workspace:^0.1.0", "@homarr/prettier-config": "workspace:^0.1.0",
"@alparr/tsconfig": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0",
"eslint": "^8.53.0", "eslint": "^8.53.0",
"typescript": "^5.3.3" "typescript": "^5.3.3"
}, },
"eslintConfig": { "eslintConfig": {
"extends": [ "extends": [
"@alparr/eslint-config/base" "@homarr/eslint-config/base"
] ]
}, },
"prettier": "@alparr/prettier-config", "prettier": "@homarr/prettier-config",
"dependencies": { "dependencies": {
"next-international": "^1.1.4" "next-international": "^1.1.4"
} }

View File

@@ -6,7 +6,7 @@ export default {
subtitle: "Willkommen zurück! Bitte gib deine Zugangsdaten ein", subtitle: "Willkommen zurück! Bitte gib deine Zugangsdaten ein",
}, },
init: { init: {
title: "Neue Alparr Installation", title: "Neue Homarr Installation",
subtitle: "Bitte erstelle den initialen Administrator Benutzer", subtitle: "Bitte erstelle den initialen Administrator Benutzer",
}, },
}, },

View File

@@ -6,7 +6,7 @@ export default {
subtitle: "Welcome back! Please enter your credentials", subtitle: "Welcome back! Please enter your credentials",
}, },
init: { init: {
title: "New Alparr installation", title: "New Homarr installation",
subtitle: "Please create the initial administator user", subtitle: "Please create the initial administator user",
}, },
}, },

View File

@@ -1,5 +1,5 @@
{ {
"extends": "@alparr/tsconfig/base.json", "extends": "@homarr/tsconfig/base.json",
"compilerOptions": { "compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
}, },

View File

@@ -1 +1,4 @@
export * from "./src"; export * from "./src";
export * from "@mantine/core";
export * from "@mantine/dates";
export * from "@tabler/icons-react";

View File

@@ -1,9 +1,10 @@
{ {
"name": "@alparr/ui", "name": "@homarr/ui",
"private": true, "private": true,
"version": "0.1.0", "version": "0.1.0",
"exports": { "exports": {
".": "./index.ts" ".": "./index.ts",
"./styles.css": "./src/styles.css"
}, },
"typesVersions": { "typesVersions": {
"*": { "*": {
@@ -20,19 +21,21 @@
"typecheck": "tsc --noEmit" "typecheck": "tsc --noEmit"
}, },
"devDependencies": { "devDependencies": {
"@alparr/eslint-config": "workspace:^0.2.0", "@homarr/eslint-config": "workspace:^0.2.0",
"@alparr/prettier-config": "workspace:^0.1.0", "@homarr/prettier-config": "workspace:^0.1.0",
"@alparr/tsconfig": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0",
"eslint": "^8.53.0", "eslint": "^8.53.0",
"typescript": "^5.3.3" "typescript": "^5.3.3"
}, },
"eslintConfig": { "eslintConfig": {
"extends": [ "extends": [
"@alparr/eslint-config/base" "@homarr/eslint-config/base"
] ]
}, },
"prettier": "@alparr/prettier-config", "prettier": "@homarr/prettier-config",
"dependencies": { "dependencies": {
"@mantine/core": "^7.3.1" "@mantine/core": "^7.3.2",
"@mantine/dates": "7.3.2",
"@tabler/icons-react": "^2.42.0"
} }
} }

View File

@@ -0,0 +1,2 @@
@import "@mantine/core/styles.css";
@import "@mantine/dates/styles.css";

View File

@@ -1,5 +1,5 @@
{ {
"extends": "@alparr/tsconfig/base.json", "extends": "@homarr/tsconfig/base.json",
"compilerOptions": { "compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
}, },

View File

@@ -1 +1,2 @@
export * from "./src"; export * from "./src";
export * from "zod";

View File

@@ -1,5 +1,5 @@
{ {
"name": "@alparr/validation", "name": "@homarr/validation",
"private": true, "private": true,
"version": "0.1.0", "version": "0.1.0",
"exports": { "exports": {
@@ -20,18 +20,18 @@
"typecheck": "tsc --noEmit" "typecheck": "tsc --noEmit"
}, },
"devDependencies": { "devDependencies": {
"@alparr/eslint-config": "workspace:^0.2.0", "@homarr/eslint-config": "workspace:^0.2.0",
"@alparr/prettier-config": "workspace:^0.1.0", "@homarr/prettier-config": "workspace:^0.1.0",
"@alparr/tsconfig": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0",
"eslint": "^8.53.0", "eslint": "^8.53.0",
"typescript": "^5.3.3" "typescript": "^5.3.3"
}, },
"eslintConfig": { "eslintConfig": {
"extends": [ "extends": [
"@alparr/eslint-config/base" "@homarr/eslint-config/base"
] ]
}, },
"prettier": "@alparr/prettier-config", "prettier": "@homarr/prettier-config",
"dependencies": { "dependencies": {
"zod": "^3.22.2" "zod": "^3.22.2"
} }

View File

@@ -1 +1,5 @@
export * from "./user"; import { userSchemas } from "./user";
export const validation = {
user: userSchemas,
};

View File

@@ -3,7 +3,7 @@ import { z } from "zod";
const usernameSchema = z.string().min(3).max(255); const usernameSchema = z.string().min(3).max(255);
const passwordSchema = z.string().min(8).max(255); const passwordSchema = z.string().min(8).max(255);
export const initUserSchema = z const initUserSchema = z
.object({ .object({
username: usernameSchema, username: usernameSchema,
password: passwordSchema, password: passwordSchema,
@@ -14,7 +14,12 @@ export const initUserSchema = z
message: "Passwords do not match", message: "Passwords do not match",
}); });
export const signInSchema = z.object({ const signInSchema = z.object({
name: z.string(), name: z.string(),
password: z.string(), password: z.string(),
}); });
export const userSchemas = {
signIn: signInSchema,
init: initUserSchema,
};

View File

@@ -1,5 +1,5 @@
{ {
"extends": "@alparr/tsconfig/base.json", "extends": "@homarr/tsconfig/base.json",
"compilerOptions": { "compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
}, },

284
pnpm-lock.yaml generated
View File

@@ -11,7 +11,7 @@ importers:
.: .:
devDependencies: devDependencies:
'@alparr/prettier-config': '@homarr/prettier-config':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:tooling/prettier version: link:tooling/prettier
'@turbo/gen': '@turbo/gen':
@@ -29,51 +29,42 @@ importers:
apps/nextjs: apps/nextjs:
dependencies: dependencies:
'@alparr/api': '@homarr/api':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../packages/api version: link:../../packages/api
'@alparr/auth': '@homarr/auth':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../packages/auth version: link:../../packages/auth
'@alparr/db': '@homarr/db':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../packages/db version: link:../../packages/db
'@alparr/translation': '@homarr/form':
specifier: workspace:^ specifier: workspace:^0.1.0
version: link:../../packages/form
'@homarr/notifications':
specifier: workspace:^0.1.0
version: link:../../packages/notifications
'@homarr/spotlight':
specifier: workspace:^0.1.0
version: link:../../packages/spotlight
'@homarr/translation':
specifier: workspace:^0.1.0
version: link:../../packages/translation version: link:../../packages/translation
'@alparr/ui': '@homarr/ui':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../packages/ui version: link:../../packages/ui
'@alparr/validation': '@homarr/validation':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../packages/validation version: link:../../packages/validation
'@mantine/core':
specifier: ^7.3.1
version: 7.3.1(@mantine/hooks@7.3.1)(@types/react@18.2.42)(react-dom@18.2.0)(react@18.2.0)
'@mantine/dates':
specifier: ^7.3.1
version: 7.3.1(@mantine/core@7.3.1)(@mantine/hooks@7.3.1)(dayjs@1.11.10)(react-dom@18.2.0)(react@18.2.0)
'@mantine/form':
specifier: ^7.3.1
version: 7.3.1(react@18.2.0)
'@mantine/hooks': '@mantine/hooks':
specifier: ^7.3.1 specifier: ^7.3.1
version: 7.3.1(react@18.2.0) version: 7.3.1(react@18.2.0)
'@mantine/notifications':
specifier: ^7.3.1
version: 7.3.1(@mantine/core@7.3.1)(@mantine/hooks@7.3.1)(react-dom@18.2.0)(react@18.2.0)
'@mantine/spotlight':
specifier: ^7.3.1
version: 7.3.1(@mantine/core@7.3.1)(@mantine/hooks@7.3.1)(react-dom@18.2.0)(react@18.2.0)
'@mantine/tiptap': '@mantine/tiptap':
specifier: ^7.3.1 specifier: ^7.3.1
version: 7.3.1(@mantine/core@7.3.1)(@mantine/hooks@7.3.1)(@tabler/icons-react@2.42.0)(@tiptap/extension-link@2.1.13)(react-dom@18.2.0)(react@18.2.0) version: 7.3.1(@mantine/core@7.3.1)(@mantine/hooks@7.3.1)(@tabler/icons-react@2.42.0)(@tiptap/extension-link@2.1.13)(react-dom@18.2.0)(react@18.2.0)
'@t3-oss/env-nextjs': '@t3-oss/env-nextjs':
specifier: ^0.7.1 specifier: ^0.7.1
version: 0.7.1(typescript@5.3.3)(zod@3.22.2) version: 0.7.1(typescript@5.3.3)(zod@3.22.4)
'@tabler/icons-react':
specifier: ^2.42.0
version: 2.42.0(react@18.2.0)
'@tanstack/react-query': '@tanstack/react-query':
specifier: ^5.8.7 specifier: ^5.8.7
version: 5.8.7(react-dom@18.2.0)(react@18.2.0) version: 5.8.7(react-dom@18.2.0)(react@18.2.0)
@@ -122,17 +113,14 @@ importers:
superjson: superjson:
specifier: 2.2.1 specifier: 2.2.1
version: 2.2.1 version: 2.2.1
zod:
specifier: ^3.22.2
version: 3.22.2
devDependencies: devDependencies:
'@alparr/eslint-config': '@homarr/eslint-config':
specifier: workspace:^0.2.0 specifier: workspace:^0.2.0
version: link:../../tooling/eslint version: link:../../tooling/eslint
'@alparr/prettier-config': '@homarr/prettier-config':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../tooling/prettier version: link:../../tooling/prettier
'@alparr/tsconfig': '@homarr/tsconfig':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../tooling/typescript version: link:../../tooling/typescript
'@types/node': '@types/node':
@@ -159,13 +147,13 @@ importers:
packages/api: packages/api:
dependencies: dependencies:
'@alparr/auth': '@homarr/auth':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../auth version: link:../auth
'@alparr/db': '@homarr/db':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../db version: link:../db
'@alparr/validation': '@homarr/validation':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../validation version: link:../validation
'@trpc/client': '@trpc/client':
@@ -177,17 +165,14 @@ importers:
superjson: superjson:
specifier: 2.2.1 specifier: 2.2.1
version: 2.2.1 version: 2.2.1
zod:
specifier: ^3.22.2
version: 3.22.2
devDependencies: devDependencies:
'@alparr/eslint-config': '@homarr/eslint-config':
specifier: workspace:^0.2.0 specifier: workspace:^0.2.0
version: link:../../tooling/eslint version: link:../../tooling/eslint
'@alparr/prettier-config': '@homarr/prettier-config':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../tooling/prettier version: link:../../tooling/prettier
'@alparr/tsconfig': '@homarr/tsconfig':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../tooling/typescript version: link:../../tooling/typescript
eslint: eslint:
@@ -202,18 +187,18 @@ importers:
packages/auth: packages/auth:
dependencies: dependencies:
'@alparr/db':
specifier: workspace:^0.1.0
version: link:../db
'@auth/core': '@auth/core':
specifier: 0.18.0 specifier: 0.18.0
version: 0.18.0 version: 0.18.0
'@auth/drizzle-adapter': '@auth/drizzle-adapter':
specifier: ^0.3.9 specifier: ^0.3.9
version: 0.3.9 version: 0.3.9
'@homarr/db':
specifier: workspace:^0.1.0
version: link:../db
'@t3-oss/env-nextjs': '@t3-oss/env-nextjs':
specifier: ^0.7.1 specifier: ^0.7.1
version: 0.7.1(typescript@5.3.3)(zod@3.22.2) version: 0.7.1(typescript@5.3.3)(zod@3.22.4)
bcrypt: bcrypt:
specifier: ^5.1.1 specifier: ^5.1.1
version: 5.1.1 version: 5.1.1
@@ -232,20 +217,17 @@ importers:
react-dom: react-dom:
specifier: 18.2.0 specifier: 18.2.0
version: 18.2.0(react@18.2.0) version: 18.2.0(react@18.2.0)
zod:
specifier: ^3.22.2
version: 3.22.2
devDependencies: devDependencies:
'@alparr/eslint-config': '@homarr/eslint-config':
specifier: workspace:^0.2.0 specifier: workspace:^0.2.0
version: link:../../tooling/eslint version: link:../../tooling/eslint
'@alparr/prettier-config': '@homarr/prettier-config':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../tooling/prettier version: link:../../tooling/prettier
'@alparr/tsconfig': '@homarr/tsconfig':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../tooling/typescript version: link:../../tooling/typescript
'@alparr/validation': '@homarr/validation':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../validation version: link:../validation
'@types/bcrypt': '@types/bcrypt':
@@ -276,13 +258,13 @@ importers:
specifier: ^0.29.1 specifier: ^0.29.1
version: 0.29.1(@types/better-sqlite3@7.6.8)(better-sqlite3@9.2.2) version: 0.29.1(@types/better-sqlite3@7.6.8)(better-sqlite3@9.2.2)
devDependencies: devDependencies:
'@alparr/eslint-config': '@homarr/eslint-config':
specifier: workspace:^0.2.0 specifier: workspace:^0.2.0
version: link:../../tooling/eslint version: link:../../tooling/eslint
'@alparr/prettier-config': '@homarr/prettier-config':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../tooling/prettier version: link:../../tooling/prettier
'@alparr/tsconfig': '@homarr/tsconfig':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../tooling/typescript version: link:../../tooling/typescript
'@types/better-sqlite3': '@types/better-sqlite3':
@@ -304,19 +286,88 @@ importers:
specifier: ^5.3.3 specifier: ^5.3.3
version: 5.3.3 version: 5.3.3
packages/form:
dependencies:
'@mantine/form':
specifier: ^7.3.2
version: 7.3.2(react@18.2.0)
devDependencies:
'@homarr/eslint-config':
specifier: workspace:^0.2.0
version: link:../../tooling/eslint
'@homarr/prettier-config':
specifier: workspace:^0.1.0
version: link:../../tooling/prettier
'@homarr/tsconfig':
specifier: workspace:^0.1.0
version: link:../../tooling/typescript
eslint:
specifier: ^8.53.0
version: 8.53.0
typescript:
specifier: ^5.3.3
version: 5.3.3
packages/notifications:
dependencies:
'@homarr/ui':
specifier: workspace:^0.1.0
version: link:../ui
'@mantine/notifications':
specifier: 7.3.2
version: 7.3.2(@mantine/core@7.3.2)(@mantine/hooks@7.3.2)(react-dom@18.2.0)(react@18.2.0)
devDependencies:
'@homarr/eslint-config':
specifier: workspace:^0.2.0
version: link:../../tooling/eslint
'@homarr/prettier-config':
specifier: workspace:^0.1.0
version: link:../../tooling/prettier
'@homarr/tsconfig':
specifier: workspace:^0.1.0
version: link:../../tooling/typescript
eslint:
specifier: ^8.53.0
version: 8.53.0
typescript:
specifier: ^5.3.3
version: 5.3.3
packages/spotlight:
dependencies:
'@mantine/spotlight':
specifier: ^7.3.2
version: 7.3.2(@mantine/core@7.3.2)(@mantine/hooks@7.3.2)(react-dom@18.2.0)(react@18.2.0)
devDependencies:
'@homarr/eslint-config':
specifier: workspace:^0.2.0
version: link:../../tooling/eslint
'@homarr/prettier-config':
specifier: workspace:^0.1.0
version: link:../../tooling/prettier
'@homarr/tsconfig':
specifier: workspace:^0.1.0
version: link:../../tooling/typescript
eslint:
specifier: ^8.53.0
version: 8.53.0
typescript:
specifier: ^5.3.3
version: 5.3.3
packages/translation: packages/translation:
dependencies: dependencies:
next-international: next-international:
specifier: ^1.1.4 specifier: ^1.1.4
version: 1.1.4 version: 1.1.4
devDependencies: devDependencies:
'@alparr/eslint-config': '@homarr/eslint-config':
specifier: workspace:^0.2.0 specifier: workspace:^0.2.0
version: link:../../tooling/eslint version: link:../../tooling/eslint
'@alparr/prettier-config': '@homarr/prettier-config':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../tooling/prettier version: link:../../tooling/prettier
'@alparr/tsconfig': '@homarr/tsconfig':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../tooling/typescript version: link:../../tooling/typescript
eslint: eslint:
@@ -329,16 +380,22 @@ importers:
packages/ui: packages/ui:
dependencies: dependencies:
'@mantine/core': '@mantine/core':
specifier: ^7.3.1 specifier: ^7.3.2
version: 7.3.1(@mantine/hooks@7.3.1)(@types/react@18.2.42)(react-dom@18.2.0)(react@18.2.0) version: 7.3.2(@mantine/hooks@7.3.2)(react-dom@18.2.0)(react@18.2.0)
'@mantine/dates':
specifier: 7.3.2
version: 7.3.2(@mantine/core@7.3.2)(@mantine/hooks@7.3.2)(dayjs@1.11.10)(react-dom@18.2.0)(react@18.2.0)
'@tabler/icons-react':
specifier: ^2.42.0
version: 2.42.0(react@18.2.0)
devDependencies: devDependencies:
'@alparr/eslint-config': '@homarr/eslint-config':
specifier: workspace:^0.2.0 specifier: workspace:^0.2.0
version: link:../../tooling/eslint version: link:../../tooling/eslint
'@alparr/prettier-config': '@homarr/prettier-config':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../tooling/prettier version: link:../../tooling/prettier
'@alparr/tsconfig': '@homarr/tsconfig':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../tooling/typescript version: link:../../tooling/typescript
eslint: eslint:
@@ -354,13 +411,13 @@ importers:
specifier: ^3.22.2 specifier: ^3.22.2
version: 3.22.2 version: 3.22.2
devDependencies: devDependencies:
'@alparr/eslint-config': '@homarr/eslint-config':
specifier: workspace:^0.2.0 specifier: workspace:^0.2.0
version: link:../../tooling/eslint version: link:../../tooling/eslint
'@alparr/prettier-config': '@homarr/prettier-config':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../tooling/prettier version: link:../../tooling/prettier
'@alparr/tsconfig': '@homarr/tsconfig':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../../tooling/typescript version: link:../../tooling/typescript
eslint: eslint:
@@ -400,10 +457,10 @@ importers:
specifier: ^4.6.0 specifier: ^4.6.0
version: 4.6.0(eslint@8.53.0) version: 4.6.0(eslint@8.53.0)
devDependencies: devDependencies:
'@alparr/prettier-config': '@homarr/prettier-config':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../prettier version: link:../prettier
'@alparr/tsconfig': '@homarr/tsconfig':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../typescript version: link:../typescript
'@types/eslint': '@types/eslint':
@@ -427,7 +484,7 @@ importers:
specifier: ^3.1.0 specifier: ^3.1.0
version: 3.1.0 version: 3.1.0
devDependencies: devDependencies:
'@alparr/tsconfig': '@homarr/tsconfig':
specifier: workspace:^0.1.0 specifier: workspace:^0.1.0
version: link:../typescript version: link:../typescript
typescript: typescript:
@@ -1346,25 +1403,45 @@ packages:
- '@types/react' - '@types/react'
dev: false dev: false
/@mantine/dates@7.3.1(@mantine/core@7.3.1)(@mantine/hooks@7.3.1)(dayjs@1.11.10)(react-dom@18.2.0)(react@18.2.0): /@mantine/core@7.3.2(@mantine/hooks@7.3.2)(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-OI2qs5MgdYkwI7n+KuQ1tj9OhHloO0ozVOTSYyF/bgEfawCrd4TM76IcvIbfcTpmTLly1FflqFTM45+KVoQtbQ==} resolution: {integrity: sha512-CwAuQogVLcLR7O9e1eOgi3gtk4XX6cnaqevAxzJJpIOIyCnHiQ3cEGINVXyUUjUUipBlvK3sqz3NPGJ2ekLFDQ==}
peerDependencies: peerDependencies:
'@mantine/core': 7.3.1 '@mantine/hooks': 7.3.2
'@mantine/hooks': 7.3.1 react: ^18.2.0
react-dom: ^18.2.0
dependencies:
'@floating-ui/react': 0.24.8(react-dom@18.2.0)(react@18.2.0)
'@mantine/hooks': 7.3.2(react@18.2.0)
clsx: 2.0.0
react: 18.2.0
react-dom: 18.2.0(react@18.2.0)
react-number-format: 5.3.1(react-dom@18.2.0)(react@18.2.0)
react-remove-scroll: 2.5.7(@types/react@18.2.42)(react@18.2.0)
react-textarea-autosize: 8.5.3(@types/react@18.2.42)(react@18.2.0)
type-fest: 3.13.1
transitivePeerDependencies:
- '@types/react'
dev: false
/@mantine/dates@7.3.2(@mantine/core@7.3.2)(@mantine/hooks@7.3.2)(dayjs@1.11.10)(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-mmP0PYpM9GYTXRhEL4Ulb+170vgW8fpGwRdVNuCCE/cyzIKHPJzaI2pEGR/i+sboH+RC1InCy/JaiDkPY6Fzlg==}
peerDependencies:
'@mantine/core': 7.3.2
'@mantine/hooks': 7.3.2
dayjs: '>=1.0.0' dayjs: '>=1.0.0'
react: ^18.2.0 react: ^18.2.0
react-dom: ^18.2.0 react-dom: ^18.2.0
dependencies: dependencies:
'@mantine/core': 7.3.1(@mantine/hooks@7.3.1)(@types/react@18.2.42)(react-dom@18.2.0)(react@18.2.0) '@mantine/core': 7.3.2(@mantine/hooks@7.3.2)(react-dom@18.2.0)(react@18.2.0)
'@mantine/hooks': 7.3.1(react@18.2.0) '@mantine/hooks': 7.3.2(react@18.2.0)
clsx: 2.0.0 clsx: 2.0.0
dayjs: 1.11.10 dayjs: 1.11.10
react: 18.2.0 react: 18.2.0
react-dom: 18.2.0(react@18.2.0) react-dom: 18.2.0(react@18.2.0)
dev: false dev: false
/@mantine/form@7.3.1(react@18.2.0): /@mantine/form@7.3.2(react@18.2.0):
resolution: {integrity: sha512-Oo8f7MuexeLM9ylQP5sZu4ljM//8wncvv+N9ZbPsagIn0RMW+oqdEikJfaAgZafSJKngAJ0H4krJu9J83sraDw==} resolution: {integrity: sha512-/qa1KQKVC46XWgIU190r3XM3Xld8Lsvz4L/an//TO67RnAGEdC5OCvr2JCb+fprZZi3YdxaKOkVNvP20W23qkg==}
peerDependencies: peerDependencies:
react: ^18.2.0 react: ^18.2.0
dependencies: dependencies:
@@ -1381,39 +1458,47 @@ packages:
react: 18.2.0 react: 18.2.0
dev: false dev: false
/@mantine/notifications@7.3.1(@mantine/core@7.3.1)(@mantine/hooks@7.3.1)(react-dom@18.2.0)(react@18.2.0): /@mantine/hooks@7.3.2(react@18.2.0):
resolution: {integrity: sha512-9q/Kxzc18hx5PZW4uUSoYRKBlVZPojmbS6DFrua9T684MyDz2a4Hhj6d90i+MwDIu39p6C6i3pl8FLoPqeb0ww==} resolution: {integrity: sha512-xgumuuI3PBWXff5N02HCI7PEy25mDEdyXDQklUYK93J6FKwpcosyZnGVitoUrV1gLtYYa9ZudeAWdhHuh/CpOg==}
peerDependencies: peerDependencies:
'@mantine/core': 7.3.1 react: ^18.2.0
'@mantine/hooks': 7.3.1 dependencies:
react: 18.2.0
dev: false
/@mantine/notifications@7.3.2(@mantine/core@7.3.2)(@mantine/hooks@7.3.2)(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-XOzgm4pm4XszavVN0QUjN+IP0xiG2IochxJSz/FduTI0r3u1WxdpvDYlOvEJpHhtWvyqI8W8rx6cPJaD2HdAwQ==}
peerDependencies:
'@mantine/core': 7.3.2
'@mantine/hooks': 7.3.2
react: ^18.2.0 react: ^18.2.0
react-dom: ^18.2.0 react-dom: ^18.2.0
dependencies: dependencies:
'@mantine/core': 7.3.1(@mantine/hooks@7.3.1)(@types/react@18.2.42)(react-dom@18.2.0)(react@18.2.0) '@mantine/core': 7.3.2(@mantine/hooks@7.3.2)(react-dom@18.2.0)(react@18.2.0)
'@mantine/hooks': 7.3.1(react@18.2.0) '@mantine/hooks': 7.3.2(react@18.2.0)
'@mantine/store': 7.3.1(react@18.2.0) '@mantine/store': 7.3.2(react@18.2.0)
react: 18.2.0 react: 18.2.0
react-dom: 18.2.0(react@18.2.0) react-dom: 18.2.0(react@18.2.0)
react-transition-group: 4.4.5(react-dom@18.2.0)(react@18.2.0) react-transition-group: 4.4.5(react-dom@18.2.0)(react@18.2.0)
dev: false dev: false
/@mantine/spotlight@7.3.1(@mantine/core@7.3.1)(@mantine/hooks@7.3.1)(react-dom@18.2.0)(react@18.2.0): /@mantine/spotlight@7.3.2(@mantine/core@7.3.2)(@mantine/hooks@7.3.2)(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-FgejHyrtwytwwErNwGab83qxrvNXe3TSCcWdJaOY4QSAbk9Awhja2ZpiDUKHV9MR5GKk3IiH6WVvEtYq5eOOhQ==} resolution: {integrity: sha512-wvrIj7ZZKoVwKFxgY+KvWilu1YYdkv8HDUzZzRxOlD9fjPyyMRgBxAdVkxA4sLbol4XoCpW83dNIiXDII4httw==}
peerDependencies: peerDependencies:
'@mantine/core': 7.3.1 '@mantine/core': 7.3.2
'@mantine/hooks': 7.3.1 '@mantine/hooks': 7.3.2
react: ^18.2.0 react: ^18.2.0
react-dom: ^18.2.0 react-dom: ^18.2.0
dependencies: dependencies:
'@mantine/core': 7.3.1(@mantine/hooks@7.3.1)(@types/react@18.2.42)(react-dom@18.2.0)(react@18.2.0) '@mantine/core': 7.3.2(@mantine/hooks@7.3.2)(react-dom@18.2.0)(react@18.2.0)
'@mantine/hooks': 7.3.1(react@18.2.0) '@mantine/hooks': 7.3.2(react@18.2.0)
'@mantine/store': 7.3.1(react@18.2.0) '@mantine/store': 7.3.2(react@18.2.0)
react: 18.2.0 react: 18.2.0
react-dom: 18.2.0(react@18.2.0) react-dom: 18.2.0(react@18.2.0)
dev: false dev: false
/@mantine/store@7.3.1(react@18.2.0): /@mantine/store@7.3.2(react@18.2.0):
resolution: {integrity: sha512-B4kFI0ZhZTftlMvD5d8P0y1ATKFAMIA5MT4j0gNUgYEKMl1KkM/dT3kBPC2/32jz4GM9t2UL+D3CvkTwSX/BsA==} resolution: {integrity: sha512-M1eWHzTRCeCFvrpFhXKIM9zblrlIT5/XrMue/fP2HrkA43dpkgq+ArnZkN3LhG9lWR/EKbRwQWDhDIvdLtfD7w==}
peerDependencies: peerDependencies:
react: ^18.2.0 react: ^18.2.0
dependencies: dependencies:
@@ -1618,7 +1703,7 @@ packages:
tslib: 2.5.0 tslib: 2.5.0
dev: false dev: false
/@t3-oss/env-core@0.7.1(typescript@5.3.3)(zod@3.22.2): /@t3-oss/env-core@0.7.1(typescript@5.3.3)(zod@3.22.4):
resolution: {integrity: sha512-3+SQt39OlmSaRLqYVFv8uRm1BpFepM5TIiMytRqO9cjH+wB77o6BIJdeyM5h5U4qLBMEzOJWCY4MBaU/rLwbYw==} resolution: {integrity: sha512-3+SQt39OlmSaRLqYVFv8uRm1BpFepM5TIiMytRqO9cjH+wB77o6BIJdeyM5h5U4qLBMEzOJWCY4MBaU/rLwbYw==}
peerDependencies: peerDependencies:
typescript: '>=4.7.2' typescript: '>=4.7.2'
@@ -1628,10 +1713,10 @@ packages:
optional: true optional: true
dependencies: dependencies:
typescript: 5.3.3 typescript: 5.3.3
zod: 3.22.2 zod: 3.22.4
dev: false dev: false
/@t3-oss/env-nextjs@0.7.1(typescript@5.3.3)(zod@3.22.2): /@t3-oss/env-nextjs@0.7.1(typescript@5.3.3)(zod@3.22.4):
resolution: {integrity: sha512-tQDbNLGCOvKGi+JoGuJ/CJInJI7/kLWJqtgGppAKS7ZFLdVOqZYR/uRjxlXOWPnxmUKF8VswOAsq7fXUpNZDhA==} resolution: {integrity: sha512-tQDbNLGCOvKGi+JoGuJ/CJInJI7/kLWJqtgGppAKS7ZFLdVOqZYR/uRjxlXOWPnxmUKF8VswOAsq7fXUpNZDhA==}
peerDependencies: peerDependencies:
typescript: '>=4.7.2' typescript: '>=4.7.2'
@@ -1640,9 +1725,9 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
'@t3-oss/env-core': 0.7.1(typescript@5.3.3)(zod@3.22.2) '@t3-oss/env-core': 0.7.1(typescript@5.3.3)(zod@3.22.4)
typescript: 5.3.3 typescript: 5.3.3
zod: 3.22.2 zod: 3.22.4
dev: false dev: false
/@tabler/icons-react@2.42.0(react@18.2.0): /@tabler/icons-react@2.42.0(react@18.2.0):
@@ -7059,4 +7144,3 @@ packages:
/zod@3.22.4: /zod@3.22.4:
resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==}
dev: true

View File

@@ -1,5 +1,5 @@
{ {
"name": "@alparr/eslint-config", "name": "@homarr/eslint-config",
"version": "0.2.0", "version": "0.2.0",
"private": true, "private": true,
"license": "MIT", "license": "MIT",
@@ -27,8 +27,8 @@
}, },
"devDependencies": { "devDependencies": {
"@types/eslint": "^8.44.7", "@types/eslint": "^8.44.7",
"@alparr/prettier-config": "workspace:^0.1.0", "@homarr/prettier-config": "workspace:^0.1.0",
"@alparr/tsconfig": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0",
"eslint": "^8.53.0", "eslint": "^8.53.0",
"typescript": "^5.3.3" "typescript": "^5.3.3"
}, },
@@ -38,5 +38,5 @@
"./base.js" "./base.js"
] ]
}, },
"prettier": "@alparr/prettier-config" "prettier": "@homarr/prettier-config"
} }

View File

@@ -1,5 +1,5 @@
{ {
"extends": "@alparr/tsconfig/base.json", "extends": "@homarr/tsconfig/base.json",
"compilerOptions": { "compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
}, },

View File

@@ -1,3 +1,3 @@
{ {
"name": "@alparr/github" "name": "@homarr/github"
} }

View File

@@ -9,7 +9,7 @@ const config = {
"^(next/(.*)$)|^(next$)", "^(next/(.*)$)|^(next$)",
"<THIRD_PARTY_MODULES>", "<THIRD_PARTY_MODULES>",
"", "",
"^@alparr/(.*)$", "^@homarr/(.*)$",
"", "",
"^~/", "^~/",
"^[../]", "^[../]",

View File

@@ -1,5 +1,5 @@
{ {
"name": "@alparr/prettier-config", "name": "@homarr/prettier-config",
"private": true, "private": true,
"version": "0.1.0", "version": "0.1.0",
"main": "index.mjs", "main": "index.mjs",
@@ -13,8 +13,8 @@
"prettier": "^3.1.0" "prettier": "^3.1.0"
}, },
"devDependencies": { "devDependencies": {
"@alparr/tsconfig": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0",
"typescript": "^5.3.3" "typescript": "^5.3.3"
}, },
"prettier": "@alparr/prettier-config" "prettier": "@homarr/prettier-config"
} }

View File

@@ -1,5 +1,5 @@
{ {
"extends": "@alparr/tsconfig/base.json", "extends": "@homarr/tsconfig/base.json",
"compilerOptions": { "compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
}, },

View File

@@ -1,5 +1,5 @@
{ {
"name": "@alparr/tsconfig", "name": "@homarr/tsconfig",
"private": true, "private": true,
"version": "0.1.0", "version": "0.1.0",
"files": [ "files": [

View File

@@ -10,13 +10,13 @@ interface PackageJson {
export default function generator(plop: PlopTypes.NodePlopAPI): void { export default function generator(plop: PlopTypes.NodePlopAPI): void {
plop.setGenerator("init", { plop.setGenerator("init", {
description: "Generate a new package for the alparr Monorepo", description: "Generate a new package for the homarr Monorepo",
prompts: [ prompts: [
{ {
type: "input", type: "input",
name: "name", name: "name",
message: message:
"What is the name of the package? (You can skip the `@alparr/` prefix)", "What is the name of the package? (You can skip the `@homarr/` prefix)",
}, },
{ {
type: "input", type: "input",
@@ -28,8 +28,8 @@ export default function generator(plop: PlopTypes.NodePlopAPI): void {
actions: [ actions: [
(answers) => { (answers) => {
if ("name" in answers && typeof answers.name === "string") { if ("name" in answers && typeof answers.name === "string") {
if (answers.name.startsWith("@alparr/")) { if (answers.name.startsWith("@homarr/")) {
answers.name = answers.name.replace("@alparr/", ""); answers.name = answers.name.replace("@homarr/", "");
} }
} }
return "Config sanitized"; return "Config sanitized";

View File

@@ -1,35 +1,35 @@
{ {
"name": "@alparr/{{ name }}", "name": "@homarr/{{name}}",
"private": true, "private": true,
"version": "0.1.0", "version": "0.1.0",
"exports": { "exports": {
".": "./index.ts" ".": "./index.ts"
}, },
"typesVersions": { "typesVersions": {
"*": { "*": {
"*": [ "*": [
"src/*" "src/*"
] ]
} }
}, },
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"clean": "rm -rf .turbo node_modules", "clean": "rm -rf .turbo node_modules",
"lint": "eslint .", "lint": "eslint .",
"format": "prettier --check . --ignore-path ../../.gitignore", "format": "prettier --check . --ignore-path ../../.gitignore",
"typecheck": "tsc --noEmit" "typecheck": "tsc --noEmit"
}, },
"devDependencies": { "devDependencies": {
"@alparr/eslint-config": "workspace:^0.2.0", "@homarr/eslint-config": "workspace:^0.2.0",
"@alparr/prettier-config": "workspace:^0.1.0", "@homarr/prettier-config": "workspace:^0.1.0",
"@alparr/tsconfig": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0",
"eslint": "^8.53.0", "eslint": "^8.53.0",
"typescript": "^5.3.3" "typescript": "^5.3.3"
}, },
"eslintConfig": { "eslintConfig": {
"extends": [ "extends": [
"@alparr/eslint-config/base" "@homarr/eslint-config/base"
] ]
}, },
"prettier": "@alparr/prettier-config" "prettier": "@homarr/prettier-config"
} }

View File

@@ -1,5 +1,5 @@
{ {
"extends": "@alparr/tsconfig/base.json", "extends": "@homarr/tsconfig/base.json",
"compilerOptions": { "compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
}, },