ddavness / power-mailinabox

A Mail-in-a-Box with extra capabilities and more customizability. Not just for power users!
Creative Commons Zero v1.0 Universal
168 stars 32 forks source link

Admin panel refactoring: Electric Boogaloo #43

Closed ddavness closed 1 year ago

ddavness commented 2 years ago

This is a deeper refactor on the admin panel. The main goals of this PR are:

There won't be many changes (if any) to the aesthetics of the panel on this PR.

ddavness commented 2 years ago

Code Guide in a nutshell for the management daemon

ddavness commented 2 years ago

The current authentication model of the admin panel can be done in three ways:

I'll be looking to overhaul this to make stuff more consistent (and likely more secure too):

ddavness commented 2 years ago

The new authentication model and flow seem to be working nicely so far :)

ddavness commented 2 years ago

Right now I'd be surprised if things work at this state :upside_down_face:

ddavness commented 2 years ago

Oh hey, it's working surprisingly well so far! I'm suspicious now

ddavness commented 2 years ago

Further looks at the code tell me that we probably can do some optimizations on the API we're exposing - however this will create breaking changes as certain API endpoints will be removed. Some immediate examples include:

There might be something for the DNS endpoints, too. Bottom line - Both due to this refactor and due to the refactor on the authentication system, software interfacing with the Mail-in-a-Box admin API WILL break with this version of Power Mail-in-a-Box;

ddavness commented 2 years ago

There won't be many changes (if any) to the aesthetics of the panel on this PR.

Ok, I might have lied a bit when I said that. There will be some changes to the layout to make the user experience more consistent. But nothing too much out of the ordinary.

ddavness commented 2 years ago

One of the things also being worked on is a much more extensive form validation process. Forms will be validated client-side before any data is sent to the server (the data will of course be checked again server-side).

If any issues pop-up during validation, they'll be presented to the user like this:

image

The server should also provide it's own information in case server-side checks do fail.

ddavness commented 2 years ago

That's aliases done. On to (checks notes) DNS!