API of the resource and volunteers management app of DSU (Dispeceratul pentru Situatii de Urgenta)
DSU (Departamentul pentru Situatii de Urgenta) needs a digital tool to manage the resources it has at its disposal, their location, as well as the volunteers and NGOs that are registered to offer help during a crisis situation. The aim of this project is to offer a better management solution so that DSU is better prepared for an emergency situation.
Contributing | Built with | Repos and projects | Deployment | Feedback | License | About Code4Ro
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.
You can also list any pending features and planned improvements for the project here.
PHP
Laravel
Composer
CouchDB
Client of the API: https://github.com/code4romania/rvm-client
Install composer dependencies
$ docker run -v ${PWD}/src:/app -w /app composer:latest composer install --ignore-platform-reqs --no-scripts --no-interaction --prefer-dist --optimize-autoloader
Copy environment variables and start the application
$ cp src/.env.example src/.env
$ docker-compose up
Setup CouchDB single-node here: http://localhost:5984/_utils#setup or do it manually by running:
$ docker exec -it rvm-api_app_1 sh -c 'curl -X PUT "http://$DB_USERNAME:$DB_PASSWORD@$DB_HOST:$DB_PORT/_users"'
$ docker exec -it rvm-api_app_1 sh -c 'curl -X PUT "http://$DB_USERNAME:$DB_PASSWORD@$DB_HOST:$DB_PORT/_replicator"'
$ docker exec -it rvm-api_app_1 sh -c 'curl -X PUT "http://$DB_USERNAME:$DB_PASSWORD@$DB_HOST:$DB_PORT/_global_changes"'
Run database migrations
$ docker exec -it rvm-api_app_1 php ./database/migrations/v_1_0_0.php -c migrate
Generate app secret key, and personal access client keys
$ ./scripts/artisan.sh key:generate
$ ./scripts/artisan.sh optimize
$ ./scripts/artisan.sh passport:install
Seed the database
$ docker run -v ${PWD}/src:/app -w /app composer:1.9.0 composer dump-autoload
$ ./scripts/artisan.sh db:seed --class=CourseNamesTableSeeder
$ ./scripts/artisan.sh db:seed --class=InstitutionsTableSeeder
$ ./scripts/artisan.sh db:seed --class=ResourceCategoriesTableSeeder
$ ./scripts/artisan.sh db:seed --class=CountriesTableSeeder
$ ./scripts/artisan.sh db:seed --class=CountiesTableSeeder
$ ./scripts/artisan.sh db:seed --class=CitiesTableSeeder
$ ./scripts/artisan.sh db:seed --class=StaticsViewsSeeder
$ ./scripts/artisan.sh db:seed --class=UsersTableSeeder
$ docker-compose up
L5-Swagger has been bundled which is a Laravel 5 - Swagger integration that works out of the box.
To parse new API route definitions, you need to publish a new version of Swagger definitions
$ ./scripts/artisan.sh vendor:publish --provider "L5Swagger\L5SwaggerServiceProvider"
To see all API definitions, hit the /api/documentation endpoint of the server.
TBD
- Request a new feature on GitHub.
- Vote for popular feature requests.
- File a bug in GitHub Issues.
- Email us with other feedback contact@code4.ro
This project is licensed under the MPL 2.0 License - see the LICENSE file for details
Started in 2016, Code for Romania is a civic tech NGO, official member of the Code for All network. We have a community of over 500 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.ro.
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.