Skip to content

Commit

Permalink
chore: rename console to admin for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Mar 21, 2024
1 parent 1117fb4 commit 72cfb51
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 26 deletions.
4 changes: 2 additions & 2 deletions docs/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export default defineAppConfig({
target: '_blank',
}, {
icon: 'i-simple-icons-nuxtdotjs',
label: 'NuxtHub Console',
to: 'https://console.hub.nuxt.com',
label: 'NuxtHub Admin',
to: 'https://admin.hub.nuxt.com',
target: '_blank',
}]
}
Expand Down
8 changes: 4 additions & 4 deletions docs/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ const { header } = useAppConfig()
v-bind="{ color: 'gray', variant: 'ghost', ...link }"
/>
</template>
<UButton to="https://console.hub.nuxt.com/?utm_source=nuxthub-docs&utm_medium=header" external icon="i-simple-icons-nuxtdotjs" color="black" class="hidden sm:inline-flex">
NuxtHub Console
<UButton to="https://admin.hub.nuxt.com/?utm_source=nuxthub-docs&utm_medium=header" external icon="i-simple-icons-nuxtdotjs" color="black" class="hidden sm:inline-flex">
NuxtHub Admin
</UButton>
</template>
<template #panel>
<UNavigationTree :links="mapContentNavigation(navigation)" />
<div class="flex py-2">
<UButton to="https://console.hub.nuxt.com/?utm_source=nuxthub-docs&utm_medium=header" external icon="i-simple-icons-nuxtdotjs" color="black" block class="sm:hidden">
NuxtHub Console
<UButton to="https://admin.hub.nuxt.com/?utm_source=nuxthub-docs&utm_medium=header" external icon="i-simple-icons-nuxtdotjs" color="black" block class="sm:hidden">
NuxtHub Admin
</UButton>
</div>
</template>
Expand Down
18 changes: 14 additions & 4 deletions docs/content/docs/1.getting-started/1.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,21 @@ We plan to provide a complete backend experience for Nuxt apps through various `
We are currently in the early stages of development (alpha) and are looking for feedback from the community. If you are interested in contributing, please join us on [nuxt-hub/core](https://github.com/nuxt-hub/core).
::

## Console (alpha)
## Admin (alpha)

[![nuxt-hub-console](/nuxthub-console.png){class="border rounded dark:border-gray-700 border-gray-200"}](https://console.hub.nuxt.com)
::tabs
::div{label="Projects"}
[![nuxt-hub-admin](/nuxthub-admin.png){class="border rounded dark:border-gray-700 border-gray-200"}](https://admin.hub.nuxt.com)
::
::div{label="Deployments"}
[![nuxt-hub-admin-project](/nuxthub-admin-project.png){class="border rounded dark:border-gray-700 border-gray-200"}](https://admin.hub.nuxt.com)
::
::div{label="Database"}
[![nuxt-hub-admin-database](/nuxthub-admin-database.png){class="border rounded dark:border-gray-700 border-gray-200"}](https://admin.hub.nuxt.com)
::
::

The [NuxtHub console](https://console.hub.nuxt.com) is a web based dashboard to manage your NuxtHub apps. It helps you deploy your NuxtHub apps with a single command on your Cloudflare account while provisioning all the necessary resources for you. It abstracts the complexity of managing full-stack Nuxt applications on Cloudflare.
The [NuxtHub admin](https://admin.hub.nuxt.com) is a web based dashboard to manage your NuxtHub apps. It helps you deploy your NuxtHub apps with a single command on your Cloudflare account while provisioning all the necessary resources for you. It abstracts the complexity of managing full-stack Nuxt applications on Cloudflare.

### Features

Expand All @@ -54,5 +64,5 @@ The [NuxtHub console](https://console.hub.nuxt.com) is a web based dashboard to
- Monitor your application with logs and analytics

::note
The NuxtHub Console is currently in private alpha and is not yet open to the public. We are looking for early adopters to help us shape the platform. If you are interested, please register on [console.hub.nuxt.com](https://console.hub.nuxt.com) and tell us what you plan to build with NuxtHub.
The NuxtHub Admin is currently in private alpha and is not yet open to the public. We are looking for early adopters to help us shape the platform. If you are interested, please register on [admin.hub.nuxt.com](https://admin.hub.nuxt.com) and tell us what you plan to build with NuxtHub.
::
12 changes: 6 additions & 6 deletions docs/content/docs/1.getting-started/3.deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ description: How to deploy your full-stack Nuxt project to your Cloudflare accou
To deploy your Nuxt application on the Edge, we use Cloudflare Pages. Therefore, we require you to create a [Cloudflare](https://www.cloudflare.com/) account. :br **You can deploy NuxtHub projects with a free Cloudflare account.**
::

## NuxtHub Console (alpha)
## NuxtHub Admin (alpha)

The [NuxtHub Console](https://console.hub.nuxt.com) is made to simplify your experience with NuxtHub, enabling you to effortlessly manage teams and projects, as well as deploying NuxtHub application with zero-configuration on your Cloudflare account.
The [NuxtHub Admin](https://admin.hub.nuxt.com) is made to simplify your experience with NuxtHub, enabling you to effortlessly manage teams and projects, as well as deploying NuxtHub application with zero-configuration on your Cloudflare account.

### Quickstart

1. Login to https://console.hub.nuxt.com
1. Login to https://admin.hub.nuxt.com
2. Connect your Cloudflare account by clicking on `Create a new token with required permissions` and follow the instructions
3. You are now ready to deploy your Nuxt project to your Cloudflare account!

Expand All @@ -26,7 +26,7 @@ npx nuxthub deploy
```

The command will:
1. Ensure you are logged in on console.hub.nuxt.com
1. Ensure you are logged in on admin.hub.nuxt.com
2. Link your local project with a NuxtHub project or help you create a new one
3. Build your Nuxt project with the correct preset
4. Deploy it to your Cloudflare account with all the necessary resources
Expand All @@ -42,7 +42,7 @@ It is possible to use [Cloudflare Pages CI](https://pages.cloudflare.com) to dep

1. [Create a new Cloudflare Pages project](https://dash.cloudflare.com/?to=/:account/pages/new/provider/github) and link your GitHub or Gitlab repository
2. Select the Nuxt Framework preset in the build settings and click on `Save and Deploy`
3. Open the [NuxtHub Console](https://console.hub.nuxt.com)
3. Open the [NuxtHub Admin](https://admin.hub.nuxt.com)
4. Click on `New Project` then `Import a Cloudflare Pages project`
6. Select your Cloudflare Pages project
7. Click on `Create`
Expand All @@ -53,7 +53,7 @@ That's it! NuxtHub will automatically configure the necessary resources and envi

## Self-hosted

You can deploy your project on your own Cloudflare account without using the NuxtHub Console.
You can deploy your project on your own Cloudflare account without using the NuxtHub Admin.

For that, you need to create the necessary resources in your Cloudflare account and configure your project to use them:

Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/1.getting-started/4.remote-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ NuxtHub will use the remote storage from your deployed project **as long as you

### Production vs Preview

Based on your current git branch, NuxtHub will either use your production or preview environment. You can configure your production environment in your project settings on the [NuxtHub Console](https://console.hub.nuxt.com), default is set to `main`.
Based on your current git branch, NuxtHub will either use your production or preview environment. You can configure your production environment in your project settings on the [NuxtHub Admin](https://admin.hub.nuxt.com), default is set to `main`.

To force a specific environment, you can set the value to the `--remote` option:

Expand Down Expand Up @@ -86,7 +86,7 @@ export default defineNuxtConfig({

### Self-hosted

If you are not using the [NuxtHub Console](https://console.hub.nuxt.com) to manage your project, you can still use the remote storage in your local development environment.
If you are not using the [NuxtHub Admin](https://admin.hub.nuxt.com) to manage your project, you can still use the remote storage in your local development environment.

1. Set the `NUXT_HUB_PROJECT_SECRET_KEY` environment variable in your Cloudflare Pages project settings and retry the last deployment to apply the changes (you can generate a random secret on https://www.uuidgenerator.net/version4)
2. Set the same `NUXT_HUB_PROJECT_SECRET_KEY` and `NUXT_HUB_PROJECT_URL` environment variables in your local project
Expand Down
4 changes: 2 additions & 2 deletions docs/content/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ features:
icon: 'i-simple-icons-cloudflare'
to: 'https://developers.cloudflare.com/pages'
target: '_blank'
- title: 'NuxtHub Console (alpha)'
- title: 'NuxtHub Admin (alpha)'
description: 'Our web based dashboard to deploy & manage your NuxtHub apps with zero configuration.'
icon: 'i-ph-layout-duotone'
to: 'https://console.hub.nuxt.com'
to: 'https://admin.hub.nuxt.com'
target: '_blank'
Binary file added docs/public/nuxthub-admin-database.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/nuxthub-admin-project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/nuxthub-admin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/public/nuxthub-console.png
Binary file not shown.
10 changes: 5 additions & 5 deletions src/module/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export interface ModuleOptions {
*/
remote?: boolean | 'production' | 'preview',
/**
* The URL of the NuxtHub Console
* @default 'https://console.hub.nuxt.com'
* The URL of the NuxtHub Admin
* @default 'https://admin.hub.nuxt.com'
*/
url?: string
/**
Expand Down Expand Up @@ -71,7 +71,7 @@ export default defineNuxtModule<ModuleOptions>({
remoteArg = (remoteArg === '' ? 'true' : remoteArg)
const runtimeConfig = nuxt.options.runtimeConfig
const hub = runtimeConfig.hub = defu(runtimeConfig.hub || {}, options, {
url: process.env.NUXT_HUB_URL || 'https://console.hub.nuxt.com',
url: process.env.NUXT_HUB_URL || 'https://admin.hub.nuxt.com',
projectKey: process.env.NUXT_HUB_PROJECT_KEY || '',
projectUrl: process.env.NUXT_HUB_PROJECT_URL || '',
projectSecretKey: process.env.NUXT_HUB_PROJECT_SECRET_KEY || '',
Expand All @@ -86,8 +86,8 @@ export default defineNuxtModule<ModuleOptions>({
delete hub.remote
}
// Log when using a different Hub url
if (hub.url !== 'https://console.hub.nuxt.com') {
log.info(`Using \`${hub.url}\` as NuxtHub Console URL`)
if (hub.url !== 'https://admin.hub.nuxt.com') {
log.info(`Using \`${hub.url}\` as NuxtHub Admin URL`)
}

// Add Server caching (Nitro)
Expand Down
2 changes: 1 addition & 1 deletion src/module/runtime/server/middleware/1.hub-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default eventHandler(async (event) => {
if (projectKey) {
// Here the secretKey is a user token
await $fetch(`/api/projects/${projectKey}`, {
baseURL: process.env.NUXT_HUB_URL || 'https://console.hub.nuxt.com',
baseURL: process.env.NUXT_HUB_URL || 'https://admin.hub.nuxt.com',
method: 'HEAD',
headers: {
authorization: `Bearer ${secretKeyOrUserToken}`
Expand Down

0 comments on commit 72cfb51

Please sign in to comment.