feat: bootstrap next.js + tailwind + deps
This commit is contained in:
20
.env.example
Normal file
20
.env.example
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Database
|
||||||
|
DATABASE_URL=postgresql://preistracker:CHANGEME@localhost:5432/preistracker
|
||||||
|
|
||||||
|
# Zitadel OIDC
|
||||||
|
ZITADEL_ISSUER=https://auth.kuns.dev
|
||||||
|
ZITADEL_CLIENT_ID=
|
||||||
|
ALLOWED_USER_IDS=
|
||||||
|
|
||||||
|
# Session (32+ chars, random)
|
||||||
|
SESSION_PASSWORD=
|
||||||
|
|
||||||
|
# Pushover
|
||||||
|
PUSHOVER_TOKEN=
|
||||||
|
PUSHOVER_USER=
|
||||||
|
|
||||||
|
# Cron secret (any random string)
|
||||||
|
CRON_SECRET=
|
||||||
|
|
||||||
|
# Public URL (for OIDC redirects)
|
||||||
|
NEXT_PUBLIC_BASE_URL=http://localhost:3000
|
||||||
11
.gitignore
vendored
Normal file
11
.gitignore
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
node_modules/
|
||||||
|
.next/
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
*.log
|
||||||
|
.DS_Store
|
||||||
|
out/
|
||||||
|
build/
|
||||||
|
.turbo/
|
||||||
|
coverage/
|
||||||
|
test-results/
|
||||||
2
eslint.config.mjs
Normal file
2
eslint.config.mjs
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
import next from 'eslint-config-next'
|
||||||
|
export default [...next, { rules: { '@typescript-eslint/no-explicit-any': 'warn' } }]
|
||||||
6
next-env.d.ts
vendored
Normal file
6
next-env.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
/// <reference types="next" />
|
||||||
|
/// <reference types="next/image-types/global" />
|
||||||
|
import "./.next/dev/types/routes.d.ts";
|
||||||
|
|
||||||
|
// NOTE: This file should not be edited
|
||||||
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||||
19
next.config.ts
Normal file
19
next.config.ts
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import type { NextConfig } from 'next'
|
||||||
|
|
||||||
|
const config: NextConfig = {
|
||||||
|
output: 'standalone',
|
||||||
|
experimental: {
|
||||||
|
serverActions: { allowedOrigins: ['preis.kuns.dev'] },
|
||||||
|
},
|
||||||
|
images: {
|
||||||
|
remotePatterns: [
|
||||||
|
{ protocol: 'https', hostname: '**.amazon.com' },
|
||||||
|
{ protocol: 'https', hostname: '**.amazon.de' },
|
||||||
|
{ protocol: 'https', hostname: '**.media-amazon.com' },
|
||||||
|
{ protocol: 'https', hostname: '**.idealo.com' },
|
||||||
|
{ protocol: 'https', hostname: '**.geizhals.de' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
export default config
|
||||||
43
package.json
Normal file
43
package.json
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"name": "preis-tracker",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"dev": "next dev",
|
||||||
|
"build": "next build",
|
||||||
|
"start": "next start",
|
||||||
|
"lint": "eslint",
|
||||||
|
"test": "vitest run",
|
||||||
|
"test:watch": "vitest",
|
||||||
|
"db:generate": "drizzle-kit generate",
|
||||||
|
"db:push": "drizzle-kit push",
|
||||||
|
"db:studio": "drizzle-kit studio"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/cheerio": "^0.22.35",
|
||||||
|
"cheerio": "^1.0.0",
|
||||||
|
"drizzle-orm": "^0.45.2",
|
||||||
|
"iron-session": "^8.0.4",
|
||||||
|
"jose": "^5.9.6",
|
||||||
|
"next": "16.2.2",
|
||||||
|
"playwright": "^1.50.0",
|
||||||
|
"postgres": "^3.4.8",
|
||||||
|
"react": "19.2.4",
|
||||||
|
"react-dom": "19.2.4",
|
||||||
|
"recharts": "^3.8.1",
|
||||||
|
"zod": "^3.23.8"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@tailwindcss/postcss": "^4",
|
||||||
|
"@types/node": "^20",
|
||||||
|
"@types/react": "^19",
|
||||||
|
"@types/react-dom": "^19",
|
||||||
|
"drizzle-kit": "^0.31.10",
|
||||||
|
"eslint": "^9",
|
||||||
|
"eslint-config-next": "16.2.2",
|
||||||
|
"tailwindcss": "^4",
|
||||||
|
"tsx": "^4.21.0",
|
||||||
|
"typescript": "^5",
|
||||||
|
"vitest": "^2.1.8"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
postcss.config.mjs
Normal file
1
postcss.config.mjs
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export default { plugins: { '@tailwindcss/postcss': {} } }
|
||||||
12
src/app/globals.css
Normal file
12
src/app/globals.css
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
@import "tailwindcss";
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--background: #0a0a0a;
|
||||||
|
--foreground: #ededed;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background: var(--background);
|
||||||
|
color: var(--foreground);
|
||||||
|
font-family: ui-sans-serif, system-ui, sans-serif;
|
||||||
|
}
|
||||||
15
src/app/layout.tsx
Normal file
15
src/app/layout.tsx
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import './globals.css'
|
||||||
|
import type { Metadata } from 'next'
|
||||||
|
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: 'Preis-Tracker',
|
||||||
|
description: 'Tracking von Produktpreisen bei Amazon, Idealo, Geizhals',
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
||||||
|
return (
|
||||||
|
<html lang="de">
|
||||||
|
<body>{children}</body>
|
||||||
|
</html>
|
||||||
|
)
|
||||||
|
}
|
||||||
3
src/app/page.tsx
Normal file
3
src/app/page.tsx
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export default function Home() {
|
||||||
|
return <main className="p-8"><h1 className="text-2xl">Preis-Tracker</h1></main>
|
||||||
|
}
|
||||||
41
tsconfig.json
Normal file
41
tsconfig.json
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2022",
|
||||||
|
"lib": [
|
||||||
|
"dom",
|
||||||
|
"dom.iterable",
|
||||||
|
"esnext"
|
||||||
|
],
|
||||||
|
"allowJs": false,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"strict": true,
|
||||||
|
"noEmit": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"module": "esnext",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"jsx": "react-jsx",
|
||||||
|
"incremental": true,
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"name": "next"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"paths": {
|
||||||
|
"@/*": [
|
||||||
|
"./src/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"next-env.d.ts",
|
||||||
|
"**/*.ts",
|
||||||
|
"**/*.tsx",
|
||||||
|
".next/types/**/*.ts",
|
||||||
|
".next/dev/types/**/*.ts"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"node_modules"
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user