Skip to content

Commit 339fbcc

Browse files
committed
init
0 parents  commit 339fbcc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+7115
-0
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DATABASE_PATH=xxx

.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# # next-14-lucia-v3-sqlite-drizzle-conform-zod-email-verification-otp-server-actions
2+
3+
# Store Environment Variables
4+
5+
1. Copy `.env.example` file to `.env` file
6+
7+
```bash
8+
cp .env.example .env # duplicate .env.example & name it .env
9+
```
10+
11+
2. Change `DATABASE_PATH` to the filename of your choice
12+
13+
```bash
14+
DATABASE_PATH=sqlite.db
15+
```
16+
17+
## Install the dependencies
18+
19+
```bash
20+
pnpm install
21+
```
22+
23+
## Start the server
24+
25+
```bash
26+
pnpm start
27+
```
28+
29+
## Push schema changes to database
30+
31+
```bash
32+
pnpm db:push
33+
```
34+
35+
## Generate Migrations
36+
37+
```bash
38+
pnpm db:generate
39+
```

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+
import 'dotenv/config'
3+
4+
export default {
5+
schema: './src/app/db/drizzle.schema.ts',
6+
out: './src/app/db/migrations',
7+
driver: 'better-sqlite',
8+
dbCredentials: {
9+
url: process.env.DATABASE_PATH,
10+
},
11+
verbose: true,
12+
} satisfies Config

env.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
declare global {
2+
namespace NodeJS {
3+
interface ProcessEnv {
4+
DATABASE_PATH: string
5+
}
6+
}
7+
}
8+
export {}

next.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {}
3+
4+
module.exports = nextConfig

package.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "next-13-lucia-auth-drizzle-turso-sqlite-magic-link",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev",
7+
"turbo": "next dev --turbo",
8+
"build": "next build",
9+
"start": "next start",
10+
"lint": "next lint",
11+
"db:push": "drizzle-kit push:sqlite --config drizzle.config.ts",
12+
"db:generate": "drizzle-kit generate:sqlite --config drizzle.config.ts",
13+
"db:studio": "drizzle-kit studio --host localhost --port 3002 --verbose --config drizzle.config.ts",
14+
"db:seed": "node --import tsx --env-file .env ./seed/insert.ts",
15+
"db:delete": "node --import tsx --env-file .env ./seed/delete.ts",
16+
"clean": "rimraf .next",
17+
"knip": "knip"
18+
},
19+
"dependencies": {
20+
"@conform-to/react": "1.0.0-rc.0",
21+
"@conform-to/zod": "1.0.0-rc.0",
22+
"@lucia-auth/adapter-drizzle": "1.0.0",
23+
"@types/node": "20.11.13",
24+
"@types/react": "18.2.48",
25+
"@types/react-dom": "18.2.18",
26+
"autoprefixer": "10.4.17",
27+
"better-sqlite3": "^9.3.0",
28+
"clsx": "^2.1.0",
29+
"dotenv": "^16.4.1",
30+
"drizzle-orm": "^0.29.3",
31+
"eslint": "8.56.0",
32+
"eslint-config-next": "14.1.0",
33+
"lucia": "3.0.1",
34+
"next": "14.1.0",
35+
"next-client-cookies": "^1.1.0",
36+
"oslo": "^1.0.3",
37+
"postcss": "8.4.33",
38+
"react": "18.2.0",
39+
"react-dom": "18.2.0",
40+
"tailwindcss": "3.4.1",
41+
"typescript": "5.3.3",
42+
"ulidx": "^2.2.1",
43+
"zod": "^3.22.4"
44+
},
45+
"devDependencies": {
46+
"@types/better-sqlite3": "^7.6.9",
47+
"drizzle-kit": "^0.20.13",
48+
"knip": "^4.2.3",
49+
"rimraf": "^5.0.5",
50+
"tsx": "^4.7.0"
51+
}
52+
}

0 commit comments

Comments
 (0)