Skip to content

Commit 4c44070

Browse files
committed
Initial Commit
0 parents  commit 4c44070

19 files changed

Lines changed: 5513 additions & 0 deletions

.env.example

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Since the ".env" file is gitignored, you can use the ".env.example" file to
2+
# build a new ".env" file when you clone the repo. Keep this file up-to-date
3+
# when you add new variables to `.env`.
4+
5+
# This file will be committed to version control, so make sure not to have any
6+
# secrets in it. If you are cloning this repo, create a copy of this file named
7+
# ".env" and populate it with your secrets.
8+
9+
# When adding additional environment variables, the schema in "/src/env.js"
10+
# should be updated accordingly.
11+
12+
# Drizzle
13+
DATABASE_URL="file:./db.sqlite"
14+
15+
# Example:
16+
# SERVERVAR="foo"
17+
# NEXT_PUBLIC_CLIENTVAR="bar"

.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
db.sqlite
15+
16+
# next.js
17+
/.next/
18+
/out/
19+
next-env.d.ts
20+
21+
# production
22+
/build
23+
24+
# misc
25+
.DS_Store
26+
*.pem
27+
28+
# debug
29+
npm-debug.log*
30+
yarn-debug.log*
31+
yarn-error.log*
32+
.pnpm-debug.log*
33+
34+
# local env files
35+
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables
36+
.env
37+
.env*.local
38+
39+
# vercel
40+
.vercel
41+
42+
# typescript
43+
*.tsbuildinfo
44+
45+
# idea files
46+
.idea

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
public-hoist-pattern[]=*eslint*
2+
public-hoist-pattern[]=*prettier*

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Create T3 App
2+
3+
This is a [T3 Stack](https://create.t3.gg/) project bootstrapped with `create-t3-app`.
4+
5+
## What's next? How do I make an app with this?
6+
7+
We try to keep this project as simple as possible, so you can start with just the scaffolding we set up for you, and add additional things later when they become necessary.
8+
9+
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.
10+
11+
- [Next.js](https://nextjs.org)
12+
- [NextAuth.js](https://next-auth.js.org)
13+
- [Prisma](https://prisma.io)
14+
- [Drizzle](https://orm.drizzle.team)
15+
- [Tailwind CSS](https://tailwindcss.com)
16+
- [tRPC](https://trpc.io)
17+
18+
## Learn More
19+
20+
To learn more about the [T3 Stack](https://create.t3.gg/), take a look at the following resources:
21+
22+
- [Documentation](https://create.t3.gg/)
23+
- [Learn the T3 Stack](https://create.t3.gg/en/faq#what-learning-resources-are-currently-available) — Check out these awesome tutorials
24+
25+
You can check out the [create-t3-app GitHub repository](https://github.com/t3-oss/create-t3-app) — your feedback and contributions are welcome!
26+
27+
## How do I deploy this?
28+
29+
Follow our deployment guides for [Vercel](https://create.t3.gg/en/deployment/vercel), [Netlify](https://create.t3.gg/en/deployment/netlify) and [Docker](https://create.t3.gg/en/deployment/docker) for more information.

drizzle.config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { type Config } from "drizzle-kit";
2+
3+
import { env } from "~/env";
4+
5+
export default {
6+
schema: "./src/server/db/schema.ts",
7+
dialect: "sqlite",
8+
dbCredentials: {
9+
url: env.DATABASE_URL,
10+
},
11+
tablesFilter: ["drive-tutorial_*"],
12+
} satisfies Config;

eslint.config.js

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import { FlatCompat } from "@eslint/eslintrc";
2+
import tseslint from "typescript-eslint";
3+
// @ts-ignore -- no types for this plugin
4+
import drizzle from "eslint-plugin-drizzle";
5+
6+
const compat = new FlatCompat({
7+
baseDirectory: import.meta.dirname,
8+
});
9+
10+
export default tseslint.config(
11+
{
12+
ignores: [".next"],
13+
},
14+
...compat.extends("next/core-web-vitals"),
15+
{
16+
files: ["**/*.ts", "**/*.tsx"],
17+
plugins: {
18+
drizzle,
19+
},
20+
extends: [
21+
...tseslint.configs.recommended,
22+
...tseslint.configs.recommendedTypeChecked,
23+
...tseslint.configs.stylisticTypeChecked,
24+
],
25+
rules: {
26+
"@typescript-eslint/array-type": "off",
27+
"@typescript-eslint/consistent-type-definitions": "off",
28+
"@typescript-eslint/consistent-type-imports": [
29+
"warn",
30+
{ prefer: "type-imports", fixStyle: "inline-type-imports" },
31+
],
32+
"@typescript-eslint/no-unused-vars": [
33+
"warn",
34+
{ argsIgnorePattern: "^_" },
35+
],
36+
"@typescript-eslint/require-await": "off",
37+
"@typescript-eslint/no-misused-promises": [
38+
"error",
39+
{ checksVoidReturn: { attributes: false } },
40+
],
41+
"drizzle/enforce-delete-with-where": [
42+
"error",
43+
{ drizzleObjectName: ["db", "ctx.db"] },
44+
],
45+
"drizzle/enforce-update-with-where": [
46+
"error",
47+
{ drizzleObjectName: ["db", "ctx.db"] },
48+
],
49+
},
50+
},
51+
{
52+
linterOptions: {
53+
reportUnusedDisableDirectives: true,
54+
},
55+
languageOptions: {
56+
parserOptions: {
57+
projectService: true,
58+
},
59+
},
60+
},
61+
);

next.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
3+
* for Docker builds.
4+
*/
5+
import "./src/env.js";
6+
7+
/** @type {import("next").NextConfig} */
8+
const config = {};
9+
10+
export default config;

package.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "drive-tutorial",
3+
"version": "0.1.0",
4+
"private": true,
5+
"type": "module",
6+
"scripts": {
7+
"build": "next build",
8+
"check": "next lint && tsc --noEmit",
9+
"db:generate": "drizzle-kit generate",
10+
"db:migrate": "drizzle-kit migrate",
11+
"db:push": "drizzle-kit push",
12+
"db:studio": "drizzle-kit studio",
13+
"dev": "next dev --turbo",
14+
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
15+
"format:write": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
16+
"lint": "next lint",
17+
"lint:fix": "next lint --fix",
18+
"preview": "next build && next start",
19+
"start": "next start",
20+
"typecheck": "tsc --noEmit"
21+
},
22+
"dependencies": {
23+
"@libsql/client": "^0.14.0",
24+
"@t3-oss/env-nextjs": "^0.12.0",
25+
"drizzle-orm": "^0.41.0",
26+
"next": "^15.2.3",
27+
"react": "^19.0.0",
28+
"react-dom": "^19.0.0",
29+
"zod": "^3.24.2"
30+
},
31+
"devDependencies": {
32+
"@eslint/eslintrc": "^3.3.1",
33+
"@tailwindcss/postcss": "^4.0.15",
34+
"@types/node": "^20.14.10",
35+
"@types/react": "^19.0.0",
36+
"@types/react-dom": "^19.0.0",
37+
"drizzle-kit": "^0.30.5",
38+
"eslint": "^9.23.0",
39+
"eslint-config-next": "^15.2.3",
40+
"eslint-plugin-drizzle": "^0.2.3",
41+
"postcss": "^8.5.3",
42+
"prettier": "^3.5.3",
43+
"prettier-plugin-tailwindcss": "^0.6.11",
44+
"tailwindcss": "^4.0.15",
45+
"typescript": "^5.8.2",
46+
"typescript-eslint": "^8.27.0"
47+
},
48+
"ct3aMetadata": {
49+
"initVersion": "7.39.3"
50+
},
51+
"packageManager": "pnpm@10.6.3"
52+
}

0 commit comments

Comments
 (0)