forked from civitai/civitai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 429665d
Showing
33 changed files
with
4,390 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Since .env is gitignored, you can use .env-example to build a new `.env` file when you clone the repo. | ||
# Keep this file up-to-date when you add new variables to `.env`. | ||
|
||
# This file will be committed to version control, so make sure not to have any secrets in it. | ||
# If you are cloning this repo, create a copy of this file named `.env` and populate it with your secrets. | ||
|
||
# When adding additional env variables, the schema in /env/schema.mjs should be updated accordingly | ||
|
||
# Prisma | ||
DATABASE_URL=file:./db.sqlite | ||
|
||
# Next Auth | ||
NEXTAUTH_SECRET= | ||
NEXTAUTH_URL=http://localhost:3000 | ||
|
||
# Next Auth Discord Provider | ||
DISCORD_CLIENT_ID= | ||
DISCORD_CLIENT_SECRET= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"prettier" | ||
], | ||
"extends": [ | ||
"next/core-web-vitals", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"rules": { | ||
"prettier/prettier": [ | ||
"error" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# database | ||
/prisma/db.sqlite | ||
/prisma/db.sqlite-journal | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"semi": true, | ||
"tabWidth": 2, | ||
"printWidth": 120, | ||
"singleQuote": true, | ||
"jsxBracketSameLine": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Create T3 App | ||
|
||
This is an app bootstrapped according to the [init.tips](https://init.tips) stack, also known as the T3-Stack. | ||
|
||
## Why are there `.js` files in here? | ||
|
||
As per [T3-Axiom #3](https://github.com/t3-oss/create-t3-app/tree/next#3-typesafety-isnt-optional), we take typesafety as a first class citizen. Unfortunately, not all frameworks and plugins support TypeScript which means some of the configuration files have to be `.js` files. | ||
|
||
We try to emphasize that these files are javascript for a reason, by explicitly declaring its type (`cjs` or `mjs`) depending on what's supported by the library it is used by. Also, all the `js` files in this project are still typechecked using a `@ts-check` comment at the top. | ||
|
||
## What's next? How do I make an app with this? | ||
|
||
We try to keep this project as simple as possible, so you can start with the most basic configuration and then move on to more advanced configuration. | ||
|
||
If you are not familiar with the different technologies used in this project, please refer to the respective docs. If you still are in the wind, please join our [Discord](https://t3.gg/discord) and ask for help. | ||
|
||
- [Next-Auth.js](https://next-auth.js.org) | ||
- [Prisma](https://prisma.io) | ||
- [TailwindCSS](https://tailwindcss.com) | ||
- [tRPC](https://trpc.io) | ||
|
||
Also checkout these awesome tutorials on `create-t3-app`. | ||
|
||
- [Build a Blog With the T3 Stack - tRPC, TypeScript, Next.js, Prisma & Zod](https://www.youtube.com/watch?v=syEWlxVFUrY) | ||
- [Build a Live Chat Application with the T3 Stack - TypeScript, Tailwind, tRPC](https://www.youtube.com/watch?v=dXRRY37MPuk) | ||
- [Build a full stack app with create-t3-app](https://www.nexxel.dev/blog/ct3a-guestbook) | ||
- [A first look at create-t3-app](https://dev.to/ajcwebdev/a-first-look-at-create-t3-app-1i8f) | ||
|
||
## How do I deploy this? | ||
|
||
### Vercel | ||
|
||
We recommend deploying to [Vercel](https://vercel.com/?utm_source=t3-oss&utm_campaign=oss). It makes it super easy to deploy NextJs apps. | ||
|
||
- Push your code to a GitHub repository. | ||
- Go to [Vercel](https://vercel.com/?utm_source=t3-oss&utm_campaign=oss) and sign up with GitHub. | ||
- Create a Project and import the repository you pushed your code to. | ||
- Add your environment variables. | ||
- Click **Deploy** | ||
- Now whenever you push a change to your repository, Vercel will automatically redeploy your website! | ||
|
||
### Docker | ||
|
||
You can also dockerize this stack and deploy a container. See the [Docker deployment page](https://create-t3-app-nu.vercel.app/en/deployment/docker) for details. | ||
|
||
## Useful resources | ||
|
||
Here are some resources that we commonly refer to: | ||
|
||
- [Protecting routes with Next-Auth.js](https://next-auth.js.org/configuration/nextjs#unstable_getserversession) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// @ts-check | ||
import { env } from "./src/env/server.mjs"; | ||
|
||
/** | ||
* Don't be scared of the generics here. | ||
* All they do is to give us autocompletion when using this. | ||
* | ||
* @template {import('next').NextConfig} T | ||
* @param {T} config - A generic parameter that flows through to the return type | ||
* @constraint {{import('next').NextConfig}} | ||
*/ | ||
function defineNextConfig(config) { | ||
return config; | ||
} | ||
|
||
export default defineNextConfig({ | ||
reactStrictMode: true, | ||
swcMinify: true, | ||
// Next.js i18n docs: https://nextjs.org/docs/advanced-features/i18n-routing | ||
i18n: { | ||
locales: ["en"], | ||
defaultLocale: "en", | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"name": "model-share", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"build": "next build", | ||
"dev": "next dev", | ||
"postinstall": "prisma generate", | ||
"lint": "next lint", | ||
"start": "next start" | ||
}, | ||
"dependencies": { | ||
"@emotion/react": "^11.10.4", | ||
"@emotion/server": "^11.10.0", | ||
"@mantine/core": "^5.5.5", | ||
"@mantine/dropzone": "^5.5.5", | ||
"@mantine/form": "^5.5.5", | ||
"@mantine/hooks": "^5.5.5", | ||
"@mantine/modals": "^5.5.5", | ||
"@mantine/next": "^5.5.5", | ||
"@mantine/notifications": "^5.5.5", | ||
"@next-auth/prisma-adapter": "^1.0.4", | ||
"@prisma/client": "^4.4.0", | ||
"@tanstack/react-query": "^4.10.0", | ||
"@trpc/client": "10.0.0-proxy-beta.17", | ||
"@trpc/next": "10.0.0-proxy-beta.17", | ||
"@trpc/react": "10.0.0-proxy-beta.17", | ||
"@trpc/server": "10.0.0-proxy-beta.17", | ||
"next": "12.3.1", | ||
"next-auth": "^4.12.3", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0", | ||
"superjson": "1.9.1", | ||
"zod": "^3.18.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.19.3", | ||
"@types/node": "18.0.0", | ||
"@types/react": "18.0.14", | ||
"@types/react-dom": "18.0.5", | ||
"@typescript-eslint/eslint-plugin": "^5.33.0", | ||
"@typescript-eslint/parser": "^5.33.0", | ||
"eslint": "8.22.0", | ||
"eslint-config-next": "12.3.1", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"prisma": "^4.4.0", | ||
"typescript": "^4.8.4" | ||
}, | ||
"ct3aMetadata": { | ||
"initVersion": "6.2.1" | ||
} | ||
} |
Oops, something went wrong.