-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initialized Firebase project and added config files
- Loading branch information
1 parent
55ad629
commit 47e6a67
Showing
13 changed files
with
6,744 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
rules_version = '2'; | ||
|
||
service cloud.firestore { | ||
match /databases/{database}/documents { | ||
|
||
// This rule allows anyone with your Firestore database reference to view, edit, | ||
// and delete all data in your Firestore database. It is useful for getting | ||
// started, but it is configured to expire after 30 days because it | ||
// leaves your app open to attackers. At that time, all client | ||
// requests to your Firestore database will be denied. | ||
// | ||
// Make sure to write security rules for your app before that time, or else | ||
// all client requests to your Firestore database will be denied until you Update | ||
// your rules | ||
match /{document=**} { | ||
allow read, write: if request.time < timestamp.date(2024, 10, 26); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"projects": { | ||
"default": "pageturners-a831a" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This file was auto-generated by the Firebase CLI | ||
# https://github.com/firebase/firebase-tools | ||
|
||
name: Deploy to Firebase Hosting on merge | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build_and_deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PAGETURNERS_A831A }} | ||
channelId: live | ||
projectId: pageturners-a831a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# This file was auto-generated by the Firebase CLI | ||
# https://github.com/firebase/firebase-tools | ||
|
||
name: Deploy to Firebase Hosting on PR | ||
on: pull_request | ||
permissions: | ||
checks: write | ||
contents: read | ||
pull-requests: write | ||
jobs: | ||
build_and_preview: | ||
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PAGETURNERS_A831A }} | ||
projectId: pageturners-a831a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
firebase-debug.log* | ||
firebase-debug.*.log* | ||
|
||
# Firebase cache | ||
.firebase/ | ||
|
||
# Firebase config | ||
|
||
# Uncomment this if you'd like others to create their own Firebase project. | ||
# For a team working on the same Firebase project(s), it is recommended to leave | ||
# it commented so all members can deploy to the same project(s) in .firebaserc. | ||
# .firebaserc | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# dataconnect generated files | ||
.dataconnect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"firestore": { | ||
"rules": " firestore.rules", | ||
"indexes": "firestore.indexes.json" | ||
}, | ||
"functions": [ | ||
{ | ||
"source": "functions", | ||
"codebase": "default", | ||
"ignore": [ | ||
"node_modules", | ||
".git", | ||
"firebase-debug.log", | ||
"firebase-debug.*.log", | ||
"*.local" | ||
] | ||
} | ||
], | ||
"hosting": { | ||
"public": "public", | ||
"ignore": [ | ||
"firebase.json", | ||
"**/.*", | ||
"**/node_modules/**" | ||
], | ||
"rewrites": [ | ||
{ | ||
"source": "**", | ||
"destination": "/index.html" | ||
} | ||
] | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
service cloud.firestore { | ||
match /databases/{database}/documents { | ||
// Allow read and write access to authenticated users | ||
match /{document=**} { | ||
allow read, write: if request.auth != null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
*.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* Import function triggers from their respective submodules: | ||
* | ||
* const {onCall} = require("firebase-functions/v2/https"); | ||
* const {onDocumentWritten} = require("firebase-functions/v2/firestore"); | ||
* | ||
* See a full list of supported triggers at https://firebase.google.com/docs/functions | ||
*/ | ||
|
||
const {onRequest} = require("firebase-functions/v2/https"); | ||
const logger = require("firebase-functions/logger"); | ||
|
||
// Create and deploy your first functions | ||
// https://firebase.google.com/docs/functions/get-started | ||
|
||
// exports.helloWorld = onRequest((request, response) => { | ||
// logger.info("Hello logs!", {structuredData: true}); | ||
// response.send("Hello from Firebase!"); | ||
// }); |
Oops, something went wrong.