Skip to content

Commit

Permalink
great start
Browse files Browse the repository at this point in the history
  • Loading branch information
Creighcl committed Jul 5, 2021
1 parent 7e6a921 commit 657d775
Show file tree
Hide file tree
Showing 49 changed files with 5,010 additions and 65 deletions.
20 changes: 20 additions & 0 deletions ....github/workflows/firebase-hosting-merge.yml
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 merge
'on':
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_C_A_T_JOB_PORTAL }}'
channelId: live
projectId: c-a-t-job-portal
17 changes: 17 additions & 0 deletions ....github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_C_A_T_JOB_PORTAL }}'
projectId: c-a-t-job-portal
5 changes: 5 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rules": {
"react-hooks/exhaustive-deps": "off"
}
}
29 changes: 29 additions & 0 deletions .firebase/hosting.YnVpbGQ.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
logo.png,1625427838560,10a01971804be294b8c063276dbaa0e85932cebf527591d800f482874c4a7064
logo192.png,1621555568576,3ee59515172ee198f3be375979df15ac5345183e656720a381b8872b2a39dc8b
logo512.png,1621555568576,ee7e2f3fdb8209c4b6fd7bef6ba50d1b9dba30a25bb5c3126df057e1cb6f5331
manifest.json,1621556184359,0ce07d90a5c9e7377f540bed86c34817f16ed240a369ecdc1d882116ec65f973
robots.txt,1621555568576,bfe106a3fb878dc83461c86818bf74fc1bdc7f28538ba613cd3e775516ce8b49
browserconfig.xml,1625446725000,6acd655db9d0c9069f30156d37fc38c1bdd1b976d19a26f481f527efcd7055f8
android-chrome-192x192.png,1625446725000,376219fb8ddd6583a9a178e60534e7ebd1d835aa9c110c7133de38aa486e2ef3
asset-manifest.json,1625454808752,5583df266f989414eaed1d8ab025aa7af9d8fe309ae7bc6ef2c00bc53cefddc1
favicon-16x16.png,1625446726000,f76bd76ef0d19297bd10b5286845fa2499ae4c1bc597d0ec7aed4f5f7d7a0d37
apple-touch-icon.png,1625446725000,b730df80cf32b5bfbf19094b45f674556ab65cb4ef65898e821b52a36b0a88a5
favicon-32x32.png,1625446726000,fc7bf6e477b0be68f4859b001358a56cb922767e9ae67c02922bc9da8fb16401
index.html,1625454808752,0b4da56f509feea5823528517d248fc8b50340bf7511ec6554fc1494ab198df9
mstile-150x150.png,1625446727000,5e5a0816af98144d9484379cd2cfe27f2650458b1297fd535fb908c3f43fd8d8
site.webmanifest,1625446727000,82f20d239b271c14049c7ab847ac2a879ddbb328ea4bb750fa164f492331c900
static/css/main.7d972aab.chunk.css,1625454808753,5d83fa823ca659d38cf58b78b37def55e5b3183012bacf2cec1673406444e342
logo2.png,1625454716717,78e31395cf01d6060b5e6c27933558902699c3a4a04c05d3fd8833c36a9f4b86
static/css/main.7d972aab.chunk.css.map,1625454808768,3d94fc791e604dad45c1674387944d81224e130abc4ad44ab549a37023e84480
static/js/2.b1638150.chunk.js.LICENSE.txt,1625454808768,398f8c0fc4a72dce632dbc7fd10ce7946dbaec2bd387e64eeaa913f8cd797e22
safari-pinned-tab.svg,1625446727000,8f8815345e1d9f4781e3d487a2ef9ce73e8dc06a559168897efa889be7716e35
static/js/3.3d2892d1.chunk.js,1625454808768,c7d25aeb059bb060b2e1b0fda41bbd7521c9b13fef0f61c6bb9a402d52987619
favicon.ico,1625446726000,f9e9820d8fc0d777c1efbb97a02d83fe497b34fc21e9e478950869009661536a
static/js/3.3d2892d1.chunk.js.map,1625454808769,7ba5bf23ec2a45e84ee6e37e7a8a48fe662028088659c452f3c954fb9cedd123
static/js/main.9cda3fd5.chunk.js,1625454808768,3add7076f47247b9021abff0910f93d3b21393aab2ceb03d5232a9546323347b
static/js/runtime-main.48f7ee03.js,1625454808768,6490c894ccd43eebf4670477d92a5f6769f4eb5f1b60fd6b0feb18002c198665
static/js/runtime-main.48f7ee03.js.map,1625454808768,5c9e41f37f96467e84ad8dd48bd823caa219595949cbf02314809729bc12e5f8
android-chrome-512x512.png,1625446725000,03f328a8bd3601b2ea2120d0c7bad98a8356de948515a3468432d4a172a523ae
static/js/main.9cda3fd5.chunk.js.map,1625454808768,c58c71a0fa48bf0498a344f9fa9326b40f93f2e12581715048bc3a52e3fe266d
static/js/2.b1638150.chunk.js,1625454808768,e3af448bb1e481bffca3991f7b83364784b539af09d9797295ecd51ce5208ff2
static/js/2.b1638150.chunk.js.map,1625454808769,de7d76fc531e8e7e2513903b0fcdf35623df07d9983fabb6060c8e25d20be950
15 changes: 15 additions & 0 deletions .firebase/hosting.cHVibGlj.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
android-chrome-192x192.png,1621558830000,b08cb38b9bf42737ef07220defdf70125f479705591665a5534d51d4fb7b941b
android-chrome-256x256.png,1621558830000,ce34176776ecbf444eae9c9a57451be0e37572f27dab50dc8f58286c9fccc993
apple-touch-icon.png,1621558831000,4a56abb3484486961530e0ea639e24472566103f498aebfe874fc58d23624169
browserconfig.xml,1621558831000,6acd655db9d0c9069f30156d37fc38c1bdd1b976d19a26f481f527efcd7055f8
favicon-16x16.png,1621558831000,82ad998fb502bed36c13158ea794dfe0fe9e30bf2ddd4e875d1241766e49a5dd
favicon-32x32.png,1621558831000,2bd2d6b3e44bb4f5b5fe9493e49c7981800cb7164f9d668342801a108d7b87e1
favicon.ico,1621558832000,c8b594d55e422cd6983494e4d4a58f603729bd9a1e353179b55bd6477be4dcdc
index.html,1621558912116,bce28f9714f3ef9975498759c87b4874c02e876d60c95a1bebe8d05a92ebf077
logo192.png,1621555568576,3ee59515172ee198f3be375979df15ac5345183e656720a381b8872b2a39dc8b
logo512.png,1621555568576,ee7e2f3fdb8209c4b6fd7bef6ba50d1b9dba30a25bb5c3126df057e1cb6f5331
manifest.json,1621556184359,0ce07d90a5c9e7377f540bed86c34817f16ed240a369ecdc1d882116ec65f973
mstile-150x150.png,1621558832000,295c1360b65b42d097d1d46f062a42d02be958f6dc138bf7eea8903183c18b4c
robots.txt,1621555568576,bfe106a3fb878dc83461c86818bf74fc1bdc7f28538ba613cd3e775516ce8b49
safari-pinned-tab.svg,1621558832000,809049b0aeda1660f8ba5ae00da9b5ca57a30485eb8f1391805d59b99b8dae80
site.webmanifest,1621558832000,7ab3753411cf8c1f8c2231c60a0b8a882afdd14f58f08e41e5f1ef27cd23e6d9
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "c-a-t-job-portal"
}
}
35 changes: 35 additions & 0 deletions database.rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"rules": {
"billableitems": {
".read": "root.child('users').child(auth.uid).val() > 1",
"$item_id": {
".read": "root.child('users').child(auth.uid).val() > 1",
".write": "root.child('users').child(auth.uid).val() > 2"
}
},
"serviceaccounts": {
".read": "root.child('users').child(auth.uid).val() > 1",
"$user_id": {
".read": "(root.child('users').child(auth.uid).val() > 0 && $user_id == auth.uid) || root.child('users').child(auth.uid).val() > 1",
".write": "(root.child('users').child(auth.uid).val() > 0 && $user_id == auth.uid) || root.child('users').child(auth.uid).val() > 2"
}
},
"places": {
".read": "root.child('users').child(auth.uid).val() > 1",
"$ownerid": {
".read": "root.child('users').child(auth.uid).val() > 1 || $ownerid == auth.uid",
"$placeid": {
".read": "root.child('users').child(auth.uid).val() > 1 || $ownerid == auth.uid",
".write": "root.child('users').child(auth.uid).val() > 2"
}
}
},
"users": {
"$user_id": {
".read": "$user_id == auth.uid",
".write": true,
".validate": "newData.isNumber()"
}
}
}
}
25 changes: 25 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"database": {
"rules": "database.rules.json"
},
"functions": {
"predeploy": [
"yarn build"
]
},
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
"emulators": {}
}
14 changes: 14 additions & 0 deletions functions/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
root: true,
env: {
es6: true,
node: true,
},
extends: [
"eslint:recommended",
"google",
],
rules: {
quotes: ["error", "double"],
},
};
1 change: 1 addition & 0 deletions functions/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
9 changes: 9 additions & 0 deletions functions/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const functions = require("firebase-functions");

// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
//
exports.helloWorld = functions.https.onRequest((request, response) => {
functions.logger.info("Hello logs!", {structuredData: true});
response.send("Hello from Firebase!");
});
Loading

0 comments on commit 657d775

Please sign in to comment.