diff --git a/.env.template b/.env.template new file mode 100644 index 0000000..50c6f3f --- /dev/null +++ b/.env.template @@ -0,0 +1,6 @@ +# Example configuration +# Copy this to .env and adjust as required +KEYCLOAK_ID= +KEYCLOAK_SECRET= +KEYCLOAK_ISSUER= +DATABASE_URL="file:./database.db" diff --git a/.eslintrc.json b/.eslintrc.json index bffb357..1c2aa65 100755 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,3 +1,3 @@ { - "extends": "next/core-web-vitals" + "extends": "next/core-web-vitals" } diff --git a/.gitignore b/.gitignore index 737d872..aa003fc 100755 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,6 @@ yarn-error.log* # typescript *.tsbuildinfo + +# prisma +prisma/dev.db* diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..f4f0eec --- /dev/null +++ b/.prettierignore @@ -0,0 +1,32 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +# lockfile +pnpm-lock.yaml + +# CI +.pnpm-store +.drone.yml + +node_modules +dist +dist-ssr +*.local +.next/ + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..d7a5a9c --- /dev/null +++ b/.prettierrc @@ -0,0 +1,8 @@ +{ + "jsxSingleQuote": true, + "semi": true, + "tabWidth": 4, + "useTabs": false, + "trailingComma": "es5", + "singleQuote": true +} diff --git a/README.md b/README.md index c87e042..33acb07 100755 --- a/README.md +++ b/README.md @@ -22,8 +22,8 @@ The `pages/api` directory is mapped to `/api/*`. Files in this directory are tre To learn more about Next.js, take a look at the following resources: -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! diff --git a/components/Button.tsx b/components/Button.tsx new file mode 100644 index 0000000..82d0618 --- /dev/null +++ b/components/Button.tsx @@ -0,0 +1,16 @@ +import { AnchorHTMLAttributes, ButtonHTMLAttributes, DetailedHTMLProps, RefAttributes } from "react"; +import Link, { LinkProps } from 'next/link'; + +export default function Button({ className, ...props }: DetailedHTMLProps, HTMLButtonElement>) { + return } + {status === 'authenticated' && <> + {data?.user?.name} + + } + + ) +} diff --git a/components/TextInput.tsx b/components/TextInput.tsx new file mode 100644 index 0000000..eeff077 --- /dev/null +++ b/components/TextInput.tsx @@ -0,0 +1,12 @@ +import { DetailedHTMLProps, InputHTMLAttributes, TextareaHTMLAttributes } from "react"; + +type Props = ({ multiline: true } & DetailedHTMLProps, HTMLTextAreaElement>) + | ({ multiline: false | undefined } & DetailedHTMLProps, HTMLInputElement>); + +export default function TextInput({ multiline, className, ...props }: Props) { + if (multiline) { + return