TraceKey

TraceKey

8 devlogs
13h 45m
Created by Joel Joby

I project to get the IP and device information of all those who visit your site!!

Timeline

Earned sticker

OKAY SO I def did a few things I added the feature where all users can get the projects they are associated to basically there is an intermediate table in postgres and i used innner join to join the table at projects and user_projects table and it returns the required information from the table like project name and all those stuff

Update attachment

so i finally made a few stablity changes to gracefully handle errors so what happens is that if a user changes the auth key or something i dint want some error or misconfiguration so whati did was if the auth_key was invaild i would just redirect the user to a page from where he can re-login IT TOOK SOO MUCH TIME CUZ SERVER SIDE RENDERING SERVER SIDE CODE RUNNING WTF I HAD NO CLUE but i still managed to do it and yea

Update attachment

THIS WAS SUCH A PAIN OKAY SO I DINT KNOW SSR AND MIDDLEWARE HOW IT WORKS IN NEXT.JS. so im like okay middleware will fetch the details for the user from the user id and it can pass it on to the components and render the page but turns out thats not how it work apparently the middleware is distributed or edge Runtimewhich means its going to run on an container like its going to run in the browers so i cant use any node.js modules im like whattt cuz the concept of middleware changes in that case okay im like ill do SSR and then i learn ssr but turns out i did ssr of page based routing but i was using app based routing and i did it for app based routing and got user data based page generation

Update attachment

WORKED A LOT ON MAKING THE CODE MODULAR I CUT THE API ROUTE FROM 100 to JUST 15
and i created more and more functions and split the code here and there and made a few more components and extended the error object to a validation error object and i made error handling 10x simpler. also created the projects page

Update attachment

So I had some pending work in the login page I had to show the loader when the request was being made so yea I added in there I also added the setCookie featues where the backed would set authKey after I did that I started creating the dashboard page (allso added a redirect on successfull login) and did a bit of the dashboard played with color themes etc..

Update attachment

Okay so I worked for a while A LONG WHILE so I have my server for postgres on nest so managing that rn so i connected my next.js project to postgres on nest for some reason I dint have a problem at all connecting it to postgres even tho it was my first time doing it but with that being said that was done I also had to make a few changes to my validation function cuz i was performing the same validation on the server side as well incase someone get hold of my api he should not be able to manupulate it so that was added after that I created the function to add the user and then I also had issues when the email was same cuz i had 3 layers of function and the 1st layer would only get that error of duplication cuz im stupid long story on why im not passing it but yea i had to create an extended version of ValidationError and then passed it thru the layers. and also showed on on the user fronted YAYA!! and in addition I also hosted it on vercel at trackey.joeljoby.com/signup for the progress i did today AYYA

Update attachment

Okay So i sat for a while and decided to make a production ready stable application so or that I needed to create a strong filteration and stuff while logging in so i wrote the code to connect the frontend with client side js so once the button is clicked I take the inputs and i sanitize them and now i need to make the api so that it can interact with my server to create the user YAYY

Update attachment

OKAY SO i finally started the developement for this and I got a good color theme of
https://colorhunt.co/palette/647fbc91adc8aed6cffafdd6
yea its pretty good enough so based on this I started creating my Sign-Up page but before that I had decided on the stack so I was gonna use Next.js framework along with Postgres SQL as backend mostly will use it from nest it self. and then I decided on a structure for the database and stuff also i strated creating the Sign-up page but midway throu i realsied work was being tracked on the wrong project and i was cooked cuz i lost 1hr of time for tihs project to be logged but i moved on and then added a sign-up page It looks pretty decent

Update attachment