Skip to content

Commit 071909f

Browse files
committed
initial commit 🚀
0 parents  commit 071909f

File tree

262 files changed

+16690
-0
lines changed

Some content is hidden

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

262 files changed

+16690
-0
lines changed

‎.dockerignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.vscode
2+
node_modules
3+
.git
4+
.gitattributes
5+
.eslintignore
6+
.eslintrc.cjs
7+
.prettierrc
8+
.pretieriignore
9+
build
10+
README.md
11+
Dockerfile
12+

‎.env.example

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
DATABASE_URL=local.db # For local development only
2+
SMTP_HOST=smtp.example.com # your smtp host
3+
SMTP_PORT=587 # your smtp port
4+
SMTP_USER=your_email@example.com
5+
SMTP_PASSWORD=password
6+
SMTP_FROM_NAME="Auth Kit" # if with spaces
7+
SMTP_FROM_EMAIL=noreply@example.com # only used for verifications,
8+
SMTP_REPLY_TO=noreply@example.com #
9+
ORIGIN="https://example.com" # your domain name
10+
GITHUB_CLIENT_ID=""
11+
GITHUB_CLIENT_SECRET=""
12+
GITHUB_CALLBACK_URL="http://localhost:5173/login/github/callback"
13+
GOOGLE_CLIENTID=""
14+
GOOGLE_CLIENTSECRET=""
15+
GOOGLE_CALLBACK_URL="http://localhost:5173/login/google/callback"

‎.eslintignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.DS_Store
2+
node_modules
3+
/build
4+
/.svelte-kit
5+
/package
6+
.env
7+
.env.*
8+
!.env.example
9+
10+
# Ignore files for PNPM, NPM and YARN
11+
pnpm-lock.yaml
12+
package-lock.json
13+
yarn.lock

‎.eslintrc.cjs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/** @type { import("eslint").Linter.Config } */
2+
module.exports = {
3+
root: true,
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:@typescript-eslint/recommended',
7+
'plugin:svelte/recommended',
8+
'prettier'
9+
],
10+
parser: '@typescript-eslint/parser',
11+
plugins: ['@typescript-eslint'],
12+
parserOptions: {
13+
sourceType: 'module',
14+
ecmaVersion: 2020,
15+
extraFileExtensions: ['.svelte']
16+
},
17+
env: {
18+
browser: true,
19+
es2017: true,
20+
node: true
21+
},
22+
overrides: [
23+
{
24+
files: ['*.svelte'],
25+
parser: 'svelte-eslint-parser',
26+
parserOptions: {
27+
parser: '@typescript-eslint/parser'
28+
}
29+
}
30+
]
31+
};

‎.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.DS_Store
2+
node_modules
3+
/build
4+
/.svelte-kit
5+
/package
6+
.env
7+
.env.*
8+
local.db
9+
/data
10+
!.env.example
11+
vite.config.js.timestamp-*
12+
vite.config.ts.timestamp-*

‎.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

‎.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Ignore files for PNPM, NPM and YARN
2+
pnpm-lock.yaml
3+
package-lock.json
4+
yarn.lock

‎.prettierrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"useTabs": true,
3+
"singleQuote": true,
4+
"trailingComma": "none",
5+
"printWidth": 100,
6+
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
7+
"overrides": [
8+
{
9+
"files": "*.svelte",
10+
"options": {
11+
"parser": "svelte"
12+
}
13+
}
14+
]
15+
}

‎Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM node:20.11-alpine AS base
2+
3+
RUN npm install -g pnpm@latest
4+
5+
WORKDIR /app
6+
7+
COPY package.json pnpm-lock.yaml ./
8+
RUN pnpm install --frozen-lockfile
9+
10+
11+
COPY . .
12+
13+
RUN pnpm build
14+
15+
EXPOSE 3000
16+
17+
18+
CMD ["node", "-r", "dotenv/config", "build"]
19+
20+

‎README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Auth Kit
2+
3+
An Authentication Base Application built with SvelteKit.
4+
5+
Libraries Used:
6+
7+
- [x] [Drizzle ORM](https://orm.drizzle.team)
8+
- [x] [Lucia v3](https://lucia-auth.com)
9+
- [x] [Sveltekit-Superforms](https://superform.rocks)
10+
- [x] [Shadcn-svelte](https://shadcn-svelte.com)
11+
12+
```sh
13+
#.env
14+
DATABASE_URL=local.db # For local development only
15+
SMTP_HOST=smtp.example.com # your smtp host
16+
SMTP_PORT=587 # your smtp port
17+
SMTP_USER=your_email@example.com
18+
SMTP_PASSWORD=password
19+
SMTP_FROM_NAME="Auth Kit" # if with spaces
20+
SMTP_FROM_EMAIL=noreply@example.com # only used for verifications,
21+
SMTP_REPLY_TO=noreply@example.com #
22+
ORIGIN="https://example.com" # your domain name
23+
OTPLIMIT_SECRET=
24+
VERIFYLIMIT_SECRET=
25+
```
26+
27+
Registration
28+
29+
- [ ] Email is only required after that a confirmation will be sent to the email address
30+
31+
Login
32+
33+
- [x] User can login with username/email and password
34+
- [x] User can login via OTP
35+
- [x] The email sent should also have a link and a state in the url
36+
37+
Rate limiting
38+
39+
- [ ] Sending OTP, IP+UA limitation should only be 5 per 15minutes
40+
- [ ] Wrong OTP Verification should only be 5 per 15minutes
41+
42+
## Deploying

0 commit comments

Comments
 (0)