From bab74dd0886f579f6a7d0d55e883084a7d964791 Mon Sep 17 00:00:00 2001
From: valere
Date: Thu, 9 Mar 2023 19:40:02 +0100
Subject: [PATCH] feat: switch to sidebase/nuxt !
---
.dockerignore | 3 -
.eslintrc.js | 13 -
.gitignore | 93 +-
.prettierrc.js | 11 -
Dockerfile | 46 +-
License | 21 -
README.md | 91 +-
app.vue | 30 +
auto-imports.d.ts | 116 +
components.d.ts | 7 -
components/applications-list.vue | 65 +
.../backup-restore.vue | 122 +-
components/demo.vue | 176 +
{src/components => components}/disclaimer.vue | 4 +-
.../hero-buttons.vue | 36 +-
{src/components => components}/hero-title.vue | 22 +-
.../assets => components}/svg/arrow-right.vue | 2 +-
{src/assets => components}/svg/backbutton.vue | 0
{src/assets => components}/svg/backup.vue | 2 +-
{src/assets => components}/svg/clipboard.vue | 2 +-
.../svg/apps => components/svg}/code.vue | 0
{src/assets => components}/svg/console.vue | 2 +-
.../svg/apps => components/svg}/deluge.vue | 0
{src/assets => components}/svg/docker.vue | 2 +-
.../svg/apps => components/svg}/drone.vue | 0
{src/assets => components}/svg/folder.vue | 0
.../svg/apps => components/svg}/gitea.vue | 0
{src/assets => components}/svg/github.vue | 4 +-
components/svg/hoppscotch.vue | 196 +
.../svg/apps => components/svg}/jellyfin.vue | 0
{src/assets => components}/svg/logo.vue | 2 +-
.../svg/apps => components/svg}/nextcloud.vue | 0
.../svg/apps => components/svg}/pegaz.vue | 0
.../svg/apps => components/svg}/penpot.vue | 0
.../svg/apps => components/svg}/plausible.vue | 0
.../svg/apps => components/svg}/radio.vue | 0
{src/assets => components}/svg/rewind.vue | 0
.../svg/apps => components/svg}/rss.vue | 0
{src/assets => components}/svg/shield.vue | 2 +-
{src/assets => components}/svg/storj.vue | 2 +-
{src/components => components}/terminal.vue | 18 +-
coverage/add.vue.html | 136 +
coverage/base.css | 224 +
coverage/block-navigation.js | 87 +
coverage/clover.xml | 108 +
coverage/coverage-final.json | 4 +
coverage/favicon.png | Bin 0 -> 445 bytes
coverage/index.html | 146 +
coverage/list.vue.html | 124 +
coverage/prettify.css | 1 +
coverage/prettify.js | 2 +
coverage/row.vue.html | 274 +
coverage/sort-arrow-sprite.png | Bin 0 -> 138 bytes
coverage/sorter.js | 196 +
.../tmp/coverage-13499-1677657161408-2.json | 1 +
dockerignore | 6 +
env.d.ts | 6 +
eslintignore | 10 +
eslintrc | 13 +
public/favicon.ico => favicon.ico | Bin
histoire.config.js | 6 -
index.html | 35 -
nuxt.config.ts | 22 +
package-lock.json | 20467 ++++++++++++----
package.json | 85 +-
pages/index.vue | 41 +
postcss.config.js | 6 -
src/App.vue | 25 -
src/assets/svg/pegaz.vue | 63 -
src/components/applications-list.vue | 62 -
src/components/demo.vue | 174 -
src/index.css | 3 -
src/layouts/404.vue | 19 -
src/layouts/default.vue | 3 -
src/main.js | 23 -
src/pages/[...all].vue | 8 -
src/pages/about/[name].vue | 26 -
src/pages/index.vue | 68 -
src/stores/useUsersStore.js | 22 -
tailwind.config.js | 32 +-
test/basic.test.js | 7 -
tsconfig.json | 13 +-
types/todo.d.ts | 7 +
vite.config.js | 25 -
vitest.config.js | 8 -
vitest.config.ts | 49 +
86 files changed, 18165 insertions(+), 5562 deletions(-)
delete mode 100644 .dockerignore
delete mode 100644 .eslintrc.js
delete mode 100644 .prettierrc.js
delete mode 100644 License
create mode 100644 app.vue
create mode 100644 auto-imports.d.ts
create mode 100644 components/applications-list.vue
rename {src/components => components}/backup-restore.vue (53%)
create mode 100644 components/demo.vue
rename {src/components => components}/disclaimer.vue (92%)
rename {src/components => components}/hero-buttons.vue (52%)
rename {src/components => components}/hero-title.vue (58%)
rename {src/assets => components}/svg/arrow-right.vue (100%)
rename {src/assets => components}/svg/backbutton.vue (100%)
rename {src/assets => components}/svg/backup.vue (100%)
rename {src/assets => components}/svg/clipboard.vue (100%)
rename {src/assets/svg/apps => components/svg}/code.vue (100%)
rename {src/assets => components}/svg/console.vue (100%)
rename {src/assets/svg/apps => components/svg}/deluge.vue (100%)
rename {src/assets => components}/svg/docker.vue (100%)
rename {src/assets/svg/apps => components/svg}/drone.vue (100%)
rename {src/assets => components}/svg/folder.vue (100%)
rename {src/assets/svg/apps => components/svg}/gitea.vue (100%)
rename {src/assets => components}/svg/github.vue (100%)
create mode 100644 components/svg/hoppscotch.vue
rename {src/assets/svg/apps => components/svg}/jellyfin.vue (100%)
rename {src/assets => components}/svg/logo.vue (100%)
rename {src/assets/svg/apps => components/svg}/nextcloud.vue (100%)
rename {src/assets/svg/apps => components/svg}/pegaz.vue (100%)
rename {src/assets/svg/apps => components/svg}/penpot.vue (100%)
rename {src/assets/svg/apps => components/svg}/plausible.vue (100%)
rename {src/assets/svg/apps => components/svg}/radio.vue (100%)
rename {src/assets => components}/svg/rewind.vue (100%)
rename {src/assets/svg/apps => components/svg}/rss.vue (100%)
rename {src/assets => components}/svg/shield.vue (100%)
rename {src/assets => components}/svg/storj.vue (100%)
rename {src/components => components}/terminal.vue (70%)
create mode 100644 coverage/add.vue.html
create mode 100644 coverage/base.css
create mode 100644 coverage/block-navigation.js
create mode 100644 coverage/clover.xml
create mode 100644 coverage/coverage-final.json
create mode 100644 coverage/favicon.png
create mode 100644 coverage/index.html
create mode 100644 coverage/list.vue.html
create mode 100644 coverage/prettify.css
create mode 100644 coverage/prettify.js
create mode 100644 coverage/row.vue.html
create mode 100644 coverage/sort-arrow-sprite.png
create mode 100644 coverage/sorter.js
create mode 100644 coverage/tmp/coverage-13499-1677657161408-2.json
create mode 100644 dockerignore
create mode 100644 env.d.ts
create mode 100644 eslintignore
create mode 100644 eslintrc
rename public/favicon.ico => favicon.ico (100%)
delete mode 100644 histoire.config.js
delete mode 100644 index.html
create mode 100644 nuxt.config.ts
create mode 100644 pages/index.vue
delete mode 100644 postcss.config.js
delete mode 100644 src/App.vue
delete mode 100644 src/assets/svg/pegaz.vue
delete mode 100644 src/components/applications-list.vue
delete mode 100644 src/components/demo.vue
delete mode 100644 src/index.css
delete mode 100644 src/layouts/404.vue
delete mode 100644 src/layouts/default.vue
delete mode 100644 src/main.js
delete mode 100644 src/pages/[...all].vue
delete mode 100644 src/pages/about/[name].vue
delete mode 100644 src/pages/index.vue
delete mode 100644 src/stores/useUsersStore.js
delete mode 100644 test/basic.test.js
create mode 100644 types/todo.d.ts
delete mode 100644 vite.config.js
delete mode 100644 vitest.config.js
create mode 100644 vitest.config.ts
diff --git a/.dockerignore b/.dockerignore
deleted file mode 100644
index c5ea0d4..0000000
--- a/.dockerignore
+++ /dev/null
@@ -1,3 +0,0 @@
-node_modules/
-dist/
-npm-debug.log
diff --git a/.eslintrc.js b/.eslintrc.js
deleted file mode 100644
index b1d64b5..0000000
--- a/.eslintrc.js
+++ /dev/null
@@ -1,13 +0,0 @@
-module.exports = {
- extends: [
- 'plugin:vue/vue3-essential',
- 'prettier',
- // 'airbnb-base',
- 'plugin:import/typescript'
- ],
- rules: {
- // override/add rules settings here, such as:
- 'vue/no-unused-vars': 'error',
- 'vue/multi-word-component-names': 'off',
- },
-}
diff --git a/.gitignore b/.gitignore
index 7329a85..239c57c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,20 +1,83 @@
-# build output
-dist/
-.output/
-
-# dependencies
-node_modules/
-
-# logs
+# Logs and databases #
+######################
+*.log
+*.sql
+*.sqlite
+*.db
+*.sqlite-journal
+/logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
-pnpm-debug.log*
-
-# environment variables
-.env
-.env.production
-
-# macOS-specific files
+# OS generated files #
+######################
.DS_Store
+.DS_Store?
+._*
+.Spotlight-V100
+.Trashes
+ehthumbs.db
+Thumbs.db
+
+# helmsman generated tmp folder
+.helmsman-tmp
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# Dependency directories
+node_modules/
+jspm_packages/
+
+# 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
+
+# parcel-bundler cache (https://parceljs.org/)
+.cache
+
+# next.js build output
+.next
+
+# Nuxt
+*.log*
+.nuxt
+.nitro
+.cache
+.output
+.env
+dist
+
+# vuepress build output
+.vuepress/dist
+
+# Serverless directories
+.serverless
+
+# IDE / Editor
+.idea
+
+# Service worker
+sw.*
+
+# Vim swap files
+*.swp
+
+# Auto generate on postinstall step
+auto-imports.d.ts
+components.d.ts
diff --git a/.prettierrc.js b/.prettierrc.js
deleted file mode 100644
index ad6c3f5..0000000
--- a/.prettierrc.js
+++ /dev/null
@@ -1,11 +0,0 @@
-module.exports = {
- semi: false,
- tabWidth: 2,
- useTabs: false,
- printWidth: 80,
- endOfLine: 'auto',
- singleQuote: true,
- trailingComma: 'es5',
- bracketSpacing: true,
- arrowParens: 'always',
-}
diff --git a/Dockerfile b/Dockerfile
index d63e6e6..9f01411 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,13 +1,39 @@
-FROM node:18-alpine as develop-stage
-WORKDIR /app
-COPY package*.json ./
-RUN npm install
-COPY . .
+# see https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
+ARG NODE_VERSION=node:16.14.2
-FROM develop-stage as build-stage
+FROM $NODE_VERSION AS dependency-base
+
+# create destination directory
+RUN mkdir -p /app
+WORKDIR /app
+
+# copy the app, note .dockerignore
+COPY package.json .
+COPY package-lock.json .
+RUN npm ci
+
+FROM dependency-base AS production-base
+
+# build will also take care of building
+# if necessary
+COPY . .
RUN npm run build
-FROM nginx:1.15.7-alpine as production-stage
-COPY --from=build-stage /app/dist /usr/share/nginx/html
-EXPOSE 80
-CMD ["nginx", "-g", "daemon off;"]
+FROM $NODE_VERSION AS production
+
+COPY --from=production-base /app/.output /app/.output
+
+# Service hostname
+ENV NUXT_HOST=0.0.0.0
+
+# Service version
+ARG NUXT_APP_VERSION
+ENV NUXT_APP_VERSION=${NUXT_APP_VERSION}
+
+ENV DATABASE_URL=file:./db.sqlite
+
+# Run in production mode
+ENV NODE_ENV=production
+
+# start the app
+CMD [ "node", "/app/.output/server/index.mjs" ]
diff --git a/License b/License
deleted file mode 100644
index 9d81d27..0000000
--- a/License
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2021 Shamim Hossain
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/README.md b/README.md
index d393cb4..a41fa86 100644
--- a/README.md
+++ b/README.md
@@ -1,90 +1,7 @@
# TODO
-0. anim pegaz create ??
-1. presentation de l'arborecense - doc du code
-2. command line guide - doc du CLI
-3. configuration file ?
+- [ ] anim pegaz create ??
+- [ ] presentation de l'arborecense - doc du code
+- [ ] command line guide - doc du CLI
+- [ ] configuration file ?
-# vue-3-stackter
-
-
-
-A Vue3 starter project setup with these following components,
-
-- [Vite](https://vitejs.dev/)
-- vue-meta-3.0.0-alpha.8
-- Router
-- [Pinia](https://pinia.vuejs.org/) (Vue 3 default)
-- Eslint
-- Prettier
-- [Tailwind CSS](https://tailwindcss.com/)
-- File based routing with [vite-plugin-pages](https://github.com/hannoeru/vite-plugin-pages). (Like [Nuxt file system routing](https://nuxtjs.org/docs/2.x/features/file-system-routing))
-- Layout system with [vite-plugin-vue-layouts](https://github.com/JohnCampionJr/vite-plugin-vue-layouts). (Like [Nuxt layouts](https://nuxtjs.org/docs/2.x/directory-structure/layouts))
-- Components auto importing with [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components)
-- `~/` alias for `/src`. So we don't have to write something like `../../../SomeModule` to import modules.
-- and some custom setups.
-
-[Check out Typescript version here](https://github.com/shamscorner/vitesse-stackter-clean-architect)
-
-### Run this project:
-
-```
-yarn
-yarn dev
-```
-
-### Change site name
-
-In `App.vue` change the following,
-
-```Javascript
-const siteName = 'Vite App' // add your site name here
-```
-
-### Layouts
-
-You can add layouts in your project if you want. You will find `default.vue` and `404.vue` layout examples in this project. For more details, check out [vite-plugin-vue-layouts](https://github.com/JohnCampionJr/vite-plugin-vue-layouts). (Like [Nuxt layouts](https://nuxtjs.org/docs/2.x/directory-structure/layouts) system).
-
-### Pages
-
-You can add pages to your project. You will find some example pages in the `pages` directory (`index.vue`, `about/[name].vue`, and `[...all].vue`). For more details, check out [vite-plugin-pages](https://github.com/hannoeru/vite-plugin-pages). (Like [Nuxt file system routing](https://nuxtjs.org/docs/2.x/features/file-system-routing)).
-
-### Meta info
-
-You can add meta information in your pages. Here is an example,
-
-```Javascript
-
-```
-
-## Recommended IDE Setup
-
-[VSCode](https://code.visualstudio.com/) + [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur). Make sure to enable `vetur.experimental.templateInterpolationService` in settings!
-
-### If Using `
+
+
+
+
+ Pre-configured applications
+
+
+
+
diff --git a/src/components/backup-restore.vue b/components/backup-restore.vue
similarity index 53%
rename from src/components/backup-restore.vue
rename to components/backup-restore.vue
index e5ae428..a032a8e 100644
--- a/src/components/backup-restore.vue
+++ b/components/backup-restore.vue
@@ -1,13 +1,5 @@
- Backup & restore
+
+ Backup & restore
+
-
+
@@ -151,25 +141,27 @@ export default {
class="flex transition-all justify-center duration-1000"
:class="startApps"
>
-
-
-
+
+
+
-
-
tar.gz
+
+
+ tar.gz
+
-
+
+ />
+ />
diff --git a/components/demo.vue b/components/demo.vue
new file mode 100644
index 0000000..3ac470b
--- /dev/null
+++ b/components/demo.vue
@@ -0,0 +1,176 @@
+
+
+
+
+
+
+
+
+ https://
+
+ {{ subDomain }} domain.com
+
+
+
+
+
+
+
+
diff --git a/src/components/disclaimer.vue b/components/disclaimer.vue
similarity index 92%
rename from src/components/disclaimer.vue
rename to components/disclaimer.vue
index b809cd8..a3754e4 100644
--- a/src/components/disclaimer.vue
+++ b/components/disclaimer.vue
@@ -5,7 +5,9 @@
multiple docker-compose.yml configurations.
-
Features
+
+ Features
+
- 🔒 ssl certification
- 🌐 sub-domain & multi-domain directly in docker-compose file
diff --git a/src/components/hero-buttons.vue b/components/hero-buttons.vue
similarity index 52%
rename from src/components/hero-buttons.vue
rename to components/hero-buttons.vue
index 315a505..e041bbe 100644
--- a/src/components/hero-buttons.vue
+++ b/components/hero-buttons.vue
@@ -1,24 +1,14 @@
-
@@ -32,10 +22,10 @@ export default {
get started
curl -sL get.pegaz.io | sudo bash
-
-import Logo from 'Svg/logo.vue'
-
-
-
Pegaz.io
- docker-compose cli superset
+
+ Pegaz.io
+
+
+ docker-compose cli superset
+
diff --git a/src/assets/svg/arrow-right.vue b/components/svg/arrow-right.vue
similarity index 100%
rename from src/assets/svg/arrow-right.vue
rename to components/svg/arrow-right.vue
index 70da7dd..43542aa 100644
--- a/src/assets/svg/arrow-right.vue
+++ b/components/svg/arrow-right.vue
@@ -1,10 +1,10 @@