Giter VIP home page Giter VIP logo

redirectioneaza's Introduction

Redirectioneaza

GitHub contributors GitHub last commit License: MPL 2.0

  • tax form #230 made easy
  • digital solution for an offline process
  • as simple and as efficient as possible
  • helps you compare and choose who to support
  • helps NGOs reach their public and keep track of their supporters

See the project live

Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.

Contributing | Built with | Deployment | Feedback | License | About Code for Romania

Contributing

This project is built by amazing volunteers, and you can be one of them. Here's a list of ways in which you can contribute to this project. If you want to make any change to this repository, please make a fork first.

Help us out by testing this project in the staging environment. If you see something that doesn't quite work the way you expect it to, open an Issue. Make sure to describe what you expect to happen and what is actually happening in detail.

If you would like to suggest new functionality, open an Issue and mark it as a [Feature request]. Please be specific about why you think this functionality will be of use. If you can, please include some visual description of what you would like the UI to look like if you are suggesting new UI elements.

Built With

Programming languages

Platforms

Frontend framework

  • HTML + CSS + JS + Bootstrap

Package managers

Database technology & provider

The project has been configured to work with the following databases:

Development

Compiling the CSS with less

Go to the backend/ folder and run the following commands:

nvm use --lts || nvm install --lts

npm i -g [email protected] [email protected]

cp -r bower_components/  static_extras/

pushd static_extras/

lessc css/main.less > css/main.css --clean-css="--s1 --advanced --compatibility=ie8"

rm -rf bower_components/

popd

or, in a one-liner:

pushd backend/ && nvm use --lts || nvm install --lts && npm i -g [email protected] [email protected] && cp -r bower_components/  static_extras/ && pushd static_extras/ && lessc css/main.less > css/main.css --clean-css="--s1 --advanced --compatibility=ie8" && rm -rf bower_components/ && popd && popd

Deployment

With Docker

  1. Go to the root of the project
  2. Run cp .env.example .env to create the environment file
  3. Run make run to start the containers with an SQLite database
  4. Open http://localhost:8080 in your browser

Feedback

License

This project is licensed under the MPL 2.0 License — see the LICENSE file for details

About Code for Romania

Started in 2016, Code for Romania is a civic tech NGO, official member of the Code for All network. We have a community of around 2.000 volunteers (developers, ux/ui, communications, data scientists, graphic designers, devops, it security and more) who work pro bono for developing digital solutions to solve social problems. #techforsocialgood. If you want to learn more details about our projects visit our site or if you want to talk to one of our staff members, please e-mail us at [email protected].

Last, but not least, we rely on donations to ensure the infrastructure, logistics and management of our community that is widely spread across 11 timezones, coding for social change to make Romania and the world a better place. If you want to support us, you can do it here.

redirectioneaza's People

Contributors

andreiio avatar andreisocrative avatar aniri avatar bertearazvan avatar bogdanivanel avatar bvizureanu avatar catileptic avatar ccorneliu avatar code4ro-github-bot avatar danniel avatar gabrielcramer avatar onel avatar raducstefanescu avatar tudoramariei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redirectioneaza's Issues

Trying to add an NGO that already exists crashes the page

Describe the bug
Trying to add an NGO that already exists crashes the page

To Reproduce
Steps to reproduce the behavior:

  1. Go to [Înregistrează ONG] with a new user (not the one that created the NGO)
  2. Use the name of an existing NGO
  3. Submit the new NGO
  4. See error

Expected behavior
A validation message blocking the user from submitting the form

Screenshots
image

Desktop (please complete the following information):
OS: [windows 10 pro Version 10.0.19045 Build 19045]
Browser [chrome]
Version [Version 120.0.6099.225]

Edit send button

As an NGO I want to receive a visual cue to know the changes I made to my profile have been saved. The "send" button is counterintuitive.
Maybe rename to 'Save'

Refactor logging

Look into a better way to capture logging from flask, db and standard logs

Delete an NGO's pre-filled form if its data changes

Is your feature request related to a problem? Please describe.

For each NGO, you can download a pre-filled donation form with that organization's information.
The form is generated on the first request and then stored to improve performance.
If the NGO updates its data, the form becomes out-of-date and needs to be redone.

Describe the solution you'd like

When any of the fields present on the NGO's form change, the file should be deleted.
It would be ideal that this task be async (using Django-Q2) to avoid waiting for S3 requests.

Additional context

We don't need to regenerate it. This will happen when a user requests it again.

Add pension checkbox in form

The 230 form can be used for both redirecting 2% of your income tax from your salary or other types of income, but also from your pension. Currently, users claim that they cannot check a box if they are retired. The form is valid just for salaries.

Show ANAF offices according to donor's city

This is a larger issue but the main parts are:

  1. Scrape the ANAF site to get the list of local offices and the city that "belong" to them
  2. Change the city input in the donation form to be autocomplete (and force the user to choose the city from a list)
  3. On the success page, display the correct ANAF office according the the donor's city.

Migrate the app to AWS

redirectioneaza.ro is built to work on Google App engine and it has a lot of dependencies on it..
In order to make the transition to AWS, all the connections to Google's platform must be stripped.

The main changes that need to be made are:

  1. migrate from Datastore to Postgres
    As a storage we use Datastore, the NoSql DB from google. I think Postgres would be a good replacement. This change would mean recreating the models, ORM and migrating all the data

  2. put a web server in front
    App engine offers their own web server. it also has auto scaling, etc

  3. remove other google deppendecies
    There are some places where it depends on importing google specific libraries. These need to be removed. For example: the email send backup, the storage, admin login, etc.

Optional changes. These are nice to have:

  1. google cloud -> S3
    All the documents/logos are stored on google cloud. S3 might be a good alternative

  2. migrate from webapp2 to flask
    webapp2 is a very stable micro framework but not very known outside of app engine. if a migration to flask would be necessary we can definitely take it into consideration

  3. Improve the auth section

  4. migrate from bower to npm/yarn

  5. migrate to python 3

County drop down selector has both Bucharest and Bucharest Sector 1, 2...6

Describe the bug
In the redirection form, the county drop down selector has both Bucharest and Bucharest Sector 1, 2...6

To Reproduce
Steps to reproduce the behavior:

  1. Go to the redirection form
  2. Click on Judet
  3. The drop down should only contain Bucuresti on its own, without the options for all the districts (sector 1, 2..6) but they both show up

Screenshots
image

Desktop (please complete the following information):
OS: [windows 10 pro Version 10.0.19045 Build 19045]
Browser [chrome]
Version [Version 120.0.6099.225]

Feature: add possibility to embed tags/parameters into an NGO’s link

Description:
Some NGOs need to collect more data about the circumstances in which someone handed in a 230 form using the platform. Using tags embeded as parameters in links and saving those tags would help NGOs do that.

Step by step behavior:
The NGOs should be able to create links like:
redirectioneaza.ro/NGO_NAME?tags=tag1,tag2,etc.
These tags should be saved when a form is sent.
These tags would be used as filters in each NGOs form list view.

Why this would be useful:
Many NGOs have some internal way of keeping track of collectod forms (who collected the form, where did they collect the form, etc.). It’s easy to implement your own system when collecting paper forms, not so much for the online ones.
Using the tag feature would give NGOs the freedom to incorporate such models easily.

[migrate to AWS] google cloud -> S3

redirectioneaza.ro is built to work on Google App engine and it has a lot of dependencies on it..
In order to make the transition to AWS, all the connections to Google's platform must be stripped.

google cloud -> S3
All the static assets (logos, etc) and the PDF documents that are created after a donor completes the form are uploaded to google cloud.
We would like to start using S3 for this

Export donor list from account

As an NGO I want to export the donors list from my account in an xls/csv format.

The export option should be near each year.

NGO URL not visible after saving NGO details

Describe the bug
NGO URL is not visible after saving NGO details on button Salveaza

To Reproduce
Steps to reproduce the behavior:

  1. After introducing details for a new NGO
  2. Click on 'Salveaza'
  3. URL field is empty. CTRL+C also does not copy anything.

Expected behavior
URL to be visible and available to be copied.

Screenshots
image

Desktop (please complete the following information):
OS: [windows 10 pro Version 10.0.19045 Build 19045]
Browser [chrome]
Version [Version 120.0.6099.225]

Improve the auth section

The auth section right now is very webapp2 specific.
After the migration to postgres is complete we should find a different way to do auth.

[migrate to AWS] migrate from webapp2 to flask

redirectioneaza.ro is built to work on Google App engine and it has a lot of dependencies on it..
In order to make the transition to AWS, all the connections to Google's platform must be stripped.

migrate from webapp2 to flask
webapp2 is a very stable micro framework but not very known outside of app engine. if a migration to flask would be necessary we can definitely take it into consideration

Optionally send the form by email to the NGO

Instead of requiring the user to print and send the form to ANAF or the NGO add the option to send it via email to the NGO who should take care of printing and submitting.

This will decrease the work that needs to be done to submit the form and encourage more users to do it.
There are alot of persons that postpone and forget or don't submit the form because of the extra work that needs to be done.

Flow:

  • We mark in the DB the NGOs that support this option
  • For NGO that support in the download form step we add a "Send by email" button
  • If the button is pressed we send an email with the form to the NGO
  • Congratulate the user and allow to share his deed on Facebook ...
  • When the time comes the NGO downloads all forms from email, prints and submits them to ANAF

What do you think?

[migrate to AWS] put a web server in front

redirectioneaza.ro is built to work on Google App engine and it has a lot of dependencies on it..
In order to make the transition to AWS, all the connections to Google's platform must be stripped.

put a web server in front
App engine offers their own web server. it also has auto scaling, etc

230 Form Autocompletion in Python

Hi there. Wasn't sure where to ask this. I know it's somehow off topic, but. I'm trying to help my friends from an NGO and automate the 230 form completion. I have a few questions about this, and I would really love to share my solution when it will be ready.

Questions?
Is there any way to automate this from Python? I know how to use pypdf, which although it might be the best solution it doesn't work properly.

Another method is using pikepdf, but then again, not sure how to handle the XML data attached to the document.

At this moment, I'm using pyautogui to automate clicks, copy & paste, etc. But isn't what I want in the end.

When I'm doing the following, the output is an empty dictionary.

from pypdf import PdfReader

reader = PdfReader("form_smart.pdf") 
fields = reader.get_fields() 
print(fields)
  • form_smart.pdf is the pdf given by ANAF: link
  • but when I'm doing the same thing with this type of PDF it works.

I'll be happy to discuss on this subject any time soon.
Thanks
Skyrov

[migrate to AWS] remove other google dependencies

redirectioneaza.ro is built to work on Google App engine and it has a lot of dependencies on it..
In order to make the transition to AWS, all the connections to Google's platform must be stripped.

remove other google dependencies
There are some places where it depends on importing google specific libraries. These need to be removed. For example: the email send backup, the storage, admin login, etc.

Ignore diacritics when performing a search

If a user types daruieste viata they should get Dăruiește Viață. (I sent an email to Dăruiește Viață asking them to add their NGO to www.redirectioneaza.ro)

Since it's not a perfect match I think we shouldn't highlight the result (i.e. Dăruiește Viață won't be highlighted if you search for daruieste viata)

Updating an NGO as Admin does not work

The code for updating an NGO first checks if the user already has an NGO. If the user has no NGO, then a new one is created. If the user already has an NGO, then that organisation is updated.

The problem is that there doesn't seem to be any way for the Admin account to edit another NGO. When one tries to update an existing organisation, the code tries to create a new NGO because the Admin has no NGO.

Add tags (for NGO activity field), and ability to filter after them

Having the NGO`s add tags to mark their field of activity or expertise, and allowing users to sort after these tags when they want to help an NGO from a specific field

If the tags are not present because it is a new field (e.g. NGO that handles a crocodile sanctuary) they can either create the tag, or write an email/request for this tag to be added.

Also adding the ability to sort after tags (single or multiple), so that the search result only displays selected NGO`s.

NGO donation form page updates

  • the URL should not be redirectioneaza.ro/ong/doilasuta, but, instead, simply redirectioneaza.ro/ong
  • the Title of the page should be the full human-readable NGO name

Email adress incorrect format doesn't underline the field in red (only for missing '@')

Describe the bug
In the redirection form, Email adress incorrect format doesn't underline the field in red (it does only for missing '@')

To Reproduce
Steps to reproduce the behavior:

  1. In the redirection form, write an incomplete email address
  2. Click on 'Salveaza'
  3. You will get the error but it will not underline the field where the issue was found.

Expected behavior
Underlining the incorrect field.

Screenshots
image

Desktop (please complete the following information):
OS: [windows 10 pro Version 10.0.19045 Build 19045]
Browser [chrome]
Version [Version 120.0.6099.225]

Add a way for the ngo to add activity area

From the account the ngo should be able to choose some domain that the ngo is active in, eg: health, education, etc.
He may choose more than one from a prepopulated drop down.

This requires front and backend changes.

Load NGO Logo throws an error after selecting file

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Inregistreaza ONG
  2. Click on Logoul ascociatie
  3. Select jpg/png and click Open
  4. See error

Expected behavior
Logo to have been loaded properly

Screenshots
image

Desktop (please complete the following information):

  • OS: [windows 10 pro Version 10.0.19045 Build 19045]
  • Browser [chrome]
  • Version [Version 120.0.6099.225]

When already logged in, the log in button is still displayed

Describe the bug
When already logged in, the log in button is still displayed after you click the site logo.
Also the Acasa button doesn't redirect to home, it keeps you in the Date asociatie form.

To Reproduce
Steps to reproduce the behavior:

  1. Log in
  2. Click on the website logo
  3. The navbar still shows the Log in button, making the user confused about his state of being logged in or not. Clicking the log in doesn't ask you to login again, it takes you to your NGO's link.

Expected behavior
Having the option to log in only when you are logged off as opposed to having 'Date cont' button available instead when you are logged in. Behavior is the same on the live website as well.

Screenshots
image

image
image
after clicking Log in:
image

Desktop (please complete the following information):
OS: [windows 10 pro Version 10.0.19045 Build 19045]
Browser [chrome]
Version [Version 120.0.6099.225]

[migrate to AWS] migrate from Datastore to Postgres

redirectioneaza.ro is built to work on Google App engine and it has a lot of dependencies on it..
In order to make the transition to AWS, all the connections to Google's platform must be stripped.

migrate from Datastore to Postgres
As a storage we use Datastore, the NoSql DB from google. I think Postgres would be a good replacement. This change would mean recreating the models, ORM and migrating all the data

Button "Descarca un model de formular" not functional

Describe the bug
Button "Descarca un model de formular" not functional

To Reproduce
Steps to reproduce the behavior:

  1. Go to one of the NGOs to submit a form
  2. On the bottom of the page, click on 'Descarca un model de formular'
  3. Page redirects to work in progress page

Expected behavior
Download the pdf form

Screenshots
image

Desktop (please complete the following information):
OS: [windows 10 pro Version 10.0.19045 Build 19045]
Browser [chrome]
Version [Version 120.0.6099.225]

Send Emails as background tasks

Sending an Email or performing any other action dependent on an external response is blocking the thread. This is also the case for any other process that takes longer.

Therefore a system of background jobs can be implemented. A great way to see this in action can be seen here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.