Almost 6.5 million animals enter shelters worldwide and 1.5 of which are euthanized. Adopting allows these animals to experience life again. Pets for you is an online application meant to help find shelter to stray pets. The application was built using React.js and Firebase.
DEMO: https://pet-adoption-54bb1.web.app/
To install it with docker, you only need to run the following command:
docker-compose up -d --build
docker-compose -f docker-compose.prod.yaml up -d --build
# Install the node packages
npm install
# Start the App in Development Mode
npm start
Replace the environment variables from .env
and enable authentication with email and password.
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write: if true;
}
}
}
database rules
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write;
}
}
}
You need to make sure the rewrites are enabled in your Firebase hosting configuration to redirect all requests to your index.html file. This assumes you are using create-react-app:
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"headers": [
{"source": "/service-worker.js", "headers": [{"key": "Cache-Control", "value": "no-cache"}]}
]
}
}