Closed Melchyore closed 3 years ago
Before I jump to other details, a quick question.
Do you want actions like sending emails
, firing events
to be scoped to a request?
Before I jump to other details, a quick question.
Do you want actions like
sending emails
,firing events
to be scoped to a request?
@thetutlage since we don't know when emails are sent, it would be a great idea!
But what about events? I think there could be something like Event.on('any', cb)
to catch all events and log them using the callback, does it?
Here we go https://github.com/Melchyore/adoscope !
For now it handles only requests and database queries.
@thetutlage do you have any other question(s)?
Brief history
If you've already worked with Laravel, you've certainly heard about Telescope, a wonderful tool to debug your web application.
It logs everything about your application (requests, commands, exceptions, DB queries, etc).
Adoscope = Adonis + Microscope
What problem does it solve?
console.log()
everywhere, everytime. All will be accessible from one tab in your browser nearby your application.Proposal
Adoscope will be a 3rd party package... but is it a good idea? It will take full advantage of Adonis power?
Project code will be written using Typescript.
For now, I'm still new to AdonisJs and I don't know if I will be able to add all Telescope's functionalities to Adoscope such as logging adonis commands to Adoscope when they're executed from any shell, exceptions when they are thrown (any idea/help/link would be useful).
When sending request from client to server, Adoscope will look into the following informations : all request details (hostname, method, path, headers, payload), route details (controller, handler, prefix, middlewares, validators), session variables, views rendered (including engine used), event fired, queries executed and of course response.
Adoscope will store its data in database (can we choose another driver like memory, file, Redis?).
Adoscope will make use of AdonisJS WS package to send data to client. This way, if you are not focused on Adiscope tab and something happened, Adoscope tab will blink or whatever. It can be turned off and you can refresh Adoscope pages manually.
Client-side part will use VueJS and VueRouter.
Relevant links
https://github.com/Melchyore/adoscope
Telescope repository
Are you willing to work on it?
Yes, definitely!