Open laureenas opened 9 years ago
I'd say, there is one major technical debt - CouchDB and a CMS based on CouchDB called django-sboard.
Originally one of ideas for manoseimas.lt project was to provide all collected data as open data and CouchDB with it's Futon interface seemed as a good idea. Still, primary database was MySQL and secondary - CouchDB used only for open data. Since I wanted to put into it as many open data as possible it ended up in CouchDB holding most of the date and MySQL was used only for private data - users and user votings.
Since CouchDB is purely supported by Django, I had to many things around and that how django-sboard born, serving Django admin purpose.
So why CouchDB has to be removed:
So all this slows any further development a lot.
To fix that, features that are still in use, should be migrated to MySQL, and other features should be removed.
To migrate everything from CouchDB to MySQL takes a lot of time and it is not worth of doing, because some of the functionality is no longer used. So the need to remove unused functionality just helps to get rid of CouchDB faster.
So it's not about cleaner code, it's about making manoseimas.lt project less painful to develop further.
I also listed some concerns about the production environment and the codebase in #76.
Inventory of URLs:
urls.py
valdymas/
- Django admin
votings/?
- votings for React
search.json
- AJAX search for CouchDB
accounts/
- social login?
./parts/django-sboard/sboard/urls.py
search/
- sboard search
media/*
- sboard media stuff
\<action>
\<action>.<ext>
\<action>/<name>
\<action>/<name>.<ext>
\<slug>
\<slug>.<ext>
./parts/django-sboard/sboard/profiles/urls.py
accounts/profile/
- sboard
profile
accounts/login/
- sboard login - no longer used?
accounts/logout
- sboard
logout
./manoseimas/mps_v2/urls.py
mp/fractions/?
- MP's faction list
mp/fractions/<fraction_slug>
- MP's faction
mp/parliamentarian/<mp_slug>
- MP's profile
mp/statements/<mp_slug>
- an ugly plain-text list of statements
mp/statements/<mp_slug/<page_slug>
- an ugly plain-text list of statements on page mp/statements/<mp_slug>/<statement_page>
mp/discussion/<statement_id>
- discussion statement from a stenogram
.manoseimas/mps_v2/json_urls.py provides JSON views for MPS V2:
/json/fractions
/json/mps/?
/json/mps/<fraction_slug>
/json/law_projects/<mp_slug>
discussion/<statement_id>
./manoseimas/widget/urls.py
widget/*
- widget stuff under ./manoseimas/widget/urls.py
Regarding django-sboard, the only way to get real urls, is to query CouchDB, and I think that would be useful thing to do.
Also I would add, that front-end part and the way how react is used now is a technical debt. We should: 1) Switch to webpack for JSX + ES6 transpiling. 2) Use ES6 and new React (15.x) 3) Use Redux or at least use state only on top level component => Refactoring for current components 4) Use React everywhere where JavaScript is needed. Now we have coffescript + handlebars in voting widget, jquery + ajax html injections in transcripts (stenogramos) ...
@sirex Has noted that the system could benefit from reducing technical debt. Two kinds of technical debt identified.
Functional debt - functions that have been included in the past but are not needed any more.
Under the hood debt - should not change functional behaviour but should make code cleaner.