diff --git a/packages/hoppscotch-sh-admin/.env.example b/packages/hoppscotch-sh-admin/.env.example new file mode 100644 index 000000000..baf0c1722 --- /dev/null +++ b/packages/hoppscotch-sh-admin/.env.example @@ -0,0 +1,4 @@ +# Backend URLs +VITE_BACKEND_GQL_URL='*****************************' +VITE_BACKEND_WS_URL='******************************' +VITE_BACKEND_API_URL='*****************************' diff --git a/packages/hoppscotch-sh-admin/README.md b/packages/hoppscotch-sh-admin/README.md new file mode 100644 index 000000000..d5cc17347 --- /dev/null +++ b/packages/hoppscotch-sh-admin/README.md @@ -0,0 +1,45 @@ +
+ + Hoppscotch Logo + +
+

+

+ + Hoppscotch Self Hosted Admin Dashboard + +

+

+ +#### **Support** + +[![Chat on Discord](https://img.shields.io/badge/chat-Discord-7289DA?logo=discord)](https://hoppscotch.io/discord) [![Chat on Telegram](https://img.shields.io/badge/chat-Telegram-2CA5E0?logo=telegram)](https://hoppscotch.io/telegram) [![Discuss on GitHub](https://img.shields.io/badge/discussions-GitHub-333333?logo=github)](https://github.com/hoppscotch/hoppscotch/discussions) + +
+ +## **Built with** + +- [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML) +- [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS), [SCSS](https://sass-lang.com), [Windi CSS](https://windicss.org) +- [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript) +- [TypeScript](https://www.typescriptlang.org) +- [Vue](https://vuejs.org) +- [Vite](https://vitejs.dev) + +## **Developing** + +0. Update [`.env.example`](https://github.com/hoppscotch/hoppscotch/blob/main/.env.example) file found in the root of repository with your own keys and rename it to `.env`. + +### Local development environment + +1. [Clone this repo](https://help.github.com/en/articles/cloning-a-repository) with git. +2. Update `.env.example` file found in the root of `hoppscotch-sh-admin` directory with your own keys and rename it to `.env`. +3. Install pnpm using npm by running `npm install -g pnpm`. +4. Install dependencies by running `pnpm install` within the `hoppscotch-sh-admin` directory +5. It is assumed that the backend is running. Refer the Hoppscotch Backend [`README`](https://github.com/hoppscotch/self-hosted/blob/main/packages/hoppscotch-backend/README.md) to get the backend setup and running. +6. Start the development server with `pnpm run dev`. +7. Open the development site by going to [`http://localhost:3000`](http://localhost:3000) in your browser. diff --git a/packages/hoppscotch-sh-admin/src/App.vue b/packages/hoppscotch-sh-admin/src/App.vue index cb647e8d0..75e52b968 100644 --- a/packages/hoppscotch-sh-admin/src/App.vue +++ b/packages/hoppscotch-sh-admin/src/App.vue @@ -5,7 +5,6 @@ - - diff --git a/packages/hoppscotch-sh-admin/src/components.d.ts b/packages/hoppscotch-sh-admin/src/components.d.ts index a26536564..e04de87a2 100644 --- a/packages/hoppscotch-sh-admin/src/components.d.ts +++ b/packages/hoppscotch-sh-admin/src/components.d.ts @@ -1,40 +1,38 @@ // generated by unplugin-vue-components // We suggest you to commit this file into source control // Read more: https://github.com/vuejs/core/pull/3399 -import '@vue/runtime-core' +import '@vue/runtime-core'; -export {} +export {}; declare module '@vue/runtime-core' { export interface GlobalComponents { - AppHeader: typeof import('./components/app/Header.vue')['default'] - AppLogin: typeof import('./components/app/Login.vue')['default'] - AppLogout: typeof import('./components/app/Logout.vue')['default'] - AppModal: typeof import('./components/app/Modal.vue')['default'] - AppSidebar: typeof import('./components/app/Sidebar.vue')['default'] - AppToast: typeof import('./components/app/Toast.vue')['default'] - HoppButtonPrimary: typeof import('@hoppscotch/ui')['HoppButtonPrimary'] - HoppButtonSecondary: typeof import('@hoppscotch/ui')['HoppButtonSecondary'] - HoppSmartAnchor: typeof import('@hoppscotch/ui')['HoppSmartAnchor'] - HoppSmartConfirmModal: typeof import('@hoppscotch/ui')['HoppSmartConfirmModal'] - HoppSmartItem: typeof import('@hoppscotch/ui')['HoppSmartItem'] - IconLucideBell: typeof import('~icons/lucide/bell')['default'] - IconLucideInbox: typeof import('~icons/lucide/inbox')['default'] - IconLucideLayoutDashboard: typeof import('~icons/lucide/layout-dashboard')['default'] - IconLucideLineChart: typeof import('~icons/lucide/line-chart')['default'] - IconLucideLock: typeof import('~icons/lucide/lock')['default'] - IconLucideMenu: typeof import('~icons/lucide/menu')['default'] - IconLucideSettings: typeof import('~icons/lucide/settings')['default'] - IconLucideSidebarClose: typeof import('~icons/lucide/sidebar-close')['default'] - IconLucideSidebarOpen: typeof import('~icons/lucide/sidebar-open')['default'] - IconLucideUser: typeof import('~icons/lucide/user')['default'] - IconLucideUserCog: typeof import('~icons/lucide/user-cog')['default'] - IconLucideUsers: typeof import('~icons/lucide/users')['default'] - ProfilePicture: typeof import('./components/profile/Picture.vue')['default'] - RouterLink: typeof import('vue-router')['RouterLink'] - RouterView: typeof import('vue-router')['RouterView'] - TeamsAddMembers: typeof import('./components/teams/AddMembers.vue')['default'] - UsersDetails: typeof import('./components/users/Details.vue')['default'] + AppHeader: typeof import('./components/app/Header.vue')['default']; + AppLogin: typeof import('./components/app/Login.vue')['default']; + AppLogout: typeof import('./components/app/Logout.vue')['default']; + AppModal: typeof import('./components/app/Modal.vue')['default']; + AppSidebar: typeof import('./components/app/Sidebar.vue')['default']; + AppToast: typeof import('./components/app/Toast.vue')['default']; + HoppButtonPrimary: typeof import('@hoppscotch/ui')['HoppButtonPrimary']; + HoppButtonSecondary: typeof import('@hoppscotch/ui')['HoppButtonSecondary']; + HoppSmartAnchor: typeof import('@hoppscotch/ui')['HoppSmartAnchor']; + HoppSmartConfirmModal: typeof import('@hoppscotch/ui')['HoppSmartConfirmModal']; + HoppSmartItem: typeof import('@hoppscotch/ui')['HoppSmartItem']; + IconLucideBell: typeof import('~icons/lucide/bell')['default']; + IconLucideInbox: typeof import('~icons/lucide/inbox')['default']; + IconLucideLayoutDashboard: typeof import('~icons/lucide/layout-dashboard')['default']; + IconLucideLineChart: typeof import('~icons/lucide/line-chart')['default']; + IconLucideLock: typeof import('~icons/lucide/lock')['default']; + IconLucideMenu: typeof import('~icons/lucide/menu')['default']; + IconLucideSettings: typeof import('~icons/lucide/settings')['default']; + IconLucideSidebarClose: typeof import('~icons/lucide/sidebar-close')['default']; + IconLucideSidebarOpen: typeof import('~icons/lucide/sidebar-open')['default']; + IconLucideUser: typeof import('~icons/lucide/user')['default']; + IconLucideUserCog: typeof import('~icons/lucide/user-cog')['default']; + IconLucideUsers: typeof import('~icons/lucide/users')['default']; + ProfilePicture: typeof import('./components/profile/Picture.vue')['default']; + RouterLink: typeof import('vue-router')['RouterLink']; + RouterView: typeof import('vue-router')['RouterView']; + TeamsAddMembers: typeof import('./components/teams/AddMembers.vue')['default']; } - } diff --git a/packages/hoppscotch-sh-admin/src/components/app/Header.vue b/packages/hoppscotch-sh-admin/src/components/app/Header.vue index 247a28001..a2aa98fa9 100644 --- a/packages/hoppscotch-sh-admin/src/components/app/Header.vue +++ b/packages/hoppscotch-sh-admin/src/components/app/Header.vue @@ -1,6 +1,6 @@