A photo gallery using Symfony that renders React that fetches data from Firebase database.
npm install
npm install react react-dom prop-types --save
npm install firebase
composer require symfony/webpack-encore-bundle
to run webpack
npm run watch
to start the server
symfony server:start
Add your Firebase configuration to assets/components/firebaseConfig.js, see docs to do that here: https://firebase.google.com/docs/database/web/start
Without the config the gallery wont work.
Images are being fetched from Firebase Realtime Database using this model:
gallery: {data: {
1: {image: "add your Firestorage image Access token here", text:"some text"},
2: {image: "add your Firestorage image Access token here", text:"some text"},
}
}
Change the get request (line 24) and rendering (line 40) in Home.js if your model is different.
About image access tokens: https://stackoverflow.com/questions/61303497/how-can-i-retrieve-this-image-stored-in-firebase-storage
Entry file is opening the correct file
.addEntry("app", "./assets/app.js")
React Preset is uncommented
.enableReactPreset();
Free to use. If youre nice send me hi.