Giraffe
This is a React app with Redux and Next.js interacting with a Laravel API in a LEMP stack, a real-world full-stack example SPA.
- ACL (access control list)
- JWT authentication
- CRUD implementation
- REST API
- Redux
- Next.js
- Data-driven tests
- Docker setup
Set up the Environment
Create an .env
file:
cp .env.example .env
Bootstrap the development environment:
bash/dev/start.sh
Click here for further details on the start.sh
script.
Local Set up
Finally, don't forget to add the following entry to your /etc/hosts
file:
172.21.0.1 giraffe.local
To find out the IP of the giraffe_nginx
container:
echo $(docker inspect -f '{{range .NetworkSettings.Networks}}{{.Gateway}}{{end}}' giraffe_nginx)
The app can now run on your favourite web browser by typing https://giraffe.local into the address bar.
Run the Tests
docker exec -it --user 1000:1000 giraffe_php_fpm ./vendor/bin/phpunit
Screenshots
Figure 1. Homepage
Figure 2. Login page
Figure 3. Reviews page
Figure 4. Bob adding a restaurant
Contributions
Would you help make this app better?
- Feel free to send a pull request
- Drop an email at info@programarivm.com with the subject "Giraffe"
- Leave me a comment on Twitter
Thank you.