https://github.com/sjdiego/budget-requests
A example project using Laravel that uses testing and Vue frontend to display a simple form to request a budget to make a home reform
https://github.com/sjdiego/budget-requests
api-rest docker-containers laravel-framework swagger vuejs
Last synced: about 2 months ago
JSON representation
A example project using Laravel that uses testing and Vue frontend to display a simple form to request a budget to make a home reform
- Host: GitHub
- URL: https://github.com/sjdiego/budget-requests
- Owner: sjdiego
- Created: 2021-02-17T11:41:04.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-17T11:41:25.000Z (over 5 years ago)
- Last Synced: 2026-04-25T12:06:32.796Z (2 months ago)
- Topics: api-rest, docker-containers, laravel-framework, swagger, vuejs
- Language: PHP
- Homepage:
- Size: 336 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example project
This is an example of Budget request form made for an old recruitment process
where I have been [ghosted](https://en.wikipedia.org/wiki/Ghosting_(employer)) due to COVID-19 pandemic.
## Installation
* Go to the root folder and use `docker-compose exec php composer install -vvv -d /usr/local/apache2/htdocs`
* Create a .env file using `cp .env.example .env`
* Edit data of .env file using the correct data for your environment
* Follow steps of __Database migrations and seeding__
* If you find permissions problems, you can issue this command: `docker-compose exec php chmod -R 777 /usr/local/apache2/htdocs/storage`
* Set encryption key with `docker-compose exec php php /usr/local/apache2/htdocs/artisan key:generate`
* `npm install && npm run dev`
## Docker environment
To execute this application, you can use Docker containers provided with the *docker-compose.yml* file.
You can bring up docker containers with command `docker-compose up -d`
API will be listening on http://localhost:8080/api
## Database migrations and seeding
You can create tables and fill up with dummy data before executing tests using the following commands:
* `php artisan migrate`
* `php artisan db:seed`
If you use docker environment, you can use:
* `docker-compose exec php php /usr/local/apache2/htdocs/artisan migrate`
* `docker-compose exec php php /usr/local/apache2/htdocs/artisan db:seed`
## Frontend landing
Budget request form is placed on root of folder, so you can access it directly on http://localhost:8080 using docker
## Tests
You can run tests with the following command:
* `docker-compose exec php php /usr/local/apache2/htdocs/vendor/bin/phpunit /usr/local/apache2/htdocs/tests --testdox`
## Documentation
Using docker containers, you can check the Swagger documentation directly on http://localhost:8080/api/documentation,
where you can test each endpoint.
If you need the json of the api, you can get it on http://localhost:8080/docs