Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New GUI/WebUI #254

Closed
runout-at opened this issue Apr 24, 2018 · 12 comments
Closed

New GUI/WebUI #254

runout-at opened this issue Apr 24, 2018 · 12 comments

Comments

@runout-at
Copy link
Contributor

Hi!
From another issue i learned that there is a plan for a new UI.
I just started to use Flask. And Vexim seemed to be a good first project.

  • What do you think about it?
  • Ideas for features?
  • Wanted changes from the old UI?

Please contribute in the Wiki:
https://github.com/vexim/vexim2/wiki/WebUI-GUI-in-Flask-Python3

Some screenshots from what i already have will come soon.
The code i 'll publish (GPL) when most of the old features are implemented.

Right now i have

  • Full login support for Siteadmin, Postmaster and Users with a role System.
  • List-Views for Domains and Accounts.
  • Enable/Disable for Domains and Accounts.

Still missing are all views for editing anything.

My intention to switch from PHP to Python3/Flask is to have better security and easier code. After some hours coding Flask i was impressed how straight forward it is to bring up a new WebUI with SQL-Backend.
The SQL-Databases are maintained through SQL-Alchemy and Flask-Migration. This way it's not necessary to maintain different Create/Upgrade scripts for different SQL-Backends.

Markus

@rimas-kudelis
Copy link
Collaborator

rimas-kudelis commented May 6, 2018

I personally have very little experience with Python, so I can't weigh in much about it or its frameworks. But we aren't tied to PHP of course, and Python seems like an acceptable alternative.

I do have a few more generic thoughts/ramblings though, here they are, in quite random order.

  • I have my reservations about GPL being the chosen license.
  • I also have my reservations about this "I just started using X, let's use it for this project Y!" pattern that we're often prone to exhibiting. :) I had never heard of Flask until you mentioned it, but looking closer, it seems like it's been around for years already and hasn't died off yet, so at least from the popularity perspective, it's probably suitable.
  • Don't be too shy, go on publish your current version of the code. ;) And if it doesn't do everything yet, I think in a sense this is even better: while everyone could see what the code and UI looks like, forks would be less likely at this stage, and less of your time would be invested in case we'd decide that we don't actually like Flask.
  • It would be a good idea to brainstorm/collect the list of features (existing and especially new ones) the new Vexim should have, before diving into too much coding. Same goes for requirements. Basically, we should have some sort of a spec, or shared vision. Without it, it looks like the rewrite is just being done for its own sake.

Here are a few ideas from the top of my head that I wanted to do for Vexim 3 on top of what we have in Vexim 2:
Functional:

  • responsive UI
  • easier UI customization (e.g. Exim4U are using their own logo and name everywhere)
  • plug-ins
  • command line interface
  • web API (web UI could then just use this API)

Technical:

  • separation of logic and UI
  • easier DB migrations, ideally, with multiple database support
  • automated tests

Also, there are a few pages in this wiki, where @ikonia once tried to collect requirements for 2.3, this might also give you some ideas. And our mailing list archives too.

@runout-at
Copy link
Contributor Author

I agree and most of your points are on my mind too.
see https://github.com/vexim/vexim2/wiki/WebUI-GUI-in-Flask-Python3

The only thing i'm not sure about is how to separate logic and UI in Flask completely.
Actually i like the idea of separating logic and UI a lot.

What are your thoughts about GPL? What would you like instead?

To look into Flask was my decision based on its popularity and because it is more lightweight than Django. PHP is no option for new code anymore (for me).

@Udera
Copy link
Collaborator

Udera commented May 8, 2018

First of all, great thing to take an initiative in testing a new web-ui of vexim.

Regarding the use of python: I don't have any experiences programming web-stuff there, I used it only for a bit of data-processing. Only doubts I had:

  • Installation is perhaps a bit more complicated than a standard LAMP server
  • you probably still need php for other stuff (webmail) and if you want to have plugin, you will have to write them in php

Features:

  • I'd like to have 2-Factor-Authentication (U2F) for the web-interface. I'm not sure if there is a favorable way in terms of language or framework.
  • other authentication backends on the long term (ldap)

I recently saw a mailadmin interface in python with django: https://github.com/schmitzcomputer/django-cyradm/tree/master/django-cyradm

Django might offer way too much for our little application and Flask could be a good choice. We should have a closer look into it if all the technical requirements (rimas) are fulfilled. If you already have a few code snippets from your tests, this would allow us as well to play around with it. @runout-at can you put it in your github account or should be use a separate branch here?

Regarding the license, the current license is very open (you need to keep the copyright disclaimer). I don't want to make secret modifications, so personally I don't really care, some users of the current version of vexim perhaps?

@runout-at
Copy link
Contributor Author

I updated the wiki page https://github.com/vexim/vexim2/wiki/WebUI-GUI-in-Flask-Python3 with your input.

Mailman3 is already in debian stretch-backports and i had a few tests on it. Its django code eats up a lot of memory (2GB RAM minimum). Installation of the debian packages do not work out of the box right now.

Do we have a description of mailman integration in vexim? I'm not sure what is to be implemented.

I don't care too much about the license type. But maybe we should discuss that in a different thread #258.

Right now i have the code on gitlab.com in a private repo as this is my preferred way to start new code.
I will setup a test system and publish the code next week after some cleanup and dropping private information from it.

@runout-at
Copy link
Contributor Author

I just published the code (some features are still broken):

https://gitlab.com/runout/veximpy

It brings some bash scripts for setting up the Python3 environment and DB-setup/migration. This way it should be possible to setup a test server in about 30 minutes.

See the README for instructions.

Let me know if something is not clear.

@runout-at
Copy link
Contributor Author

runout-at commented Jun 2, 2018

i have a testing system online:
s: v.runout.at
u: siteadmin
p: veXimpy-1

creating/editing domains should work.
creating/editing accounts is still WIP.
there is no mailserver behind this. its only playing with the database.
feel free to play :)

@runout-at
Copy link
Contributor Author

creating, editing local accounts should work now.
some more tests (pytest -v)
lots of bugfixes and code rewriting

@runout-at
Copy link
Contributor Author

runout-at commented Jan 21, 2022

I maintain all my projects on GitLab but i could try to setup a push mirror if that is sufficient. (I have no experience with such a setup).

One thing I did not care about is the group-feature.

Most other features should be there.

Edit:
Just tried to propose (transfer?) the repo https://github.com/runout-at/veximpy to the vexim organisation but it says I'm not allowed to do so.
The mirroring from GitLab to GitHub did work but I'm not sure if I need a new access token after moving the repo to the organisation.

@rimas-kudelis
Copy link
Collaborator

Hi @runout-at! I've invited you to the organization. I think you'll be able to transfer the repo if you accept that invitation.

We could also update the readme with a link to your project.

@runout-at
Copy link
Contributor Author

@rimas-kudelis thanks!

The repo is now in the Vexim-organisation: https://github.com/vexim/veximpy
And will be synced from the GitLab repo.

@rimas-kudelis
Copy link
Collaborator

I've updated repo description already, and added a link to the original repo to the README.

Do you want to keep this issue open? It's kinda turning into a discussion, so maybe starting a new one in the Discussions tab would be a better choice than keeping this open?

@runout-at
Copy link
Contributor Author

Thx!. I'll close it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants