@@ -9,6 +9,48 @@ Libraries Used:
9
9
- [x] [ Sveltekit-Superforms] ( https://superform.rocks )
10
10
- [x] [ Shadcn-svelte] ( https://shadcn-svelte.com )
11
11
12
+ ## Goals
13
+
14
+ Registration
15
+
16
+ - [x] Email is only required after that a confirmation will be sent to the email address
17
+
18
+ Login
19
+
20
+ - [x] User can login with username/email and password
21
+ - [x] User can login via OTP
22
+ - [x] The email sent should also have a link and a state in the url
23
+
24
+ Rate limiting
25
+
26
+ - [x] Sending OTP, IP+UA limitation should only be 5 per 15minutes
27
+ - [x] Wrong OTP Verification should only be 5 per 15minutes
28
+
29
+ Documentation
30
+
31
+ - [ ] Guide into changing database to postgres and mariadb
32
+ - [ ] Diagrams for how the authentication flow works
33
+
34
+ Admin dashboard
35
+
36
+ - [ ] To manage backups etc...
37
+
38
+ Demo dashboard apps
39
+
40
+ - [ ] AI Prompt
41
+ - [ ] Customer Maanger + Invoices
42
+ - [ ] Chat Application
43
+
44
+ ## Development
45
+
46
+ In order to start the development server, run the following command:
47
+
48
+ Environment Setup
49
+
50
+ ``` sh
51
+ cp .env.example .env # Creates a copy of .env.example to .env
52
+ ```
53
+
12
54
``` sh
13
55
# .env
14
56
DATABASE_URL=local.db # For local development only
@@ -20,23 +62,35 @@ SMTP_FROM_NAME="Auth Kit" # if with spaces
20
62
SMTP_FROM_EMAIL=noreply@example.com # only used for verifications,
21
63
SMTP_REPLY_TO=noreply@example.com #
22
64
ORIGIN=" https://example.com" # your domain name
23
- OTPLIMIT_SECRET=
24
- VERIFYLIMIT_SECRET=
65
+ GITHUB_CLIENT_ID=" " # This is provided by github
66
+ GITHUB_CLIENT_SECRET=" " # This is provided by github
67
+ GITHUB_CALLBACK_URL=" http://localhost:5173/login/github/callback"
68
+ GOOGLE_CLIENTID=" " # This is provided by google console
69
+ GOOGLE_CLIENTSECRET=" " # This is provided by google console
70
+ GOOGLE_CALLBACK_URL=" http://localhost:5173/login/google/callback"
25
71
```
26
72
27
- Registration
73
+ Create your Database file according to ` DATABASE_URL ` you set in ` .env `
28
74
29
- - [ ] Email is only required after that a confirmation will be sent to the email address
75
+ e.g
30
76
31
- Login
77
+ ``` sh
78
+ touch local.db
79
+ pnpm db:migrate # or npm run db:migrate
80
+ ```
32
81
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
82
+ Run the development server
36
83
37
- Rate limiting
84
+ ``` sh
85
+ pnpm dev # or npm run dev
86
+ ```
87
+
88
+ Seeding is wip but default accounts provided are seen in the ` migrate.ts ` file
89
+
90
+ ``` sh
91
+ pnpm migrate # or npm run migrate
92
+ ```
38
93
39
- - [ ] Sending OTP, IP+UA limitation should only be 5 per 15minutes
40
- - [ ] Wrong OTP Verification should only be 5 per 15minutes
94
+ # Deploying
41
95
42
- ## Deploying
96
+ WIP but a dockerfile is included.
0 commit comments