Devlog #3
Changes
- Made the landing page for x44. Tho it was mostly generated by AI, I did the authentication and styling for the button.
- Set-up drizzle orm and wrote the schema for the database.
- Authentication(used better-auth)
The problems I faced
- I tried to make my own authentication system, and realised after more than two hours of work that there is still a lot of work to be done to make it secure. And i can use that time to add more features. So I switched to better-auth it was a great decision according to me. And if you are in search of an authentication framework I recommend you to check better-auth once them have amazing documentation.
- To initialise better-auth in cf worker, I first needed to initialse drizzle and it requires a D1 instance which in only available in the context of a request. So I made a getAuth function
const getAuth = (ctx:Context) => {
const db = drizzle(ctx.env.DB, {schema})
const auth = betterAuth({database:drizzleAdapter(db, {provider:"sqlite",schema})})
return auth
}
Currently working on dashboard(this is not by AI)
If you have any suggestion please comment, and you can view the system architecture in the previous devlog[i am not yet sure about the subdomain routing part, so that is not drawn]. ✌️
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.