这是indexloc提供的服务,不要输入任何密码
Skip to content

Implementing multi tenancy #345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 46 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
ffba44b
Adding site parameter to the app structure
DennisAlund May 21, 2024
5dcc1fd
Adding firebase utils
DennisAlund May 21, 2024
7d42490
Adding server side props for site data
DennisAlund May 21, 2024
d2aa8b6
Fixing typo
DennisAlund May 22, 2024
371eecb
Formatting and imports fixing
DennisAlund May 22, 2024
3e34895
Updating packages
DennisAlund May 22, 2024
e9c9eab
Using hook for site data
DennisAlund May 22, 2024
f694221
Removing auth pages
DennisAlund May 22, 2024
e0a5660
Adding caching to workflows
DennisAlund May 22, 2024
723ac77
Update firebase-hosting-pull-request.yml
DennisAlund May 22, 2024
c1b1b88
Updating Firebase hosting deploy script
DennisAlund May 22, 2024
d0935d1
Updating workflows
DennisAlund May 22, 2024
7436a40
Merge branch 'next' into issue/342-multi-tenancy
DennisAlund May 22, 2024
4fc2949
Updating build scripts
DennisAlund May 22, 2024
57c2782
Using artifact upload/download
DennisAlund May 22, 2024
7a2160e
Enabling web frameworks in the actions
DennisAlund May 22, 2024
092e47b
Install node on deployment step
DennisAlund May 22, 2024
ead2d3c
Adding getSite to the use effect dependency array
DennisAlund May 22, 2024
5dd2a83
Updating github actions
DennisAlund May 22, 2024
8f814b3
Installing dependencies before deploy
DennisAlund May 22, 2024
de6b6c6
Combining the workflows
DennisAlund May 22, 2024
4e6602f
Removing console log
DennisAlund May 22, 2024
c5b49d5
Loading dynamic data from firestore
DennisAlund May 22, 2024
57f02ff
make more consistent import using path alias
muzanella11 May 22, 2024
21ce830
add eslint rules
muzanella11 May 22, 2024
bb851ab
fix error
muzanella11 May 22, 2024
c229d62
fix error linter
muzanella11 May 22, 2024
11b4e5c
update eslint rules
muzanella11 May 22, 2024
508fd3e
add prettier
muzanella11 May 22, 2024
b4396de
update package-lock json
muzanella11 May 22, 2024
8e94367
update eslint rules and fix cant deploy
muzanella11 May 22, 2024
8c07e2f
add code check in pull request pipeline
muzanella11 May 22, 2024
309e439
missing run command
muzanella11 May 22, 2024
675588a
missing path alias
muzanella11 May 22, 2024
0eda5ef
expected error
muzanella11 May 22, 2024
c8ef9fb
fix error
muzanella11 May 22, 2024
6fcf3fe
update pipeline hosting merge
muzanella11 May 22, 2024
5a718f0
Remove installation of firebase tools in actions
DennisAlund May 23, 2024
c164c2f
Change back to double quote
DennisAlund May 23, 2024
c71fdc6
Updating package script
DennisAlund May 23, 2024
e9c5a8a
fix lint error
muzanella11 May 23, 2024
3ee7d52
remove installing firebase in pipeline
muzanella11 May 23, 2024
a4319ce
Updating github actions
DennisAlund May 23, 2024
9b55dc5
Apply code checking
DennisAlund May 23, 2024
3d9aa7a
Updating package lock
DennisAlund May 23, 2024
f8e84f6
Removing yarn lock
DennisAlund May 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 45 additions & 5 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,61 @@
# 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:
code_check:
name: Code check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
cache-dependency-path: |
hosting/package-lock.json

- name: Apply formatting and linting
run: npm ci && npm run lint:fix && npm run format
working-directory: ./hosting

- name: Ensure code is unchanged
run: git diff --exit-code

build_and_deploy:
name: Build and deploy
needs: code_check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run build

- uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
cache-dependency-path: |
hosting/package-lock.json

- name: Cache hosting build
uses: actions/cache@v4
id: cache-hosting
with:
key: ${CI_COMMIT_REF_SLUG}
path: |
./hosting/node_modules/
./hosting/.next/cache/

- name: Build application
run: npm ci && npm run build
working-directory: ./hosting

- uses: FirebaseExtended/action-hosting-deploy@v0
env:
FIREBASE_CLI_EXPERIMENTS: webframeworks
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_TANAM_TESTING }}
channelId: live
projectId: tanam-testing
channelId: live
51 changes: 46 additions & 5 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,63 @@
# 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:
code_check:
name: Code check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
cache-dependency-path: |
hosting/package-lock.json

- name: Apply formatting and linting
run: npm ci && npm run lint:fix && npm run format
working-directory: ./hosting

- name: Ensure code is unchanged
run: git diff --exit-code

build_and_deploy:
name: Build and deploy
needs: code_check
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run build

- uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
cache-dependency-path: |
hosting/package-lock.json

- name: Cache hosting build
uses: actions/cache@v4
id: cache-hosting
with:
key: ${CI_COMMIT_REF_SLUG}
path: |
./hosting/node_modules/
./hosting/.next/cache/

- name: Build application
run: npm ci && npm install && npm run build
working-directory: ./hosting

- uses: FirebaseExtended/action-hosting-deploy@v0
env:
FIREBASE_CLI_EXPERIMENTS: webframeworks
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_TANAM_TESTING }}
projectId: tanam-testing
expires: 7d
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"html.format.wrapAttributes": "force-aligned",
"typescript.preferences.importModuleSpecifier": "relative",
"javascript.preferences.importModuleSpecifier": "relative",
"editor.tabSize": 4,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"json.format.enable": true,
"[scss]": {
Expand Down
47 changes: 47 additions & 0 deletions hosting/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
module.exports = {
root: true,

parser: "@typescript-eslint/parser",

parserOptions: {
ecmaVersion: 2021,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
project: "./tsconfig.json",
},

env: {
browser: true,
es2021: true,
},

extends: ["eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended", "google"],

plugins: ["react", "@typescript-eslint", "prettier"],

settings: {
react: {
version: "detect",
},
},

rules: {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"react/react-in-jsx-scope": "off",
"react/jsx-filename-extension": [1, {extensions: [".js", ".jsx", ".ts", ".tsx"]}],
"react/jsx-props-no-spreading": "off",
"react/prop-types": "off",
"max-len": "off",
"require-jsdoc": "off",
"prettier/prettier": "error",
indent: ["error", 2],
"operator-linebreak": ["error", "before"],
quotes: "off", // Use config quotes from prettier, so we turn off this rules to avoiding conflict between eslint and prettier
},

ignorePatterns: ["**/src/js/*"],
};
3 changes: 0 additions & 3 deletions hosting/.eslintrc.json

This file was deleted.

9 changes: 9 additions & 0 deletions hosting/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": true,
"singleQuote": false,
"bracketSpacing": false,
"trailingComma": "all",
"tabWidth": 2,
"useTabs": false,
"printWidth": 120
}
25 changes: 17 additions & 8 deletions hosting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,40 @@ TailAdmin is a free and open-source admin dashboard template built on **Next.js

[![tailwind nextjs admin template](https://github.com/TailAdmin/free-nextjs-admin-dashboard/blob/main/tailadmin-nextjs.jpg)](https://nextjs-demo.tailadmin.com/)

With TailAdmin Next.js, you get access to all the necessary dashboard UI components, elements, and pages required to build a high-quality and complete dashboard or admin panel. Whether you're building a dashboard or admin panel for a complex web application or a simple website.
With TailAdmin Next.js, you get access to all the necessary dashboard UI components, elements, and pages required to build a high-quality and complete dashboard or admin panel. Whether you're building a dashboard or admin panel for a complex web application or a simple website.

TailAdmin utilizes the powerful features of **Next.js 13** and common features of Next.js such as server-side rendering (SSR), static site generation (SSG), and seamless API route integration. Combined with the advancements of **React 18** and the robustness of **TypeScript**, TailAdmin is the perfect solution to help get your project up and running quickly.

### [✨ Visit Website](https://tailadmin.com/)

### [🚀 PRO Demo](https://nextjs-demo.tailadmin.com/)

### [🚀 FREE Demo](https://nextjs-free-demo.tailadmin.com/)

### TailAdmin Next.js PRO vs TailAdmin Next.js FREE Comparison 📊

#### [TailAdmin Next.js PRO](https://nextjs-demo.tailadmin.com/)

- 4 Unique Dashboards: Analytics, Ecommerce, Marketing, and CRM (More will be added)
- 120+ Dashboard UI Components
- 200+ Total UI Elements
- 45+ HTML Files
- All Essential Elements and Files
- Full Figma Design Source - As Shown on Demo
___

---

#### [TailAdmin Next.js FREE](https://free-nextjs-demo.tailadmin.com/)

- 1 Unique Dashboard
- 30+ Dashboard UI Components
- 50+ Total UI Elements
- 50+ Total UI Elements
- 10+ HTML Files
- TypeScript Support
- Basic UI Kit Elements and Files
- Figma Design Source - Free Sample
___

---

### [⬇️ Download Now](https://tailadmin.com/download)

Expand All @@ -43,8 +49,8 @@ ___

### [👉 TailAdmin HTML Version](https://github.com/TailAdmin/tailadmin-free-tailwind-dashboard-template)


## Installation

Here are the steps you need to follow to install the dependencies.

1. Download and extract the template from Next.js Templates.
Expand All @@ -54,6 +60,7 @@ Here are the steps you need to follow to install the dependencies.
```
npm install
```

or

```
Expand All @@ -66,26 +73,27 @@ yarn install
npm run dev
```

or
or

```
yarn dev
```


## Free Admin Dashboard Template for Next.js Built-with Tailwind CSS, React 18 and TypeScript

TailAdmin Next.js is a free dashboard template, which uses Tailwind CSS, is a great starting point for dashboard UI. This template uses the Next.js JavaScript framework and the easy-to-use Tailwind CSS framework. The Tailwind CSS and Next.js Dashboard Template comes with ready-made components like navigation menus, charts, tables, and forms. These components can be easily adjusted and added to any Next.js web application.

TailAdmin for Next.js provides all essential Next.js + Tailwind CSS UI components that can be copied and pasted directly into your dashboard projects. The range of components includes charts, graphs, navbars, tabs, buttons, cards, tables, profiles, forms, modals, app pages, calendars, web app example templates, and more, all coded for Next.js React and styled using Tailwind CSS.

If you're on the hunt for a top-quality Next.js-Tailwind Dashboard, Admin Panel Template, or UI Kit, TailAdmin is the perfect choice for you!

### 📄 License

TailAdmin Next.js Free is 100% free and open-source; feel free to use it with your personal and commercial projects.

### 💜 Support
If you like the template, please star this repository to inspire the team to create more stuff like this and reach more users like you!

If you like the template, please star this repository to inspire the team to create more stuff like this and reach more users like you!

## Update Logs

Expand All @@ -96,6 +104,7 @@ If you like the template, please star this repository to inspire the team to cre
- **Issues 02:** Fix Misspelling issue [Default Layout/Layouts].

#### Enhancements

- **Enhancement 01:** Update style.css

### Version 1.3.0 - [Feb 05, 2024]
Expand Down
6 changes: 3 additions & 3 deletions hosting/jsvectormap.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare module 'jsvectormap' {
const jsVectorMap: any;
export default jsVectorMap;
declare module "jsvectormap" {
const jsVectorMap: any;
export default jsVectorMap;
}
Loading