Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Proiect civic care unește eforturile și ajută oamenii aflați în situații nefavorabile în timpul pandemiei COVID-19

License

Notifications You must be signed in to change notification settings

code4moldova/voluntar-backend

Repository files navigation

Voluntar.md

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.

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.

Application Structure

├── backend
│   ├── app.py
│   ├── endpoints
│   │   └── __init__.py
│   └── static
│       └── swagger.yaml
├── docker-compose.yml
├── Dockerfile
├── Pipfile
├── Pipfile.lock
└── README.md

Class diagram

Built With

Flask

Programming languages

Python 3

Run & Development

Docker

Docker is used to run the development version, so you'll need to install Docker and docker-compose.

In case you are using WSL with Docker for Desktop (version 2.2.0.4) on Windows: you need to have your repository on the Windows file system rather than on the WSL one because otherwise the volume won't be mounted (solution inspired from this work around: docker/for-win#2151 (comment))

  • change the docker-compose.yml variables
$ docker-compose up

Init database with some users

cd backend && flask init-db

You can login with default admin user. email: ureche@example.com, pass: 123456

Pycharm

To run the application using Pycharm you need to install MongoDB Community Edition following steps from documentation. Steps below work for all OS where Pycharm is available.

  1. Install pycharm community edition
  2. Open the project in pycharm
  3. Open terminal from pycharm Alt+F12 or View -> Tool Windows -> Terminal
  4. Install pipenv from terminal if it's not installed yet:
    $ pip install pipenv
    
  5. Install dependencies from Pipfile
    $ pipenv install
    
  6. Add new configuration for python: Run -> Edit Configurations... -> + -> Python
  7. Change option "Script Path" to "Module Name"
  8. Enter "flask" in input for "Module Name"
  9. Enter run in input "Parameters"
  10. Open and add new Environment variables:
    • FLASK_APP=app.py
    • FLASK_DEBUG=1
    • SECRET_KEY=whatever
    • DB_HOST=localhost:27017 (If you are using another port, change to your one)
  11. Press Ok
  12. To init databases execute command in terminal from Pycharm

Feedback

  • Request a new feature on GitHub.
  • Vote for popular feature requests.
  • File a bug in GitHub Issues.
  • Email us with other feedback contact@code4.md

License

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

About Code4MD

Started in 2020, Code for Moldova is a civic tech NGO. We have a community of over 100 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 contact@code4.md.

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 Moldova and the world a better place. If you want to support us, you can do it here.

About

Proiect civic care unește eforturile și ajută oamenii aflați în situații nefavorabile în timpul pandemiei COVID-19

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages