You are browsing as a guest. Sign up (or log in) to start making projects!

9h 10m 47s logged

Devlog #3

Changes

  1. Made the landing page for x44. Tho it was mostly generated by AI, I did the authentication and styling for the button.
  2. Set-up drizzle orm and wrote the schema for the database.
  3. Authentication(used better-auth)

The problems I faced

  1. 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.
  2. 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]. ✌️

0
4

Comments 0

No comments yet. Be the first!