Repo that is used by the Aanbod Team to do job interviews.
In this assignment we are going to:
- Read a CSV file
- Publish the listings to Google PubSub
- Read from PubSub and write the data to Firestore
The code is already implemented, only not in a very object oriented way.
First make sure to install Docker. Then, to install everything:
make installThis will build a php container, a Firestore emulator, and a PubSub emulator.
The application consists of 3 commands. You can run them inside the php container:
make up
docker compose run --rm php sh(This will automatically start the PubSub and Firestore emulator)
Step 1: import data from the CSV file:
bin/console listings:importStep 2: process the imported data (from PubSub):
bin/console listings:processStep 3: show the processed data (from Firestore):
bin/console listings:showYou can also run all steps sequentially:
make run
To run the tests:
make test