Open dhruvmalik007 opened 1 month ago
@SwatiMalik25 so I think you have created the success page right .
Now the second step Is to create the user database at the backend . as our application will allow the users to register the user new blogpost .
you need to create the tables to store the user information and its blogs.
**Read the tutorial and concept in the following links :
The data model corresponding to the Users
and for the blogs
and here the blogs_id is the foreign key to the users database.
you have the following commands to run in the SQL command table :
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
user_email TEXT UNIQUE NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
blogs_created TEXT[]
);
CREATE TABLE blogs (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
user_id UUID NOT NULL REFERENCES users(id),
title TEXT NOT NULL,
content TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
[x] Adding the support to register the signup form to create an authentication request in supabase for users to login using either using email + OTP.
[ ]
Then we need to connect this user authentication state with the backend DB of the supabase . you will do this without the need to know the SQL query language in detail along with integrating the features like [Object Relational Mapping]() using the packages known as type ORM (with their tutorial).username: string
Id : string (random value) and is declared as primary key
email : the email used for logging in