diff --git a/.prettierrc b/.prettierrc index 0dee46f..0c0f6cf 100644 --- a/.prettierrc +++ b/.prettierrc @@ -4,7 +4,6 @@ "semi": false, "trailingComma": "all", "printWidth": 80, - "plugins": ["prettier-plugin-svelte"], - "pluginSearchDirs": ["."], + "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] } diff --git a/bun.lockb b/bun.lockb index 17d64a1..323779a 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/components.json b/components.json index ad1c19c..c94fa9f 100644 --- a/components.json +++ b/components.json @@ -1,13 +1,13 @@ { - "$schema": "https://shadcn-svelte.com/schema.json", - "style": "default", - "tailwind": { - "config": "tailwind.config.js", - "css": "src/app.postcss", - "baseColor": "zinc" - }, - "aliases": { - "components": "$lib/components", - "utils": "$lib/utils" - } -} \ No newline at end of file + "$schema": "https://shadcn-svelte.com/schema.json", + "style": "default", + "tailwind": { + "config": "tailwind.config.js", + "css": "src/app.postcss", + "baseColor": "zinc" + }, + "aliases": { + "components": "$lib/components", + "utils": "$lib/utils" + } +} diff --git a/drizzle.config.ts b/drizzle.config.ts index bd01fe9..9a8ed6c 100644 --- a/drizzle.config.ts +++ b/drizzle.config.ts @@ -1,5 +1,5 @@ // drizzle.config.ts -import type { Config } from 'drizzle-kit'; +import type { Config } from 'drizzle-kit' export default { schema: './src/lib/db/schema.ts', @@ -12,4 +12,4 @@ export default { port: 5432, database: 'link-shortener', }, -} satisfies Config; +} satisfies Config diff --git a/drizzle/meta/0000_snapshot.json b/drizzle/meta/0000_snapshot.json index 9fc7a76..5c46db6 100644 --- a/drizzle/meta/0000_snapshot.json +++ b/drizzle/meta/0000_snapshot.json @@ -1,175 +1,173 @@ { - "id": "9d44b46b-3e93-4782-8750-dbf39513bb0c", - "prevId": "00000000-0000-0000-0000-000000000000", - "version": "5", - "dialect": "pg", - "tables": { - "session": { - "name": "session", - "schema": "", - "columns": { - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "shortener": { - "name": "shortener", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "link": { - "name": "link", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "code": { - "name": "code", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "user": { - "name": "user", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "uuid": { - "name": "uuid", - "type": "uuid", - "primaryKey": false, - "notNull": false, - "default": "gen_random_uuid()" - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "username": { - "name": "username", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "password": { - "name": "password", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "user_email_unique": { - "name": "user_email_unique", - "nullsNotDistinct": false, - "columns": [ - "email" - ] - } - } - }, - "visitor": { - "name": "visitor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "shortener_id": { - "name": "shortener_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "country_code": { - "name": "country_code", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "country": { - "name": "country", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file + "id": "9d44b46b-3e93-4782-8750-dbf39513bb0c", + "prevId": "00000000-0000-0000-0000-000000000000", + "version": "5", + "dialect": "pg", + "tables": { + "session": { + "name": "session", + "schema": "", + "columns": { + "token": { + "name": "token", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "expires": { + "name": "expires", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "shortener": { + "name": "shortener", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "link": { + "name": "link", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "user": { + "name": "user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "uuid": { + "name": "uuid", + "type": "uuid", + "primaryKey": false, + "notNull": false, + "default": "gen_random_uuid()" + }, + "email": { + "name": "email", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "username": { + "name": "username", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "password": { + "name": "password", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "user_email_unique": { + "name": "user_email_unique", + "nullsNotDistinct": false, + "columns": ["email"] + } + } + }, + "visitor": { + "name": "visitor", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "shortener_id": { + "name": "shortener_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "country_code": { + "name": "country_code", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "country": { + "name": "country", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": {}, + "schemas": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + } +} diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index f422b61..90caabf 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -1,13 +1,13 @@ { - "version": "5", - "dialect": "pg", - "entries": [ - { - "idx": 0, - "version": "5", - "when": 1699851315914, - "tag": "0000_nebulous_energizer", - "breakpoints": true - } - ] -} \ No newline at end of file + "version": "5", + "dialect": "pg", + "entries": [ + { + "idx": 0, + "version": "5", + "when": 1699851315914, + "tag": "0000_nebulous_energizer", + "breakpoints": true + } + ] +} diff --git a/package.json b/package.json index ea9b4ec..79710dc 100644 --- a/package.json +++ b/package.json @@ -1,46 +1,47 @@ { - "name": "link-shortener-svelte", - "version": "0.0.1", - "private": true, - "scripts": { - "dev": "vite dev", - "build": "vite build", - "preview": "vite preview", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "lint": "prettier --plugin-search-dir . --check .", - "format": "prettier --plugin-search-dir . --write ." - }, - "devDependencies": { - "@sveltejs/kit": "^1.20.4", - "autoprefixer": "^10.4.14", - "bun-types": "^1.0.11", - "drizzle-kit": "^0.20.1", - "postcss": "^8.4.24", - "postcss-load-config": "^4.0.1", - "prettier": "^2.8.0", - "prettier-plugin-svelte": "^2.10.1", - "svelte": "^4.0.5", - "svelte-adapter-bun": "^0.5.1", - "svelte-check": "^3.4.3", - "tailwindcss": "^3.3.2", - "tslib": "^2.4.1", - "typescript": "^5.0.0", - "vite": "^4.4.2" - }, - "type": "module", - "dependencies": { - "bits-ui": "^0.9.4", - "clsx": "^2.0.0", - "drizzle-orm": "^0.29.0", - "formsnap": "^0.4.1", - "lucide-svelte": "^0.292.0", - "mode-watcher": "^0.0.7", - "nanoid": "^5.0.3", - "postgres": "^3.4.3", - "sveltekit-superforms": "^1.10.1", - "tailwind-merge": "^2.0.0", - "tailwind-variants": "^0.1.18", - "zod": "^3.22.4" - } + "name": "link-shortener-svelte", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "lint": "prettier --plugin-search-dir . --check .", + "format": "prettier --write ." + }, + "devDependencies": { + "@sveltejs/kit": "^1.20.4", + "autoprefixer": "^10.4.14", + "bun-types": "^1.0.11", + "drizzle-kit": "^0.20.1", + "postcss": "^8.4.24", + "postcss-load-config": "^4.0.1", + "prettier": "^3.1.0", + "prettier-plugin-svelte": "^3.1.0", + "prettier-plugin-tailwindcss": "^0.5.7", + "svelte": "^4.0.5", + "svelte-adapter-bun": "^0.5.1", + "svelte-check": "^3.4.3", + "tailwindcss": "^3.3.2", + "tslib": "^2.4.1", + "typescript": "^5.0.0", + "vite": "^4.4.2" + }, + "type": "module", + "dependencies": { + "bits-ui": "^0.9.4", + "clsx": "^2.0.0", + "drizzle-orm": "^0.29.0", + "formsnap": "^0.4.1", + "lucide-svelte": "^0.292.0", + "mode-watcher": "^0.0.7", + "nanoid": "^5.0.3", + "postgres": "^3.4.3", + "sveltekit-superforms": "^1.10.1", + "tailwind-merge": "^2.0.0", + "tailwind-variants": "^0.1.18", + "zod": "^3.22.4" + } } diff --git a/postcss.config.cjs b/postcss.config.cjs index fe10e55..3794468 100644 --- a/postcss.config.cjs +++ b/postcss.config.cjs @@ -1,13 +1,13 @@ -const tailwindcss = require('tailwindcss'); -const autoprefixer = require('autoprefixer'); +const tailwindcss = require('tailwindcss') +const autoprefixer = require('autoprefixer') const config = { plugins: [ //Some plugins, like tailwindcss/nesting, need to run before Tailwind, tailwindcss(), //But others, like autoprefixer, need to run after, - autoprefixer - ] -}; + autoprefixer, + ], +} -module.exports = config; +module.exports = config diff --git a/src/app.html b/src/app.html index 6769ed5..77a5ff5 100644 --- a/src/app.html +++ b/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/src/lib/components/sidebar.svelte b/src/lib/components/sidebar.svelte index a1cae6a..3161c18 100644 --- a/src/lib/components/sidebar.svelte +++ b/src/lib/components/sidebar.svelte @@ -9,9 +9,9 @@ import { goto } from '$app/navigation' -
+
-
+
Shortener
@@ -19,11 +19,11 @@
Projects
-
+
- + diff --git a/src/lib/components/ui/avatar/avatar-fallback.svelte b/src/lib/components/ui/avatar/avatar-fallback.svelte index 3b9b24c..58d0365 100644 --- a/src/lib/components/ui/avatar/avatar-fallback.svelte +++ b/src/lib/components/ui/avatar/avatar-fallback.svelte @@ -1,17 +1,17 @@ diff --git a/src/lib/components/ui/avatar/avatar-image.svelte b/src/lib/components/ui/avatar/avatar-image.svelte index 27b0e7d..295f023 100644 --- a/src/lib/components/ui/avatar/avatar-image.svelte +++ b/src/lib/components/ui/avatar/avatar-image.svelte @@ -1,18 +1,18 @@ diff --git a/src/lib/components/ui/avatar/avatar.svelte b/src/lib/components/ui/avatar/avatar.svelte index b8a6ee1..de61f50 100644 --- a/src/lib/components/ui/avatar/avatar.svelte +++ b/src/lib/components/ui/avatar/avatar.svelte @@ -1,19 +1,19 @@ diff --git a/src/lib/components/ui/avatar/index.ts b/src/lib/components/ui/avatar/index.ts index b08c780..50689f1 100644 --- a/src/lib/components/ui/avatar/index.ts +++ b/src/lib/components/ui/avatar/index.ts @@ -1,6 +1,6 @@ -import Root from "./avatar.svelte"; -import Image from "./avatar-image.svelte"; -import Fallback from "./avatar-fallback.svelte"; +import Root from './avatar.svelte' +import Image from './avatar-image.svelte' +import Fallback from './avatar-fallback.svelte' export { Root, @@ -9,5 +9,5 @@ export { // Root as Avatar, Image as AvatarImage, - Fallback as AvatarFallback -}; + Fallback as AvatarFallback, +} diff --git a/src/lib/components/ui/checkbox/checkbox.svelte b/src/lib/components/ui/checkbox/checkbox.svelte index 253ae5c..8ab2876 100644 --- a/src/lib/components/ui/checkbox/checkbox.svelte +++ b/src/lib/components/ui/checkbox/checkbox.svelte @@ -13,7 +13,7 @@ diff --git a/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte b/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte index aae09c6..c9216e7 100644 --- a/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +++ b/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte @@ -14,7 +14,7 @@ - import { Separator as SeparatorPrimitive } from "bits-ui"; - import { cn } from "$lib/utils"; + import { Separator as SeparatorPrimitive } from 'bits-ui' + import { cn } from '$lib/utils' - type $$Props = SeparatorPrimitive.Props; + type $$Props = SeparatorPrimitive.Props - let className: $$Props["class"] = undefined; - export let orientation: $$Props["orientation"] = "horizontal"; - export let decorative: $$Props["decorative"] = undefined; - export { className as class }; + let className: $$Props['class'] = undefined + export let orientation: $$Props['orientation'] = 'horizontal' + export let decorative: $$Props['decorative'] = undefined + export { className as class } -
+
diff --git a/src/routes/(app)/[...catchall]/+page.svelte b/src/routes/(app)/[...catchall]/+page.svelte index 715d424..6cd30bf 100644 --- a/src/routes/(app)/[...catchall]/+page.svelte +++ b/src/routes/(app)/[...catchall]/+page.svelte @@ -3,9 +3,9 @@ import Button from '$lib/components/ui/button/button.svelte' -
-
-
+
+
+
404
Page Not Found
diff --git a/src/routes/(auth)/login/+page.svelte b/src/routes/(auth)/login/+page.svelte index e278ee9..4d2ca85 100644 --- a/src/routes/(auth)/login/+page.svelte +++ b/src/routes/(auth)/login/+page.svelte @@ -16,7 +16,7 @@ class="relative hidden h-full flex-col bg-primary-foreground p-10 text-white dark:border-r lg:flex" >
Shortener
diff --git a/src/routes/(auth)/signup/+page.svelte b/src/routes/(auth)/signup/+page.svelte index e1ec575..8102108 100644 --- a/src/routes/(auth)/signup/+page.svelte +++ b/src/routes/(auth)/signup/+page.svelte @@ -13,10 +13,10 @@