chore: adopt biome for linting and formatting, wire turbo env, add ci workflow
This commit is contained in:
53
.github/workflows/ci.yml
vendored
Normal file
53
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
# Prisma needs a connection string to generate the client; no database is
|
||||||
|
# contacted during lint, typecheck, test or build.
|
||||||
|
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/superlist?schema=public
|
||||||
|
BETTER_AUTH_SECRET: ci-only-secret-not-used-at-build-time
|
||||||
|
BETTER_AUTH_URL: http://localhost:4100
|
||||||
|
CORS_ORIGIN: http://localhost:7153
|
||||||
|
VITE_API_URL: http://localhost:4100
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
verify:
|
||||||
|
name: Verify
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: oven-sh/setup-bun@v2
|
||||||
|
with:
|
||||||
|
bun-version: 1.4.0
|
||||||
|
|
||||||
|
# The Prisma CLI runs on Node.
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Generate Prisma client
|
||||||
|
run: bun run db:generate
|
||||||
|
|
||||||
|
- name: Lint and format check
|
||||||
|
run: bun run lint:ci
|
||||||
|
|
||||||
|
- name: Typecheck
|
||||||
|
run: bun run typecheck
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: bun run test
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: bun run build
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
node_modules
|
|
||||||
dist
|
|
||||||
coverage
|
|
||||||
.turbo
|
|
||||||
bun.lock
|
|
||||||
bun.lockb
|
|
||||||
apps/web/src/routeTree.gen.ts
|
|
||||||
apps/api/src/generated
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"semi": false,
|
|
||||||
"singleQuote": true,
|
|
||||||
"trailingComma": "all",
|
|
||||||
"printWidth": 100,
|
|
||||||
"tabWidth": 2
|
|
||||||
}
|
|
||||||
19
AGENTS.md
19
AGENTS.md
@@ -25,12 +25,17 @@ No CI, no database migrations and no product features yet.
|
|||||||
- Verification commands, run from the repo root:
|
- Verification commands, run from the repo root:
|
||||||
- `bun run build`
|
- `bun run build`
|
||||||
- `bun run lint` → `bun run typecheck` → `bun run test` (in that order)
|
- `bun run lint` → `bun run typecheck` → `bun run test` (in that order)
|
||||||
- **Lint with Biome** (`biome.json` at the repo root, one config for every workspace): `bun run lint`
|
- **Biome is the only JS/TS tooling: linting, formatting and import sorting.** One `biome.json` at the repo
|
||||||
(per-package via turbo), `bun run lint:fix` (apply safe fixes), `bun run lint:ci` (whole repo, for CI).
|
root applies to every workspace.
|
||||||
- **Format with Prettier** (`bun run format`). Biome's formatter and assist are deliberately disabled in
|
- `bun run lint` → `biome check .` per package through turbo, so it also fails on formatting drift.
|
||||||
`biome.json` so the two tools never fight each other.
|
- `bun run lint:fix` → `biome check --write .` applies lint fixes, formatting and `organizeImports` across
|
||||||
- `apps/web/src/components/ui/**` is excluded from Biome's recommended preset through an `overrides` entry:
|
the whole repo.
|
||||||
those files are vendored shadcn/ui source and get regenerated by the CLI.
|
- `bun run lint:ci` → `biome ci .` is the whole-repo check used by CI.
|
||||||
|
- `bun run format` / `bun run format:check` are formatting-only.
|
||||||
|
- Markdown (`README.md`, `AGENTS.md`) is not covered: Biome does not format prose.
|
||||||
|
- `apps/web/src/components/ui/**` is excluded from Biome's recommended lint preset through an `overrides` entry:
|
||||||
|
those files are vendored shadcn/ui source regenerated by the CLI. They are still formatted.
|
||||||
|
- CI (`.github/workflows/ci.yml`) runs `db:generate` → `lint:ci` → `typecheck` → `test` → `build`.
|
||||||
- Generated files are gitignored and must never be edited by hand: `apps/web/src/routeTree.gen.ts`,
|
- Generated files are gitignored and must never be edited by hand: `apps/web/src/routeTree.gen.ts`,
|
||||||
`apps/api/src/generated/`.
|
`apps/api/src/generated/`.
|
||||||
|
|
||||||
@@ -126,7 +131,7 @@ apps/web/src/
|
|||||||
- `cn` comes from the `cn` package; `src/lib/utils.ts` re-exports it for local imports.
|
- `cn` comes from the `cn` package; `src/lib/utils.ts` re-exports it for local imports.
|
||||||
- Prefer small feature components over one large route file.
|
- Prefer small feature components over one large route file.
|
||||||
- Biome does not flag the `Route` export of route files, so route files stay clean; only the vendored
|
- Biome does not flag the `Route` export of route files, so route files stay clean; only the vendored
|
||||||
`components/ui` files are exempted from the recommended preset.
|
`components/ui` files are exempted from the recommended lint preset.
|
||||||
|
|
||||||
<!-- BEGIN:turborepo-agent-rules -->
|
<!-- BEGIN:turborepo-agent-rules -->
|
||||||
|
|
||||||
|
|||||||
15
README.md
15
README.md
@@ -32,7 +32,7 @@ cp apps/web/.env.example apps/web/.env
|
|||||||
Run everything in parallel:
|
Run everything in parallel:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bun run dev # turbo run dev → api on :3000, web on :5173
|
bun run dev # turbo run dev → api on :4100, web on :7153
|
||||||
```
|
```
|
||||||
|
|
||||||
Or a single workspace: `bun run dev --filter=@superlist/web`.
|
Or a single workspace: `bun run dev --filter=@superlist/web`.
|
||||||
@@ -41,18 +41,21 @@ Or a single workspace: `bun run dev --filter=@superlist/web`.
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
bun run build # turbo run build
|
bun run build # turbo run build
|
||||||
bun run lint # biome check (per package)
|
bun run lint # biome check per package (lint + format + import order)
|
||||||
bun run typecheck # tsc
|
bun run typecheck # tsc
|
||||||
bun run test # bun test (api) / vitest (web, shared)
|
bun run test # bun test (api) / vitest (web, shared)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
CI (`.github/workflows/ci.yml`) runs `db:generate` → `lint:ci` → `typecheck` → `test` → `build` on every push
|
||||||
|
to `main` and every pull request.
|
||||||
|
|
||||||
## Useful scripts
|
## Useful scripts
|
||||||
|
|
||||||
| Command | Effect |
|
| Command | Effect |
|
||||||
| --------------------- | ---------------------------------------------------------- |
|
| --------------------- | ------------------------------------------------------------------- |
|
||||||
| `bun run lint:fix` | Apply Biome's safe fixes across the repo |
|
| `bun run lint:fix` | Apply Biome fixes: lint, formatting and import sorting (whole repo) |
|
||||||
| `bun run lint:ci` | `biome ci` — lint the whole repo exactly as CI would |
|
| `bun run lint:ci` | `biome ci` — check the whole repo exactly as CI does |
|
||||||
| `bun run format` | Format the repo with Prettier |
|
| `bun run format` | Format with Biome (`format:check` to verify only) |
|
||||||
| `bun run db:generate` | Regenerate the Prisma client into `apps/api/src/generated` |
|
| `bun run db:generate` | Regenerate the Prisma client into `apps/api/src/generated` |
|
||||||
| `bun run db:migrate` | Create and apply a migration (development) |
|
| `bun run db:migrate` | Create and apply a migration (development) |
|
||||||
| `bun run db:studio` | Open Prisma Studio |
|
| `bun run db:studio` | Open Prisma Studio |
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { cors } from 'hono/cors'
|
|
||||||
import { Hono } from 'hono'
|
import { Hono } from 'hono'
|
||||||
|
import { cors } from 'hono/cors'
|
||||||
import { requestId } from 'hono/request-id'
|
import { requestId } from 'hono/request-id'
|
||||||
import { secureHeaders } from 'hono/secure-headers'
|
import { secureHeaders } from 'hono/secure-headers'
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ import { errorHandler, notFoundHandler } from '@/lib/problem-details'
|
|||||||
import { healthModule } from '@/modules/health'
|
import { healthModule } from '@/modules/health'
|
||||||
import type { AppEnv } from '@/types'
|
import type { AppEnv } from '@/types'
|
||||||
|
|
||||||
const allowedOrigins = (process.env.CORS_ORIGIN ?? 'http://localhost:5173')
|
const allowedOrigins = (process.env.CORS_ORIGIN ?? 'http://localhost:7153')
|
||||||
.split(',')
|
.split(',')
|
||||||
.map((origin) => origin.trim())
|
.map((origin) => origin.trim())
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { createApp } from '@/app'
|
import { createApp } from '@/app'
|
||||||
import { logger } from '@/lib/logger'
|
import { logger } from '@/lib/logger'
|
||||||
|
|
||||||
const port = Number(process.env.PORT ?? 3000)
|
const port = Number(process.env.PORT ?? 4100)
|
||||||
|
|
||||||
const app = createApp()
|
const app = createApp()
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { problem, problemTypes, type ProblemDetails } from '@superlist/shared'
|
import { type ProblemDetails, problem, problemTypes } from '@superlist/shared'
|
||||||
import type { Context } from 'hono'
|
import type { Context } from 'hono'
|
||||||
import { HTTPException } from 'hono/http-exception'
|
import { HTTPException } from 'hono/http-exception'
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { problem, type ProblemDetails, type Result } from '@superlist/shared'
|
import { type ProblemDetails, problem, type Result } from '@superlist/shared'
|
||||||
import type { Context } from 'hono'
|
import type { Context } from 'hono'
|
||||||
|
|
||||||
import { problemResponse } from '@/lib/problem-details'
|
import { problemResponse } from '@/lib/problem-details'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { zValidator, type Hook } from '@hono/zod-validator'
|
import { type Hook, zValidator } from '@hono/zod-validator'
|
||||||
import { problems, type FieldErrors } from '@superlist/shared'
|
import { type FieldErrors, problems } from '@superlist/shared'
|
||||||
import type { Context, Env, ValidationTargets } from 'hono'
|
import type { Context, Env, ValidationTargets } from 'hono'
|
||||||
import type { ZodError, ZodType } from 'zod'
|
import type { ZodError, ZodType } from 'zod'
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Ok, type Result, type ProblemDetails } from '@superlist/shared'
|
import { Ok, type ProblemDetails, type Result } from '@superlist/shared'
|
||||||
|
|
||||||
export type HealthStatus = {
|
export type HealthStatus = {
|
||||||
status: 'ok'
|
status: 'ok'
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import { useRouterState } from '@tanstack/react-router'
|
import { useRouterState } from '@tanstack/react-router'
|
||||||
import { SearchIcon } from 'lucide-react'
|
import { SearchIcon } from 'lucide-react'
|
||||||
|
import { ThemeToggle } from '@/components/theme-toggle'
|
||||||
import { Separator } from '@/components/ui/separator'
|
import { Separator } from '@/components/ui/separator'
|
||||||
import { SidebarTrigger } from '@/components/ui/sidebar'
|
import { SidebarTrigger } from '@/components/ui/sidebar'
|
||||||
import { ThemeToggle } from '@/components/theme-toggle'
|
|
||||||
|
|
||||||
function usePageTitle() {
|
function usePageTitle() {
|
||||||
const pathname = useRouterState({ select: (state) => state.location.pathname })
|
const pathname = useRouterState({ select: (state) => state.location.pathname })
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Link, useRouterState } from '@tanstack/react-router'
|
import { Link, useRouterState } from '@tanstack/react-router'
|
||||||
import { LayoutDashboardIcon, ListTodoIcon, SettingsIcon } from 'lucide-react'
|
|
||||||
import type { LucideIcon } from 'lucide-react'
|
import type { LucideIcon } from 'lucide-react'
|
||||||
|
import { LayoutDashboardIcon, ListTodoIcon, SettingsIcon } from 'lucide-react'
|
||||||
|
|
||||||
import { NavUser } from '@/components/layout/nav-user'
|
import { NavUser } from '@/components/layout/nav-user'
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as React from 'react'
|
|
||||||
import { cva, type VariantProps } from 'class-variance-authority'
|
import { cva, type VariantProps } from 'class-variance-authority'
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
|
import * as React from 'react'
|
||||||
|
|
||||||
const alertVariants = cva(
|
const alertVariants = cva(
|
||||||
"group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
|
"group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
|
||||||
@@ -65,4 +65,4 @@ function AlertAction({ className, ...props }: React.ComponentProps<'div'>) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Alert, AlertTitle, AlertDescription, AlertAction }
|
export { Alert, AlertAction, AlertDescription, AlertTitle }
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as React from 'react'
|
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
import { Avatar as AvatarPrimitive } from 'radix-ui'
|
import { Avatar as AvatarPrimitive } from 'radix-ui'
|
||||||
|
import * as React from 'react'
|
||||||
|
|
||||||
function Avatar({
|
function Avatar({
|
||||||
className,
|
className,
|
||||||
@@ -90,4 +90,4 @@ function AvatarGroupCount({ className, ...props }: React.ComponentProps<'div'>)
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarBadge }
|
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage }
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import * as React from 'react'
|
|
||||||
import { cva, type VariantProps } from 'class-variance-authority'
|
import { cva, type VariantProps } from 'class-variance-authority'
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
import { Slot } from 'radix-ui'
|
import { Slot } from 'radix-ui'
|
||||||
|
import * as React from 'react'
|
||||||
|
|
||||||
const badgeVariants = cva(
|
const badgeVariants = cva(
|
||||||
'group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!',
|
'group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!',
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import * as React from 'react'
|
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
import { Slot } from 'radix-ui'
|
|
||||||
import { ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react'
|
import { ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react'
|
||||||
|
import { Slot } from 'radix-ui'
|
||||||
|
import * as React from 'react'
|
||||||
|
|
||||||
function Breadcrumb({ className, ...props }: React.ComponentProps<'nav'>) {
|
function Breadcrumb({ className, ...props }: React.ComponentProps<'nav'>) {
|
||||||
return <nav aria-label="breadcrumb" data-slot="breadcrumb" className={cn(className)} {...props} />
|
return <nav aria-label="breadcrumb" data-slot="breadcrumb" className={cn(className)} {...props} />
|
||||||
@@ -92,10 +92,10 @@ function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'
|
|||||||
|
|
||||||
export {
|
export {
|
||||||
Breadcrumb,
|
Breadcrumb,
|
||||||
BreadcrumbList,
|
BreadcrumbEllipsis,
|
||||||
BreadcrumbItem,
|
BreadcrumbItem,
|
||||||
BreadcrumbLink,
|
BreadcrumbLink,
|
||||||
|
BreadcrumbList,
|
||||||
BreadcrumbPage,
|
BreadcrumbPage,
|
||||||
BreadcrumbSeparator,
|
BreadcrumbSeparator,
|
||||||
BreadcrumbEllipsis,
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import * as React from 'react'
|
|
||||||
import { cva, type VariantProps } from 'class-variance-authority'
|
import { cva, type VariantProps } from 'class-variance-authority'
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
import { Slot } from 'radix-ui'
|
import { Slot } from 'radix-ui'
|
||||||
|
import * as React from 'react'
|
||||||
|
|
||||||
const buttonVariants = cva(
|
const buttonVariants = cva(
|
||||||
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as React from 'react'
|
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
|
import * as React from 'react'
|
||||||
|
|
||||||
function Card({
|
function Card({
|
||||||
className,
|
className,
|
||||||
@@ -84,4 +84,4 @@ function CardFooter({ className, ...props }: React.ComponentProps<'div'>) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent }
|
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle }
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import * as React from 'react'
|
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
import { Checkbox as CheckboxPrimitive } from 'radix-ui'
|
|
||||||
import { CheckIcon } from 'lucide-react'
|
import { CheckIcon } from 'lucide-react'
|
||||||
|
import { Checkbox as CheckboxPrimitive } from 'radix-ui'
|
||||||
|
import * as React from 'react'
|
||||||
|
|
||||||
function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
|
function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import * as React from 'react'
|
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
import { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui'
|
|
||||||
import { CheckIcon, ChevronRightIcon } from 'lucide-react'
|
import { CheckIcon, ChevronRightIcon } from 'lucide-react'
|
||||||
|
import { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui'
|
||||||
|
import * as React from 'react'
|
||||||
|
|
||||||
function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
||||||
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />
|
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />
|
||||||
@@ -232,18 +232,18 @@ function DropdownMenuSubContent({
|
|||||||
|
|
||||||
export {
|
export {
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
DropdownMenuPortal,
|
DropdownMenuCheckboxItem,
|
||||||
DropdownMenuTrigger,
|
|
||||||
DropdownMenuContent,
|
DropdownMenuContent,
|
||||||
DropdownMenuGroup,
|
DropdownMenuGroup,
|
||||||
DropdownMenuLabel,
|
|
||||||
DropdownMenuItem,
|
DropdownMenuItem,
|
||||||
DropdownMenuCheckboxItem,
|
DropdownMenuLabel,
|
||||||
|
DropdownMenuPortal,
|
||||||
DropdownMenuRadioGroup,
|
DropdownMenuRadioGroup,
|
||||||
DropdownMenuRadioItem,
|
DropdownMenuRadioItem,
|
||||||
DropdownMenuSeparator,
|
DropdownMenuSeparator,
|
||||||
DropdownMenuShortcut,
|
DropdownMenuShortcut,
|
||||||
DropdownMenuSub,
|
DropdownMenuSub,
|
||||||
DropdownMenuSubTrigger,
|
|
||||||
DropdownMenuSubContent,
|
DropdownMenuSubContent,
|
||||||
|
DropdownMenuSubTrigger,
|
||||||
|
DropdownMenuTrigger,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useMemo } from 'react'
|
|
||||||
import { cva, type VariantProps } from 'class-variance-authority'
|
import { cva, type VariantProps } from 'class-variance-authority'
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
|
import { useMemo } from 'react'
|
||||||
|
|
||||||
import { Label } from '@/components/ui/label'
|
import { Label } from '@/components/ui/label'
|
||||||
import { Separator } from '@/components/ui/separator'
|
import { Separator } from '@/components/ui/separator'
|
||||||
@@ -210,13 +210,13 @@ function FieldError({
|
|||||||
|
|
||||||
export {
|
export {
|
||||||
Field,
|
Field,
|
||||||
FieldLabel,
|
FieldContent,
|
||||||
FieldDescription,
|
FieldDescription,
|
||||||
FieldError,
|
FieldError,
|
||||||
FieldGroup,
|
FieldGroup,
|
||||||
|
FieldLabel,
|
||||||
FieldLegend,
|
FieldLegend,
|
||||||
FieldSeparator,
|
FieldSeparator,
|
||||||
FieldSet,
|
FieldSet,
|
||||||
FieldContent,
|
|
||||||
FieldTitle,
|
FieldTitle,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as React from 'react'
|
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
|
import * as React from 'react'
|
||||||
|
|
||||||
function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
|
function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as React from 'react'
|
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
import { Label as LabelPrimitive } from 'radix-ui'
|
import { Label as LabelPrimitive } from 'radix-ui'
|
||||||
|
import * as React from 'react'
|
||||||
|
|
||||||
function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {
|
function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import * as React from 'react'
|
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react'
|
||||||
import { Select as SelectPrimitive } from 'radix-ui'
|
import { Select as SelectPrimitive } from 'radix-ui'
|
||||||
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from 'lucide-react'
|
import * as React from 'react'
|
||||||
|
|
||||||
function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {
|
function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {
|
||||||
return <SelectPrimitive.Root data-slot="select" {...props} />
|
return <SelectPrimitive.Root data-slot="select" {...props} />
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import * as React from 'react'
|
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
import { Separator as SeparatorPrimitive } from 'radix-ui'
|
import { Separator as SeparatorPrimitive } from 'radix-ui'
|
||||||
|
import * as React from 'react'
|
||||||
|
|
||||||
function Separator({
|
function Separator({
|
||||||
className,
|
className,
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import * as React from 'react'
|
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
import { Dialog as SheetPrimitive } from 'radix-ui'
|
|
||||||
|
|
||||||
import { Button } from '@/components/ui/button'
|
|
||||||
import { XIcon } from 'lucide-react'
|
import { XIcon } from 'lucide-react'
|
||||||
|
import { Dialog as SheetPrimitive } from 'radix-ui'
|
||||||
|
import * as React from 'react'
|
||||||
|
import { Button } from '@/components/ui/button'
|
||||||
|
|
||||||
function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
|
function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
|
||||||
return <SheetPrimitive.Root data-slot="sheet" {...props} />
|
return <SheetPrimitive.Root data-slot="sheet" {...props} />
|
||||||
@@ -120,11 +119,11 @@ function SheetDescription({
|
|||||||
|
|
||||||
export {
|
export {
|
||||||
Sheet,
|
Sheet,
|
||||||
SheetTrigger,
|
|
||||||
SheetClose,
|
SheetClose,
|
||||||
SheetContent,
|
SheetContent,
|
||||||
SheetHeader,
|
|
||||||
SheetFooter,
|
|
||||||
SheetTitle,
|
|
||||||
SheetDescription,
|
SheetDescription,
|
||||||
|
SheetFooter,
|
||||||
|
SheetHeader,
|
||||||
|
SheetTitle,
|
||||||
|
SheetTrigger,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import * as React from 'react'
|
|
||||||
import { cva, type VariantProps } from 'class-variance-authority'
|
import { cva, type VariantProps } from 'class-variance-authority'
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
|
import { PanelLeftIcon } from 'lucide-react'
|
||||||
import { Slot } from 'radix-ui'
|
import { Slot } from 'radix-ui'
|
||||||
|
import * as React from 'react'
|
||||||
import { useIsMobile } from '@/hooks/use-mobile'
|
|
||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
import { Input } from '@/components/ui/input'
|
import { Input } from '@/components/ui/input'
|
||||||
import { Separator } from '@/components/ui/separator'
|
import { Separator } from '@/components/ui/separator'
|
||||||
@@ -16,7 +15,7 @@ import {
|
|||||||
} from '@/components/ui/sheet'
|
} from '@/components/ui/sheet'
|
||||||
import { Skeleton } from '@/components/ui/skeleton'
|
import { Skeleton } from '@/components/ui/skeleton'
|
||||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
|
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
|
||||||
import { PanelLeftIcon } from 'lucide-react'
|
import { useIsMobile } from '@/hooks/use-mobile'
|
||||||
|
|
||||||
const SIDEBAR_COOKIE_NAME = 'sidebar_state'
|
const SIDEBAR_COOKIE_NAME = 'sidebar_state'
|
||||||
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7
|
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { useTheme } from 'next-themes'
|
|
||||||
import { Toaster as Sonner, type ToasterProps } from 'sonner'
|
|
||||||
import {
|
import {
|
||||||
CircleCheckIcon,
|
CircleCheckIcon,
|
||||||
InfoIcon,
|
InfoIcon,
|
||||||
TriangleAlertIcon,
|
|
||||||
OctagonXIcon,
|
|
||||||
Loader2Icon,
|
Loader2Icon,
|
||||||
|
OctagonXIcon,
|
||||||
|
TriangleAlertIcon,
|
||||||
} from 'lucide-react'
|
} from 'lucide-react'
|
||||||
|
import { useTheme } from 'next-themes'
|
||||||
|
import { Toaster as Sonner, type ToasterProps } from 'sonner'
|
||||||
|
|
||||||
const Toaster = ({ ...props }: ToasterProps) => {
|
const Toaster = ({ ...props }: ToasterProps) => {
|
||||||
const { theme = 'system' } = useTheme()
|
const { theme = 'system' } = useTheme()
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import * as React from 'react'
|
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
import { Switch as SwitchPrimitive } from 'radix-ui'
|
import { Switch as SwitchPrimitive } from 'radix-ui'
|
||||||
|
import * as React from 'react'
|
||||||
|
|
||||||
function Switch({
|
function Switch({
|
||||||
className,
|
className,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import * as React from 'react'
|
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
|
import * as React from 'react'
|
||||||
|
|
||||||
function Table({ className, ...props }: React.ComponentProps<'table'>) {
|
function Table({ className, ...props }: React.ComponentProps<'table'>) {
|
||||||
return (
|
return (
|
||||||
@@ -85,4 +85,4 @@ function TableCaption({ className, ...props }: React.ComponentProps<'caption'>)
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption }
|
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow }
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import * as React from 'react'
|
|
||||||
import { cva, type VariantProps } from 'class-variance-authority'
|
import { cva, type VariantProps } from 'class-variance-authority'
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
import { Tabs as TabsPrimitive } from 'radix-ui'
|
import { Tabs as TabsPrimitive } from 'radix-ui'
|
||||||
|
import * as React from 'react'
|
||||||
|
|
||||||
function Tabs({
|
function Tabs({
|
||||||
className,
|
className,
|
||||||
@@ -74,4 +74,4 @@ function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPr
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants }
|
export { Tabs, TabsContent, TabsList, TabsTrigger, tabsListVariants }
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as React from 'react'
|
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
|
import * as React from 'react'
|
||||||
|
|
||||||
function Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {
|
function Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as React from 'react'
|
|
||||||
import { cn } from 'cn'
|
import { cn } from 'cn'
|
||||||
import { Tooltip as TooltipPrimitive } from 'radix-ui'
|
import { Tooltip as TooltipPrimitive } from 'radix-ui'
|
||||||
|
import * as React from 'react'
|
||||||
|
|
||||||
function TooltipProvider({
|
function TooltipProvider({
|
||||||
delayDuration = 0,
|
delayDuration = 0,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { createAuthClient } from 'better-auth/react'
|
|||||||
* BetterAuth under `/api/auth/*`.
|
* BetterAuth under `/api/auth/*`.
|
||||||
*/
|
*/
|
||||||
export const authClient = createAuthClient({
|
export const authClient = createAuthClient({
|
||||||
baseURL: import.meta.env.VITE_API_URL ?? 'http://localhost:3000',
|
baseURL: import.meta.env.VITE_API_URL ?? 'http://localhost:4100',
|
||||||
})
|
})
|
||||||
|
|
||||||
export const { signIn, signUp, signOut, useSession } = authClient
|
export const { signIn, signUp, signOut, useSession } = authClient
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { createColumnHelper, tableFeatures, useTable } from '@tanstack/react-table'
|
|
||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from '@tanstack/react-router'
|
||||||
|
import { createColumnHelper, tableFeatures, useTable } from '@tanstack/react-table'
|
||||||
import { SearchIcon } from 'lucide-react'
|
import { SearchIcon } from 'lucide-react'
|
||||||
import { useMemo, useState } from 'react'
|
import { useMemo, useState } from 'react'
|
||||||
|
|
||||||
|
|||||||
24
biome.json
24
biome.json
@@ -16,10 +16,30 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"formatter": {
|
"formatter": {
|
||||||
"enabled": false
|
"enabled": true,
|
||||||
|
"indentStyle": "space",
|
||||||
|
"indentWidth": 2,
|
||||||
|
"lineWidth": 100,
|
||||||
|
"lineEnding": "lf"
|
||||||
|
},
|
||||||
|
"javascript": {
|
||||||
|
"formatter": {
|
||||||
|
"quoteStyle": "single",
|
||||||
|
"jsxQuoteStyle": "double",
|
||||||
|
"quoteProperties": "asNeeded",
|
||||||
|
"semicolons": "asNeeded",
|
||||||
|
"trailingCommas": "all",
|
||||||
|
"arrowParentheses": "always",
|
||||||
|
"bracketSpacing": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"assist": {
|
"assist": {
|
||||||
"enabled": false
|
"enabled": true,
|
||||||
|
"actions": {
|
||||||
|
"source": {
|
||||||
|
"organizeImports": "on"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"linter": {
|
"linter": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
"lint": "turbo run lint",
|
"lint": "turbo run lint",
|
||||||
"typecheck": "turbo run typecheck",
|
"typecheck": "turbo run typecheck",
|
||||||
"test": "turbo run test",
|
"test": "turbo run test",
|
||||||
"format": "prettier --write \"**/*.{ts,tsx,json,md}\"",
|
"format": "biome format --write .",
|
||||||
"format:check": "prettier --check \"**/*.{ts,tsx,json,md}\"",
|
"format:check": "biome format .",
|
||||||
"db:migrate": "turbo run db:migrate --filter=@superlist/api",
|
"db:migrate": "turbo run db:migrate --filter=@superlist/api",
|
||||||
"db:generate": "turbo run db:generate --filter=@superlist/api",
|
"db:generate": "turbo run db:generate --filter=@superlist/api",
|
||||||
"db:studio": "turbo run db:studio --filter=@superlist/api",
|
"db:studio": "turbo run db:studio --filter=@superlist/api",
|
||||||
@@ -22,7 +22,6 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "^2.5.15",
|
"@biomejs/biome": "^2.5.15",
|
||||||
"prettier": "^3.9.10",
|
|
||||||
"turbo": "^2.11.7",
|
"turbo": "^2.11.7",
|
||||||
"typescript": "~6.0.2"
|
"typescript": "~6.0.2"
|
||||||
},
|
},
|
||||||
|
|||||||
23
turbo.json
23
turbo.json
@@ -8,20 +8,33 @@
|
|||||||
},
|
},
|
||||||
"lint": {},
|
"lint": {},
|
||||||
"typecheck": {},
|
"typecheck": {},
|
||||||
"test": {},
|
"test": {
|
||||||
|
"env": ["NODE_ENV", "DATABASE_URL", "BETTER_AUTH_SECRET", "BETTER_AUTH_URL", "CORS_ORIGIN"]
|
||||||
|
},
|
||||||
"dev": {
|
"dev": {
|
||||||
"cache": false,
|
"cache": false,
|
||||||
"persistent": true
|
"persistent": true,
|
||||||
|
"passThroughEnv": [
|
||||||
|
"DATABASE_URL",
|
||||||
|
"PORT",
|
||||||
|
"CORS_ORIGIN",
|
||||||
|
"BETTER_AUTH_SECRET",
|
||||||
|
"BETTER_AUTH_URL",
|
||||||
|
"NODE_ENV"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"db:generate": {
|
"db:generate": {
|
||||||
"cache": false
|
"cache": false,
|
||||||
|
"env": ["DATABASE_URL"]
|
||||||
},
|
},
|
||||||
"db:migrate": {
|
"db:migrate": {
|
||||||
"cache": false
|
"cache": false,
|
||||||
|
"env": ["DATABASE_URL"]
|
||||||
},
|
},
|
||||||
"db:studio": {
|
"db:studio": {
|
||||||
"cache": false,
|
"cache": false,
|
||||||
"persistent": true
|
"persistent": true,
|
||||||
|
"env": ["DATABASE_URL"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user