Skip to content

Commit

Permalink
added admin-vuejs & updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalramdan17 committed May 28, 2021
1 parent b267f0e commit 1cbfade
Show file tree
Hide file tree
Showing 79 changed files with 19,547 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,20 @@ It's free, open source, complete, rapid development package for creating Social

- Tight Firestore security rules are applied.

- Admin Site

- There is no doubt that most apps need admin feature(or site) that works outside of the app. And that should be a desktop version of website since there are much contents to view.
- Unfortunately, Flutter web is not ready for production, so we have chosen `Vuejs` to build admin site to manage users, posts, photos and other resources in Fireflutter proejct.
- This README.md does not include much information about Admin site. Please visit github repository: [https://github.com/faisalramdan17/getxfire/tree/main/admin-vuejs](https://github.com/faisalramdan17/getxfire/tree/main/admin-vuejs) to know more about it.


- Fully Customizable
- GetxFire package does not involve in any of part application's login or UI. It is completely separated from the app. Thus, it's highly customizable.

# References

- [GetxFire Package](https://github.com/faisalramdan17/getxfire) - This Package.
- [GetxFire Firebase Project](https://github.com/faisalramdan17/getxfire/tree/main/firebase) - Firebase project for Firestore security rules.
- [GetxFire Sample App](https://github.com/faisalramdan17/getxfire/tree/main/example) - Example Flutter App.
- [GetxFire Documentation](https://github.com/faisalramdan17/getxfire/wiki) - Wiki Documentation.

Expand Down
3 changes: 3 additions & 0 deletions admin-vuejs/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
31 changes: 31 additions & 0 deletions admin-vuejs/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
root: true,
env: {
node: true
},
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/typescript/recommended",
"@vue/prettier",
"@vue/prettier/@typescript-eslint"
],
parserOptions: {
ecmaVersion: 2020
},
rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
},
overrides: [
{
files: [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)"
],
env: {
mocha: true
}
}
]
};
72 changes: 72 additions & 0 deletions admin-vuejs/.firebase/hosting.ZGlzdA.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
favicon.ico,1608482060356,1e71457865f706dc865b49a54a86e193818220d290b30226b6630a42faf1535d
index.html,1608482060345,48c63ffa23de395f7f59370fec3bdf87f858075ead1c7f0764e812580f7b1ca6
manifest.json,1608482060345,74de623c053a72ab40640c046b8f91ad57b05fc4c41df6aea76ad5fbfb044f89
precache-manifest.756068823a628655ae238692f906e0b2.js,1608482060358,c670d44e6808401aec626c0ec1e4da68694d08f75cd941eab75f9007429d5283
robots.txt,1608482060358,c17e70846d7031bb27102edfb33b59d1e3e40a8e8e8097af75b7766e7fffc250
service-worker.js,1608482060358,6bf642f85a7d253daeb96c62678a7a8a0847bf235878a1f4a5f89e228ff9ed78
css/app.5ebf2e86.css,1608482060337,61976a48312a5af9e0a6d7cd0dc78082320dffc1c7d5fe70937c76e9c1fb3700
css/chunk-12cee91c.d68d4f6a.css,1608482060337,e23d07a0388e57c1503ff4828e950fe7fef5874770f08ccd65a7112f1a5c06d9
css/chunk-3165036b.522eeca4.css,1608482060337,ccf41e9f0cd1fca3de7d644d1ab7775af54c045e4101c094d0cdf8744cc4fa40
css/chunk-3569a156.db4d1710.css,1608482060338,d1b08940505fcd88652168ed28b366ad8660b40f080695f8a597d0d94d690266
css/chunk-358c9798.bad8869f.css,1608482060338,4e6f2f73d3dea4ac3416abce437c5e26e3792113b176c57ddd6515913011201b
css/chunk-401a0c1a.c564a9e8.css,1608482060338,d63551b6b933840f35bd7cbe4b67a2b39a4fdf743f98cdc4dbafdb58d4132d3f
css/chunk-49af3d32.8a23086a.css,1608482060338,f84fe3246097cd3e260f895168a3b2c632d022e9f865009bdbf48155b44426ee
css/chunk-af23f8fe.7a097077.css,1608482060343,0ea84bd8c2692e5df1f1e2b9a86c3872b2fa0cce21804fa4035f6eef87a6c82b
img/fire.svg,1608482060357,95b5f35505a38689838897e4186817b901ffc2f946ac3f04907d3acc8f3a1e2e
img/icons/android-chrome-192x192.png,1608482060358,97e1127ad8db90e0349c838ecf9351fc0c370f9606f6ab309fe17444d26a9d59
img/icons/android-chrome-512x512.png,1608482060359,07426bba3be5f2ea36f5a6f543b71bfb02277982e28e22509fd85f4f998aefff
img/icons/android-chrome-maskable-192x192.png,1608482060357,13d1c57561a4e596cc6b6eac9dcc101241daa58e3788850099d293a5cc5f6e80
img/icons/android-chrome-maskable-512x512.png,1608482060358,e83b49eb1537fcb5016aa3a8b596566c1dc2e68a135c528c7c6a5076e528e95d
img/icons/apple-touch-icon-120x120.png,1608482060358,13e4908bb32e2ca95e375ca720887ef85057fb3872d6f028c63ba22df9b12ed9
img/icons/apple-touch-icon-152x152.png,1608482060357,879d14ef1bd94f81c11ca6fa51ebca226bf6c88c86447aaf560752528e144067
img/icons/apple-touch-icon-180x180.png,1608482060357,ca5a8e637d730848e77716ed970da1a4a5fe9d3b4be21e43f33cf5ebcaf03e7d
img/icons/apple-touch-icon-60x60.png,1608482060358,a27014cb4410df491f64e3b5411987418ff6d729b351056a3de84e744c681a52
img/icons/apple-touch-icon-76x76.png,1608482060357,65d6c498ad60f94b338df3f1f4551303ec84306ecb1c7e615ed64489fffc8b28
img/icons/apple-touch-icon.png,1608482060358,08b37da608cf827a037d8f600a01a32b2f74728291e679b03679fd3619da3a43
img/icons/favicon-16x16.png,1608482060358,563096b119e9b3f8060292a6fc3e091e2a98ee0d1c94ca99de941f78c7fa077c
img/icons/favicon-32x32.png,1608482060358,f5a182df55d21b93c27ec89bd600abe40f3fac23df563e4cfc9efd5edd248886
img/icons/msapplication-icon-144x144.png,1608482060358,27b3b62de2e36ac452e86079762d3cfd37c33dc8cbde0a7c5657e5a7c32d971a
img/icons/mstile-150x150.png,1608482060358,ea1dc2c1c63ffe2668cacc9d170cee33b50a2d58e1591b8399004629e3c1ae67
img/icons/safari-pinned-tab.svg,1608482060358,b96c516490acd2efe112a91da5af4fcb45188808bb3a22c4f05acbe781b2b2b2
js/app.378c9e8a.js,1608482060337,eb941579cd975f0af5b03c30715b4398e0e04144517bb3df4bc28575b55070b6
js/app.378c9e8a.js.map,1608482060343,a4ba94e813929e1ab7c09b7388d1129597cff41e6d3315309f49c356b4574024
js/chunk-12cee91c.4fe4ac0e.js,1608482060337,c9bbe3743ae630307788b955ce9f26e634d60b3ece85482e55a2e12dca792a9b
js/chunk-12cee91c.4fe4ac0e.js.map,1608482060344,3ed0e1e73d9cde2e905d06613c7f91f6dbe99e916f0e77f5e4dabd72be465363
js/chunk-2d0c9206.774cf510.js,1608482060337,a83261d2d7420dd5964b5dd19fa94ac22c747fe2a7d7036a9b800bd894d58064
js/chunk-2d0c9206.774cf510.js.map,1608482060344,455eabe6d17a7d8920911296d4f8655cb08cf0c0a1763c5222e5f222bb5d70e0
js/chunk-2d0cc5db.a6ea6fe3.js,1608482060337,0f041d2c60c7ca5f69eb184b4b993e778cf0c5cbce086aeb374467c259fbc222
js/chunk-2d0cc5db.a6ea6fe3.js.map,1608482060344,09797fe716f2a047cb4d6aac57702ca927a094c5cbb3561fe9078a931d90a2da
js/chunk-2d0d6d35.0eda6d20.js,1608482060337,1f2c613d3baa58d99ba4d1d0629657a1b3bf58b661604200579eec2a8dc031bd
js/chunk-2d0d6d35.0eda6d20.js.map,1608482060344,bf71e9c592fe15d7536ff45cc1bb8a5bca5643705a84da5c42f28c4e0e774eef
js/chunk-2d0f081c.56d7a545.js,1608482060337,d75f69b59781578c4e8d19c4d8ca345993ade4619290c126acb90bf4374035b0
js/chunk-2d0f081c.56d7a545.js.map,1608482060344,6f9a7d0adc46c2cfab4ad62cf4f403d608a4f4a58276aa17e68b7c3f81ad0673
js/chunk-2d2086b7.087ec1df.js,1608482060337,55f339789e18bb0653944b18bb8b3a5b84b6e9417d5487eff08065e440b67fbf
js/chunk-2d2086b7.087ec1df.js.map,1608482060344,1cf887a36e9919f5d19e592eeebbce764406d60897f5f6a348675c70ce5f563a
js/chunk-2d215fa4.d4a61b17.js,1608482060337,f462e99d73920ff413bc16dfc6c8b1f3b746f808908f10bdb296c6420279da92
js/chunk-2d215fa4.d4a61b17.js.map,1608482060345,97715d2ccdfc165cd8d848f149c5d0acb075d420714555022dc3caccf22dbbc6
js/chunk-2d217357.f5aa1c60.js,1608482060337,309c9d8d2241d5ba7c3328a1f962462fed398c2abd0e6ef12204fcbbcedad308
js/chunk-2d217357.f5aa1c60.js.map,1608482060344,40947ee7a6dd4e60ac3b9e97fa5203c54cde6123d4f0d816462ce22c051f3fa7
js/chunk-2d217e3c.35bbedc4.js,1608482060337,14269bf3c9a7c3daeff433c74c8b904527b80a0dcb80019d1c96cd3f29b7b0fe
js/chunk-2d217e3c.35bbedc4.js.map,1608482060345,1a43a861484aba5be5a02fc0bc4aad8aeb098f85053d65a9af82056541e964f5
js/chunk-2d22d746.d20974dc.js,1608482060337,d44bfc6bb58dffe6fec12bd3c9cbd2e8d17f93c2bb7d4497165de182f18215cb
js/chunk-2d22d746.d20974dc.js.map,1608482060345,94cec1311be2dfa3d2dc60ebe7faece086d3839d40a7ac62fd3d0b5a0658b3d4
js/chunk-3165036b.7735a96a.js,1608482060337,e712f77a673331d50568dbab5dcb5b2d3ef6badf480d1a66f9f3558e4faf3b85
js/chunk-3165036b.7735a96a.js.map,1608482060345,1d5da549c89c31a2f07fb3f3d1c69ca681d1db0ab38ad79e8f944ab52d257991
js/chunk-3569a156.a268bd28.js,1608482060338,52faa671c460ba50922e049250bdc6770120e4433baf6364b93c15fc2e19bd14
js/chunk-3569a156.a268bd28.js.map,1608482060345,faaf9c1ce49da7a5ec3fc0144fafaabb125bd142872b714657aa1d125ea25706
js/chunk-358c9798.0a3ad076.js,1608482060338,ba292ffdd5db42c5d6b7624c12c260a9122d58c61f6b0cf1a4450a6efafc9abe
js/chunk-358c9798.0a3ad076.js.map,1608482060345,66f71be3b513450ba3237d2e23e74845bf8c68157bc326ba506d441c423cddf0
js/chunk-3ef85bac.b7678304.js,1608482060338,9b82f09a2585a7a85724b3ab61bcbfdfb02959fd84ddd75b5454e05fab03c655
js/chunk-3ef85bac.b7678304.js.map,1608482060345,cacfcf7b911116a232d56e9e2ec42f205bb85d13c23b3a0ade03d2265d112ec4
js/chunk-401a0c1a.50e52f9d.js,1608482060342,8fa85ff7bccbc2c42eae2a10021020b244727e61f7cf9450595bfe262cc43569
js/chunk-401a0c1a.50e52f9d.js.map,1608482060345,872d0a8761f83c8d9731c1d13f44efaea1ce299dcd34712f6a246b80f7d32866
js/chunk-49af3d32.01ed7779.js,1608482060343,eb7df608f2815621ce5c947c8117f1383e65a57e77912d07aa01e4b7285c9d6f
js/chunk-49af3d32.01ed7779.js.map,1608482060356,5909e7f5dd577031315417b0a83ebaa5af8a4eab11d0521ddcd9ecc59eafd396
js/chunk-4a682772.5c7639cf.js,1608482060343,28fa97f5f332fdb285a86a334a813015b42da82284271637efc97d7cb1eecc51
js/chunk-4a682772.5c7639cf.js.map,1608482060357,44622256180812d34c76d7b633c3f6c0485c15bbef59cf017d9209f12415aef0
js/chunk-7abb683a.d2d43877.js,1608482060343,529d2f6bdfe705ab81d44ab78af5d2e8e565904e12f4ed3f1c7f2c0e3abae4a8
js/chunk-7abb683a.d2d43877.js.map,1608482060357,42ff1e22e9b81448abff75bfb68849652b448af6230a64ad0f65997614e066a1
js/chunk-af23f8fe.2f733cac.js,1608482060343,a9df84cc8b4f14c2f56b5a8493cbbbd86d42406e6355eb4fbd9fbe7c80b35e33
js/chunk-af23f8fe.2f733cac.js.map,1608482060356,8f98286cee7513b1986cb2bf6f912b0581652eb7a255af010a4d095722892d05
js/chunk-vendors.cf9cca54.js,1608482060343,d31e4e64a1b883b3061087759fd8201ecb1d230b83ab5974a13e2843912df117
js/chunk-vendors.cf9cca54.js.map,1608482060357,e2e3a2d81eed9acd86efbdabfcbe5eee851c8783ad81a71878e99278c708c050
18 changes: 18 additions & 0 deletions admin-vuejs/.firebase/hosting.cHVibGlj.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
favicon.ico,1607500750899,1e71457865f706dc865b49a54a86e193818220d290b30226b6630a42faf1535d
index.html,1608004538120,924ed7ef2e75dffece4233e3df6507038ec371dc0ae99c48b5c040024e4c08b3
robots.txt,1607500750900,c17e70846d7031bb27102edfb33b59d1e3e40a8e8e8097af75b7766e7fffc250
img/icons/android-chrome-192x192.png,1607500750900,97e1127ad8db90e0349c838ecf9351fc0c370f9606f6ab309fe17444d26a9d59
img/icons/android-chrome-512x512.png,1607500750900,07426bba3be5f2ea36f5a6f543b71bfb02277982e28e22509fd85f4f998aefff
img/icons/android-chrome-maskable-192x192.png,1607500750900,13d1c57561a4e596cc6b6eac9dcc101241daa58e3788850099d293a5cc5f6e80
img/icons/android-chrome-maskable-512x512.png,1607500750900,e83b49eb1537fcb5016aa3a8b596566c1dc2e68a135c528c7c6a5076e528e95d
img/icons/apple-touch-icon-120x120.png,1607500750900,13e4908bb32e2ca95e375ca720887ef85057fb3872d6f028c63ba22df9b12ed9
img/icons/apple-touch-icon-152x152.png,1607500750900,879d14ef1bd94f81c11ca6fa51ebca226bf6c88c86447aaf560752528e144067
img/icons/apple-touch-icon-180x180.png,1607500750901,ca5a8e637d730848e77716ed970da1a4a5fe9d3b4be21e43f33cf5ebcaf03e7d
img/icons/apple-touch-icon-60x60.png,1607500750901,a27014cb4410df491f64e3b5411987418ff6d729b351056a3de84e744c681a52
img/icons/apple-touch-icon-76x76.png,1607500750901,65d6c498ad60f94b338df3f1f4551303ec84306ecb1c7e615ed64489fffc8b28
img/icons/apple-touch-icon.png,1607500750901,08b37da608cf827a037d8f600a01a32b2f74728291e679b03679fd3619da3a43
img/icons/favicon-16x16.png,1607500750901,563096b119e9b3f8060292a6fc3e091e2a98ee0d1c94ca99de941f78c7fa077c
img/icons/favicon-32x32.png,1607500750901,f5a182df55d21b93c27ec89bd600abe40f3fac23df563e4cfc9efd5edd248886
img/icons/msapplication-icon-144x144.png,1607500750901,27b3b62de2e36ac452e86079762d3cfd37c33dc8cbde0a7c5657e5a7c32d971a
img/icons/mstile-150x150.png,1607500750901,ea1dc2c1c63ffe2668cacc9d170cee33b50a2d58e1591b8399004629e3c1ae67
img/icons/safari-pinned-tab.svg,1607500750902,b96c516490acd2efe112a91da5af4fcb45188808bb3a22c4f05acbe781b2b2b2
5 changes: 5 additions & 0 deletions admin-vuejs/.firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "nalia-app"
}
}
26 changes: 26 additions & 0 deletions admin-vuejs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.DS_Store
node_modules
/dist

/tests/e2e/videos/
/tests/e2e/screenshots/


# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
149 changes: 149 additions & 0 deletions admin-vuejs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# Firebase Admin

- This project is for managing for `thefire project` But it can be used for serving the clients(members) of the app by customizing(designing) the front.

- Cloud functions in fireflutter-firebase should be deployed to manage user accounts. Managing user accounts like creating/deleting is not allowed directly from frontend.

# Project Installation, Serving, Deployment

## Get flutter-admin project

```
git clone https://github.com/thruthesky/fireflutter-admin
cd fireflutter-admin
npm i
npm run serve
```

## Deploye fireflutter-firebase functions

```
git clone https://github.com/thruthesky/fireflutter-firebase
cd fireflutter-firebase
npm i
cd functions
npm i
firebase deploy --only functions
```

## Project setup

```
npm install
```

### Compiles and hot-reloads for development

```
npm run serve
```

### Compiles and minifies for production

```
npm run build
```

### Run your unit tests

```
npm run test:unit
```

### Run your end-to-end tests

```
npm run test:e2e
```

### Lints and fixes files

```
npm run lint
```

## Deployment

- You can build and deploy anywhere you want.
- `npm run build`
- Copy public folder to web server home folder.

### Firebase Hosting

To deploy fireflutter-admin to firebase, follow the instructions below.

- Edit firebase project id

```json
{
"projects": {
"default": "... Input your project id here ..."
}
}
```

- And run the following

```sh
firebase use [project-id]
```

- Then run

```sh
firebase deploy --only hosting
```

# Developer Coding Guideline

## App configuration

## Fire Project Settings

## User management

- This explains how to create a user account and delete it.

```js
/// Login as admin
try {
const userCreate = await firebase
.app()
.functions("asia-northeast3")
.httpsCallable("userCreate");
const re = await userCreate({
email: "[email protected]",
password: "12345a,*",
phoneNumber: "+10123456701",
displayName: "User V",
photoURL: "http://www.example.com/12345678/photo.png",
disabled: false
});
const user = re.data;
console.log(user);
try {
const userDelete = await firebase
.app()
.functions("asia-northeast3")
.httpsCallable("userDelete");
await userDelete(user.uid);
} catch (e) {
const code = e.code;
const message = e.message;
const details = e.details;
console.log(code, message, details);
}
} catch (e) {
const code = e.code;
const message = e.message;
const details = e.details;
console.log(code, message, details);
}
```

# Trouble Shooting

```
Status Code: 500
Referrer Policy: strict-origin-when-cross-origin
```
3 changes: 3 additions & 0 deletions admin-vuejs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"]
};
8 changes: 8 additions & 0 deletions admin-vuejs/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export const firebaseConfig = {
apiKey: "AIzaSyBqOcOhdonMMimHAt7Iq4aodp2KwQBc61M",
authDomain: "nalia-app.firebaseapp.com",
projectId: "nalia-app",
storageBucket: "nalia-app.appspot.com",
messagingSenderId: "973770265003",
appId: "1:973770265003:web:dd304f98a421a733d8c2ee"
};
3 changes: 3 additions & 0 deletions admin-vuejs/cypress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"pluginsFile": "tests/e2e/plugins/index.js"
}
16 changes: 16 additions & 0 deletions admin-vuejs/firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
Loading

0 comments on commit 1cbfade

Please sign in to comment.