Skip to content

Commit 429665d

Browse files
committed
Initial setup
0 parents  commit 429665d

33 files changed

+4390
-0
lines changed

.env-example

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Since .env is gitignored, you can use .env-example to build a new `.env` file when you clone the repo.
2+
# Keep this file up-to-date when you add new variables to `.env`.
3+
4+
# This file will be committed to version control, so make sure not to have any secrets in it.
5+
# If you are cloning this repo, create a copy of this file named `.env` and populate it with your secrets.
6+
7+
# When adding additional env variables, the schema in /env/schema.mjs should be updated accordingly
8+
9+
# Prisma
10+
DATABASE_URL=file:./db.sqlite
11+
12+
# Next Auth
13+
NEXTAUTH_SECRET=
14+
NEXTAUTH_URL=http://localhost:3000
15+
16+
# Next Auth Discord Provider
17+
DISCORD_CLIENT_ID=
18+
DISCORD_CLIENT_SECRET=

.eslintrc.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"parserOptions": {
4+
"project": "./tsconfig.json"
5+
},
6+
"plugins": [
7+
"@typescript-eslint",
8+
"prettier"
9+
],
10+
"extends": [
11+
"next/core-web-vitals",
12+
"plugin:@typescript-eslint/recommended",
13+
"prettier"
14+
],
15+
"rules": {
16+
"prettier/prettier": [
17+
"error"
18+
]
19+
}
20+
}

.gitignore

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# database
12+
/prisma/db.sqlite
13+
/prisma/db.sqlite-journal
14+
15+
# next.js
16+
/.next/
17+
/out/
18+
19+
# production
20+
/build
21+
22+
# misc
23+
.DS_Store
24+
*.pem
25+
26+
# debug
27+
npm-debug.log*
28+
yarn-debug.log*
29+
yarn-error.log*
30+
.pnpm-debug.log*
31+
32+
# local env files
33+
.env
34+
.env*.local
35+
36+
# vercel
37+
.vercel
38+
39+
# typescript
40+
*.tsbuildinfo

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
16

.prettierrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"semi": true,
3+
"tabWidth": 2,
4+
"printWidth": 120,
5+
"singleQuote": true,
6+
"jsxBracketSameLine": true
7+
}

README.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Create T3 App
2+
3+
This is an app bootstrapped according to the [init.tips](https://init.tips) stack, also known as the T3-Stack.
4+
5+
## Why are there `.js` files in here?
6+
7+
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.
8+
9+
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.
10+
11+
## What's next? How do I make an app with this?
12+
13+
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.
14+
15+
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.
16+
17+
- [Next-Auth.js](https://next-auth.js.org)
18+
- [Prisma](https://prisma.io)
19+
- [TailwindCSS](https://tailwindcss.com)
20+
- [tRPC](https://trpc.io)
21+
22+
Also checkout these awesome tutorials on `create-t3-app`.
23+
24+
- [Build a Blog With the T3 Stack - tRPC, TypeScript, Next.js, Prisma & Zod](https://www.youtube.com/watch?v=syEWlxVFUrY)
25+
- [Build a Live Chat Application with the T3 Stack - TypeScript, Tailwind, tRPC](https://www.youtube.com/watch?v=dXRRY37MPuk)
26+
- [Build a full stack app with create-t3-app](https://www.nexxel.dev/blog/ct3a-guestbook)
27+
- [A first look at create-t3-app](https://dev.to/ajcwebdev/a-first-look-at-create-t3-app-1i8f)
28+
29+
## How do I deploy this?
30+
31+
### Vercel
32+
33+
We recommend deploying to [Vercel](https://vercel.com/?utm_source=t3-oss&utm_campaign=oss). It makes it super easy to deploy NextJs apps.
34+
35+
- Push your code to a GitHub repository.
36+
- Go to [Vercel](https://vercel.com/?utm_source=t3-oss&utm_campaign=oss) and sign up with GitHub.
37+
- Create a Project and import the repository you pushed your code to.
38+
- Add your environment variables.
39+
- Click **Deploy**
40+
- Now whenever you push a change to your repository, Vercel will automatically redeploy your website!
41+
42+
### Docker
43+
44+
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.
45+
46+
## Useful resources
47+
48+
Here are some resources that we commonly refer to:
49+
50+
- [Protecting routes with Next-Auth.js](https://next-auth.js.org/configuration/nextjs#unstable_getserversession)

next-env.d.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.

next.config.mjs

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// @ts-check
2+
import { env } from "./src/env/server.mjs";
3+
4+
/**
5+
* Don't be scared of the generics here.
6+
* All they do is to give us autocompletion when using this.
7+
*
8+
* @template {import('next').NextConfig} T
9+
* @param {T} config - A generic parameter that flows through to the return type
10+
* @constraint {{import('next').NextConfig}}
11+
*/
12+
function defineNextConfig(config) {
13+
return config;
14+
}
15+
16+
export default defineNextConfig({
17+
reactStrictMode: true,
18+
swcMinify: true,
19+
// Next.js i18n docs: https://nextjs.org/docs/advanced-features/i18n-routing
20+
i18n: {
21+
locales: ["en"],
22+
defaultLocale: "en",
23+
},
24+
});

package.json

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"name": "model-share",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"build": "next build",
7+
"dev": "next dev",
8+
"postinstall": "prisma generate",
9+
"lint": "next lint",
10+
"start": "next start"
11+
},
12+
"dependencies": {
13+
"@emotion/react": "^11.10.4",
14+
"@emotion/server": "^11.10.0",
15+
"@mantine/core": "^5.5.5",
16+
"@mantine/dropzone": "^5.5.5",
17+
"@mantine/form": "^5.5.5",
18+
"@mantine/hooks": "^5.5.5",
19+
"@mantine/modals": "^5.5.5",
20+
"@mantine/next": "^5.5.5",
21+
"@mantine/notifications": "^5.5.5",
22+
"@next-auth/prisma-adapter": "^1.0.4",
23+
"@prisma/client": "^4.4.0",
24+
"@tanstack/react-query": "^4.10.0",
25+
"@trpc/client": "10.0.0-proxy-beta.17",
26+
"@trpc/next": "10.0.0-proxy-beta.17",
27+
"@trpc/react": "10.0.0-proxy-beta.17",
28+
"@trpc/server": "10.0.0-proxy-beta.17",
29+
"next": "12.3.1",
30+
"next-auth": "^4.12.3",
31+
"react": "18.2.0",
32+
"react-dom": "18.2.0",
33+
"superjson": "1.9.1",
34+
"zod": "^3.18.0"
35+
},
36+
"devDependencies": {
37+
"@babel/core": "^7.19.3",
38+
"@types/node": "18.0.0",
39+
"@types/react": "18.0.14",
40+
"@types/react-dom": "18.0.5",
41+
"@typescript-eslint/eslint-plugin": "^5.33.0",
42+
"@typescript-eslint/parser": "^5.33.0",
43+
"eslint": "8.22.0",
44+
"eslint-config-next": "12.3.1",
45+
"eslint-config-prettier": "^8.5.0",
46+
"eslint-plugin-prettier": "^4.2.1",
47+
"prisma": "^4.4.0",
48+
"typescript": "^4.8.4"
49+
},
50+
"ct3aMetadata": {
51+
"initVersion": "6.2.1"
52+
}
53+
}

0 commit comments

Comments
 (0)