pyronear / pyro-api

Alert Management API for wildfire prevention, detection & monitoring. Built with FastAPI & PostgreSQL
Apache License 2.0
21 stars 9 forks source link

Clarifying data/state tables from event tables #304

Open frgfm opened 1 year ago

frgfm commented 1 year ago

I've been thinking about the relevance of some of the early tables we created. I identify the core purpose of the backend as:

Now think about the tables & columns involved in each stage:

Now since we have a lot of noise between events & alerts, I suggest considering the following table with their columns:

(we remove the legacy media, installations & notifications tables. and I think we should merge webhooks & recipients)

In order to see more clearly, I can set an APM like PostHog to be able to explore events. That should help us figure out which tables are still relevant afterward.

What do you think?

frgfm commented 11 months ago

Also, we definitely need to add authentication requirements on notifications & recipients routes if we keep them :sweat_smile:

blenzi commented 11 months ago

Both are protected for admin scope. You probably didn't notice here and here.

image

frgfm commented 11 months ago

Oh I didn't see the router-level dependency, my bad :+1: