API Analytics banner

API Analytics

38 devlogs
31h 31m 35s

API Analytics site is a developer tool that helps you to watch and how your backend api are being used . we can monitor users request logs and block theme if they send unwanted requests . we can also detect suspicious behavior and debug the error …

API Analytics site is a developer tool that helps you to watch and how your backend api are being used . we can monitor users request logs and block theme if they send unwanted requests . we can also detect suspicious behavior and debug the error . For first and concurrency . i built it with go and react techstacks

This project uses AI

Used AI to Enhance UI . used github copiolet in some debugging in code and for README file

Demo Repository

Loading README...

jaisondavidm.cs25

Shipped this project!

I Built a API Analytics Site . it is a solid backend focused fullstack project . if your a backend dev i will love this . This Site is a tool for dev to monitor user logs , detect suspicious behavior . Like a professional monitoring admin panel , The Challending part is deploying to internet. because it is not a simple frontend only project . it contains frontend , backend and database . after sturgling for hours i deployed it properly . I am proud of that i learned more things in backend like ip address tracking , cookie setting , Authentication system , Deployement needs and etc,.. .

jaisondavidm.cs25

I am perfectly done all things in both the frontend and backend . but there is a minimal invisible bug in cookie setter so i used copliolet to solve it

Attachment
0
jaisondavidm.cs25

I optimized Backend and Frontend because i ready to deploy in it in render . and implemented lazy loading in some part of frontend code

Attachment
0
jaisondavidm.cs25

Using Mutex which is inside sync package in go . i made a ratelimiter which will allow one users 100 request per minute not more than that . here the count will store in memory in the server .

Attachment
0
jaisondavidm.cs25

Added Ban system in Both backend and frontend . handling ban , unban and ban status . but in production i added fake ban and delete system to make the System fair . and just a happieness to all users . like the analytics features

0
jaisondavidm.cs25

Added Delete Option in Both Frontend and Backend . currently in userList I currently dont soft delete because of i will deploy in production

Attachment
Attachment
0
jaisondavidm.cs25

Added Guest card button . it is not just bypassing login . it will auto generate user_id and password and register it and allow you login . And i User TiDB so i add a banner to use private network . because TiDB sometimes not works with organisation network . the password is the letters after the _ after userid

Attachment
0
jaisondavidm.cs25

Added Docker setup to the site . it will solve the problems like its work in my pc but not in yours why . using docker container setup , we can solve this . it provide a stable production level setup

Attachment
0
jaisondavidm.cs25

Finally , I Written Properly ReadMe file . With the help of claude . not completly with AI . i just use the knowledge of it and enhance it with my own content and somewhat with AI

Attachment
0
jaisondavidm.cs25

The big isssue i converted my localhost mysql to tidb cloud . Using the help of reading research paper about mysql production level optimization . i tried my best to optimize it . Looking forward to production level project

Attachment
0
jaisondavidm.cs25

MySql localhost is converted to tidb mysql . But it feels slow i will optimize it in soon . The problem in connecting tidb is to including certificate to get db access . but i already done it properly and clearly

Attachment
0
jaisondavidm.cs25

With the help of Lucide react , Enhanced the UI of the Profile Page

Attachment
0
jaisondavidm.cs25

Improved UI in Country usage page and Daily usage page . some few part with the help of chatgpt but not compeletly with it

Attachment
Attachment
0
jaisondavidm.cs25

enhanced the UI in the pages All users usage , my usage pages to enable better User experience

Attachment
Attachment
0
jaisondavidm.cs25

I am not Good UI designing so with the help of chatgpt i enhanced my old UI into professional one . currently i enhanced home,logs pages . later i will enhance all pages

Attachment
Attachment
0
jaisondavidm.cs25

Added New Ui to Navbar . Currently I love the effect i done in this navbar . I knew that it was not that much special . but it is improvement for me

0
jaisondavidm.cs25

Added DailyUsage and CountryUsage page . You can see date based dailyusage total requests showing . Handling the backend API in frontend Sounds Good . i Am while receving the expected output i thinked

0
jaisondavidm.cs25

Added Analytics page with tab switching between My API usage and All users API usage . first i created backend endpoints . but for this frontend i changes some in backend apis with to sink with frontend

0
jaisondavidm.cs25

Added ip-api api to get the exact current from him/her ip . and added fallback if api fall . and store the ip in memory cache to reduce api call and fast response

Attachment
0
jaisondavidm.cs25

Add Analytics page . in this currenly added total request and last request details of the logged in user

Attachment
0
jaisondavidm.cs25

Added and Loaded All endpoints from backend to frontend . currently users list page is done . u can see all users details . the ip is currently ::1 beacause i currently running it in localhost . in production , it will correctly show the ip address

Attachment
0
jaisondavidm.cs25

Added Profile Page Using Me Route in Backend . Just a simple UI . i am basically not good at frontend . if it feel bore . sorry guys

Attachment
0
jaisondavidm.cs25

Added APIs to see the usage of the users and overall . nearly built 6 endpoints . Collabaring with all tables in the database

Attachment
0
jaisondavidm.cs25

create tables for storing usage seperatly like country level , user level , endpoint level . using gorm the tables will automatically created . Add handlers to store the usage in the table . in last stage , i used github copiolet to solve one minor error

0
jaisondavidm.cs25

Just done a my own responisve navbar for mobile view . and enhance the all UI parts with the help of framer motion package . and desigined table schema to extend the functionality in the site

0
jaisondavidm.cs25

Enhanced The UI using Framer Motion . Better Enhacement in UI to engage the User . Making the UI Professional

0
jaisondavidm.cs25

Written proper frontend code for the testing API . user can send test APIs with GET , POST , PUT , PATCH method . left side of the screen wil show lives api logs and in right side we can send requiest to check the API logs . still it have some status code issues . I will Fix it

0
jaisondavidm.cs25

Added testing apis for all get,post,delete,patch,put method . and the hard part is after testing using k6 . i have to debug some payload . that part only feels some waht hard

0
jaisondavidm.cs25

Modifed the routes to show the logs properly . And made UI to list the API logs . i currently fixed all role to see all logs . hide the password in login and register post . The hard part is UI alignment . But after struggling for an hour , finished it !!

0
jaisondavidm.cs25

Not only writing code and seeing the output . using k6 testing tool i tested my apis . and fix some error . from this , i learned to test the code which i written and how to test using k6 tool

0
jaisondavidm.cs25

Added backend to store the requests in database . not properly but applied and understand . will do better

Attachment
0
jaisondavidm.cs25

Convert only token into accesstoken and refreshtoken to improve better user experience . it is mostly used in big companies . i learned it and implemented in it .

Attachment
0
jaisondavidm.cs25

Make some change in UI for responisveness . properly build authentication flow like if jwt token is not exipry direct to home page . if try modify jwt navigate to login page . while testing there is some issues . i tried very much . but later i used github copiolet and fixed it and know about what error was that

0
jaisondavidm.cs25

Added Main Layout for this site . IN Log side admin can see all the request and analyse it . in request side for testing we can send dummy requests to see how it works

Attachment
0
jaisondavidm.cs25

Complete UI For Login and Register Page . SImple But My Backend Authentication is powerfull

0
jaisondavidm.cs25

Built a production level authentication login and register system . including last login ip address . soft delete system . jwt token in cookies to secure authentication

1

Comments

Darko Sabo
Darko Sabo 5 days ago

sick

jaisondavidm.cs25

Just setup database and make some health checkup code to test backend is running.

Attachment
0
jaisondavidm.cs25

Made Some basic UI . and initial setup for both frontend and backend

Attachment
0