Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = tab
indent_size = 1
tab_width = 2
insert_final_newline = true
max_line_length = 100
trim_trailing_whitespace = true

[*.json]
indent_style = space

[*.{yaml,yml}]
indent_style = space
27 changes: 27 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# yaml-language-server: $schema=https://json.schemastore.org/dependabot-2.0.json

# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

# It's suppose to work with bun
# https://github.com/dependabot/dependabot-core/issues/6528

version: 2

updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
commit-message:
prefix: ci

- package-ecosystem: npm # See documentation for possible values
directories:
- /
commit-message:
prefix: deps
schedule:
interval: weekly
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: CI

on:
pull_request:
branches: [ main ]
push:
branches: [ main ]

jobs:
lint-format:
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# https://biomejs.dev/recipes/continuous-integration/#github-actions
- name: Lint with Biome
uses: biomejs/setup-biome@c016c38f26f2c4a6eb3662679143614a254263fd # v2.3.0
with:
version: latest
- name: Run Biome
run: biome ci .
2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

36 changes: 18 additions & 18 deletions apps/web/components.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "",
"css": "src/app/globals.css",
"baseColor": "neutral",
"cssVariables": true
},
"iconLibrary": "lucide",
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"hooks": "@/hooks",
"lib": "@/lib",
"ui": "@/components/ui"
}
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "",
"css": "src/app/globals.css",
"baseColor": "neutral",
"cssVariables": true
},
"iconLibrary": "lucide",
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"hooks": "@/hooks",
"lib": "@/lib",
"ui": "@/components/ui"
}
}
4 changes: 0 additions & 4 deletions apps/web/eslint.config.mjs

This file was deleted.

4 changes: 3 additions & 1 deletion apps/web/next.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
/* config options here */
eslint: {
ignoreDuringBuilds: true,
},
};

export default nextConfig;
81 changes: 38 additions & 43 deletions apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,40 @@
{
"name": "@repo/web",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --turbopack --port 3000",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@radix-ui/react-label": "^2.1.6",
"@radix-ui/react-slot": "^1.2.2",
"@repo/api": "workspace:*",
"@repo/auth": "workspace:*",
"@repo/env": "workspace:*",
"@tanstack/react-query": "^5.76.1",
"@trpc/client": "^11.1.2",
"@trpc/server": "^11.1.2",
"@trpc/tanstack-react-query": "^11.1.2",
"better-auth": "^1.2.8",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.511.0",
"next": "15.3.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"superjson": "^2.2.2",
"tailwind-merge": "^3.3.0",
"tw-animate-css": "^1.3.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@tailwindcss/postcss": "^4",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"eslint": "^9",
"eslint-config-next": "15.3.2",
"tailwindcss": "^4",
"typescript": "^5"
}
"name": "@repo/web",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --turbopack --port 3000",
"build": "next build",
"start": "next start"
},
"dependencies": {
"@radix-ui/react-label": "^2.1.6",
"@radix-ui/react-slot": "^1.2.2",
"@repo/api": "workspace:*",
"@repo/auth": "workspace:*",
"@repo/env": "workspace:*",
"@tanstack/react-query": "^5.76.1",
"@trpc/client": "^11.1.2",
"@trpc/server": "^11.1.2",
"@trpc/tanstack-react-query": "^11.1.2",
"better-auth": "^1.2.8",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.511.0",
"next": "15.3.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"superjson": "^2.2.2",
"tailwind-merge": "^3.3.0",
"tw-animate-css": "^1.3.0"
},
"devDependencies": {
"@repo/typescript-config": "workspace:*",
"@tailwindcss/postcss": "^4",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"tailwindcss": "^4",
"typescript": "^5"
}
}
20 changes: 10 additions & 10 deletions apps/web/src/app/(auth)/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ import { auth } from "@repo/auth/server";
import { SignInForm } from "./sign-in-form";

export const metadata: Metadata = {
title: "Sign In - Analog",
title: "Sign In - Analog",
Comment thread
AugustinMauroy marked this conversation as resolved.
};

export default async function Page() {
const session = await auth.api.getSession({ headers: await headers() });
const session = await auth.api.getSession({ headers: await headers() });

if (session) {
redirect("/");
}
if (session) {
redirect("/");
}

return (
<div className="w-dvw h-dvh flex items-center justify-center">
<SignInForm />
</div>
);
return (
<div className="w-dvw h-dvh flex items-center justify-center">
<SignInForm />
</div>
);
}
137 changes: 63 additions & 74 deletions apps/web/src/app/(auth)/login/sign-in-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,88 +5,77 @@ import Link from "next/link";
import { authClient } from "@repo/auth/client";
import { Button } from "@/components/ui/button";
import {
Card,
CardContent,
CardHeader,
CardTitle,
CardDescription,
CardFooter,
Card,
CardContent,
CardHeader,
CardTitle,
CardDescription,
CardFooter,
} from "@/components/ui/card";
import { Google } from "@/components/icons/google";
import { cn } from "@/lib/utils";

interface SignInFormProps {
redirectUrl?: string;
redirectUrl?: string;
}

export function SignInForm({ redirectUrl = "/" }: SignInFormProps) {
const [loading, setLoading] = useState(false);
const [loading, setLoading] = useState(false);

const signInWithGoogle = async () => {
await authClient.signIn.social(
{
provider: "google",
callbackURL: redirectUrl,
},
{
onRequest: () => {
setLoading(true);
},
onResponse: () => {
setLoading(false);
},
},
);
};
const signInWithGoogle = async () => {
await authClient.signIn.social(
{
provider: "google",
callbackURL: redirectUrl,
},
{
onRequest: () => {
setLoading(true);
},
onResponse: () => {
setLoading(false);
},
},
);
};

return (
<Card className="max-w-md shadow-none border-none">
<CardHeader>
<CardTitle className="text-xl md:text-2xl text-center">Analog</CardTitle>
<CardDescription className="text-md md:text-lg text-center text-balance">
The calendar that changes everything
</CardDescription>
</CardHeader>
<CardContent>
<div className="grid gap-8">
<div
className={cn(
"w-full gap-2 flex items-center",
"justify-between flex-col",
)}
>
<Button
variant="outline"
className={cn("w-full gap-2")}
disabled={loading}
onClick={signInWithGoogle}
>
<Google />
Continue with Google
</Button>
</div>
</div>
</CardContent>
<CardFooter>
<div className="flex justify-center w-full py-4">
<p className="text-center text-sm text-muted-foreground text-balance">
By continuing, you agree to our{" "}
<Link
href="/terms"
className="font-medium text-primary hover:underline"
>
Terms of Service
</Link>{" "}
and{" "}
<Link
href="/privacy"
className="font-medium text-primary hover:underline"
>
Privacy Policy
</Link>
</p>
</div>
</CardFooter>
</Card>
);
return (
<Card className="max-w-md shadow-none border-none">
<CardHeader>
<CardTitle className="text-xl md:text-2xl text-center">Analog</CardTitle>
<CardDescription className="text-md md:text-lg text-center text-balance">
The calendar that changes everything
</CardDescription>
</CardHeader>
<CardContent>
<div className="grid gap-8">
<div className={cn("w-full gap-2 flex items-center", "justify-between flex-col")}>
<Button
variant="outline"
className={cn("w-full gap-2")}
disabled={loading}
onClick={signInWithGoogle}
>
<Google />
Continue with Google
</Button>
</div>
</div>
</CardContent>
<CardFooter>
<div className="flex justify-center w-full py-4">
<p className="text-center text-sm text-muted-foreground text-balance">
By continuing, you agree to our{" "}
<Link href="/terms" className="font-medium text-primary hover:underline">
Terms of Service
</Link>{" "}
and{" "}
<Link href="/privacy" className="font-medium text-primary hover:underline">
Privacy Policy
</Link>
</p>
</div>
</CardFooter>
</Card>
);
}
Loading