Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"eslint.experimental.useFlatConfig": true,
"eslint.useFlatConfig": true,
"prettier.enable": false,
}
71 changes: 71 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,77 @@
# Changelog


## v0.7.3

[compare changes](https://github.com/nuxt-hub/core/compare/v0.7.2...v0.7.3)

### 🩹 Fixes

- **blob:** Support customMetadata in proxy on `put()` ([#231](https://github.com/nuxt-hub/core/pull/231))

### 📖 Documentation

- HubAI() minimum version and image opti ([1cebec3](https://github.com/nuxt-hub/core/commit/1cebec3))
- Use the right date ([521662a](https://github.com/nuxt-hub/core/commit/521662a))
- More improvements ([efe912f](https://github.com/nuxt-hub/core/commit/efe912f))
- Update image sizes ([287d678](https://github.com/nuxt-hub/core/commit/287d678))
- Update changelog ([bc895d6](https://github.com/nuxt-hub/core/commit/bc895d6))
- Prerender /api/changelog.json ([7a3627c](https://github.com/nuxt-hub/core/commit/7a3627c))

### 🏡 Chore

- **playground:** Fix database reactivity ([5b3b2a8](https://github.com/nuxt-hub/core/commit/5b3b2a8))

### ❤️ Contributors

- Sébastien Chopin ([@atinux](http://github.com/atinux))

## v0.7.2

[compare changes](https://github.com/nuxt-hub/core/compare/v0.7.1...v0.7.2)

### 🚀 Enhancements

- Add hubAI() ([#173](https://github.com/nuxt-hub/core/pull/173))

### 🩹 Fixes

- Support remote overwrites ([9b434eb](https://github.com/nuxt-hub/core/commit/9b434eb))

### 📖 Documentation

- Deploy button ([ca132e7](https://github.com/nuxt-hub/core/commit/ca132e7))
- Add deploy button changelog ([e9ecf1f](https://github.com/nuxt-hub/core/commit/e9ecf1f))
- **changelog:** Small update ([9fcc96b](https://github.com/nuxt-hub/core/commit/9fcc96b))
- Update Cloudflare KV included usage information ([#206](https://github.com/nuxt-hub/core/pull/206))
- Fix typo ([#212](https://github.com/nuxt-hub/core/pull/212))
- Add deploy section ([91a1d97](https://github.com/nuxt-hub/core/commit/91a1d97))
- Add debug recipe ([784fd58](https://github.com/nuxt-hub/core/commit/784fd58))
- **recipe:** Update debug header ([dad8793](https://github.com/nuxt-hub/core/commit/dad8793))
- Add postinstall script ([f1ce27e](https://github.com/nuxt-hub/core/commit/f1ce27e))
- Article about atidraw ([#225](https://github.com/nuxt-hub/core/pull/225))
- Fix blog breadcrumb responsive ([b9d2faa](https://github.com/nuxt-hub/core/commit/b9d2faa))
- Update steps illustrations ([cba1af7](https://github.com/nuxt-hub/core/commit/cba1af7))

### 🏡 Chore

- **release:** V0.7.1 ([a4377db](https://github.com/nuxt-hub/core/commit/a4377db))
- Fix typo in analytics.ts ([#198](https://github.com/nuxt-hub/core/pull/198))
- Uncomment pkg.pr.new ([#197](https://github.com/nuxt-hub/core/pull/197))
- Disable prettier ([#226](https://github.com/nuxt-hub/core/pull/226))
- **test:** More limit to timeout ([9cffde4](https://github.com/nuxt-hub/core/commit/9cffde4))

### ❤️ Contributors

- Sébastien Chopin ([@atinux](http://github.com/atinux))
- Rihan ([@RihanArfan](http://github.com/RihanArfan))
- Estéban <e.soubiran25@gmail.com>
- Linzhe ([@linzhe141](http://github.com/linzhe141))
- Tom Taylor <tom@twisted.digital>
- Mohammad Bagher Abiyat ([@Aslemammad](http://github.com/Aslemammad))
- 面条 ([@ccbikai](http://github.com/ccbikai))
- Farnabaz <farnabaz@gmail.com>

## v0.7.1

[compare changes](https://github.com/nuxt-hub/core/compare/v0.7.0...v0.7.1)
Expand Down
66 changes: 33 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,67 @@
# NuxtHub
# NuxtHub: Full-Stack Nuxt on Cloudflare, with Zero Config

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]

Build full-stack applications with Nuxt on Cloudflare, with zero configuration.
Build and deploy powerful full-stack Nuxt applications on your Cloudflare account, with zero configuration.

## Features
NuxtHub supercharges your Nuxt development workflow so you can focus on shipping features.

- **Deploy your Nuxt app** to your Cloudflare account with [`npx nuxthub deploy`](https://github.com/nuxt-hub/cli) or with the [NuxtHub Admin](https://admin.hub.nuxt.com)
- **SQL database** to store your application's data with [`hubDatabase()`](https://hub.nuxt.com/docs/storage/database)
- **Key-Value** to store JSON data accessible globally with low-latency with [`hubKV()`](https://hub.nuxt.com/docs/storage/kv)
- **Blob storage** to store static assets, such as images, videos and more with [`hubBlob()`](https://hub.nuxt.com/docs/storage/blob)
- **Cache storage** to cache your server route responses or functions using Nitro's [`cachedEventHandler`](https://nitro.unjs.io/guide/cache#cached-event-handlers) and [`cachedFunction`](https://nitro.unjs.io/guide/cache#cached-functions)
## ✨ Key Features

NuxtHub provides optional features to help you build full-stack applications:
- [**Deploy your Nuxt app**](https://hub.nuxt.com/docs/getting-started/deploy) to your Cloudflare account with [`npx nuxthub deploy`](https://github.com/nuxt-hub/cli) or with the [NuxtHub Admin](https://admin.hub.nuxt.com)
- [**AI Models**](https://hub.nuxt.com/docs/features/ai) to run machine learning models, such as LLMs in Nuxt.
- [**Files storage**](https://hub.nuxt.com/docs/features/blob) to store static assets, such as images, videos and more
- [**Caching system**](https://hub.nuxt.com/docs/features/cache) for your Nuxt pages, API routes or server functions
- [**SQL database**](https://hub.nuxt.com/docs/features/database) to store your application's data
- [**Key-Value**](https://hub.nuxt.com/docs/features/kv) to store JSON data accessible globally with low-latency
- [**Open API**](https://hub.nuxt.com/docs/features/open-api) to generate your API documentation with [Scalar](https://scalar.com)
- [**Remote Storage**](https://hub.nuxt.com/docs/getting-started/remote-storage) to connect to your project's resources from your local environment, allowing you to work with your remote storage as if it was local with `npx nuxi dev --remote`.

Read more on https://hub.nuxt.com

## Quick Setup
## 🚀 Quickstart

Head over to our [Getting Started](https://hub.nuxt.com/docs/getting-started/installation) guide to learn more.

Duplicate our [nuxt-hub/starter](https://github.com/nuxt-hub/starter) or create a new NuxtHub project with:
Duplicate our `nuxt-hub/hello-edge` template or create a new NuxtHub project with:

```bash
npx nuxthub init my-app
cd my-app
npm run dev
```

## Add to a Nuxt project
Open http://localhost:3000 with your browser.

1. Install `@nuxthub/core` dependency to your project:
Deploy your app to production with:

```bash
npx nypm@latest add @nuxthub/core
npx nuxthub deploy
```

2. Install `wrangler` development dependency to your project:
https://github.com/user-attachments/assets/c591efaa-96e7-4357-8d60-cdc1e20e93ed

```bash
npx nypm@latest add -D wrangler
```
Learn more on [how to deploy a Nuxt app with NuxtHub](https://hub.nuxt.com/docs/getting-started/deploy).

3. Add `@nuxthub/core` to the `modules` section of `nuxt.config.ts`
## 📚 Resources

```js
export default defineNuxtConfig({
modules: [
'@nuxthub/core'
]
})
```

That's it! You can now use NuxtHub features in your Nuxt app ✨
- [NuxtHub Website](https://hub.nuxt.com)
- [NuxtHub Admin](https://admin.hub.nuxt.com)
- [NuxtHub CLI](https://github.com/nuxt-hub/cli)
- [NuxtHub Templates](https://hub.nuxt.com/templates)

## Feedback
## 🤝 Community

- 💡 [Feature request](https://github.com/nuxt-hub/core/issues/new?assignees=&labels=enhancement&projects=&template=%F0%9F%92%A1-feature-request.md&title=): Suggest an idea or improvement.
- 🐞 [Bug report](https://github.com/nuxt-hub/core/issues/new?assignees=&labels=bug&projects=&template=%F0%9F%90%9E-bug-report.md&title=): Create a report to help us improve the platform.
- 🏞️ [New Template](https://github.com/nuxt-hub/core/issues/new?assignees=&labels=template&projects=&template=%F0%9F%8F%9E%EF%B8%8F-new-template.md&title=): Share a template you made based on NuxtHub.


## Contributing
## 💚 Contributing

```bash
# Install dependencies
Expand All @@ -79,12 +82,9 @@ pnpm lint
# Run Vitest
pnpm test
pnpm test:watch

# Release new version
pnpm release
```

## License
## 📄 License

[Apache 2.0](./LICENSE)

Expand Down
6 changes: 5 additions & 1 deletion docs/components/AppFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ const links = [
label: 'Privacy',
to: 'https://admin.hub.nuxt.com/privacy',
target: '_blank'
}, {
label: 'Status',
to: 'https://status.hub.nuxt.com',
target: '_blank'
}
]
</script>
Expand All @@ -22,7 +26,7 @@ const links = [
</template>

<template #right>
<UColorModeButton />
<ColorScheme><UColorModeSelect /></ColorScheme>
<UButton
icon="i-simple-icons-x"
color="gray"
Expand Down
10 changes: 5 additions & 5 deletions docs/components/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const navLinks = links.map((link) => {
children: mapContentNavigation(navigation.value)
.find(link => link.label === 'Docs')
.children
.map(({ icon, ...link }) => link)
.map(({ icon, ...link }) => link) // eslint-disable-line @typescript-eslint/no-unused-vars
}
}
return {
Expand All @@ -50,16 +50,16 @@ const navLinks = links.map((link) => {
<UTooltip text="Search" :shortcuts="[metaSymbol, 'K']" :popper="{ strategy: 'absolute' }">
<UContentSearchButton :label="null" />
</UTooltip>
<UButton variant="ghost" label="Log in" to="https://admin.hub.nuxt.com/" color="black" size="md" class="hidden sm:block" external />
<UButton variant="solid" label="Sign up" to="https://admin.hub.nuxt.com/" size="md" class="hidden sm:block" external />
<UButton variant="ghost" label="Log in" to="https://admin.hub.nuxt.com/" color="black" class="hidden sm:block" external />
<UButton variant="solid" label="Sign up" to="https://admin.hub.nuxt.com/" class="hidden sm:block" external />
</template>

<template #panel>
<UNavigationTree :links="navLinks" :default-open="1" :multiple="false" :ui="{ accordion: { button: { label: 'font-normal' } } }" />

<div class="flex flex-col gap-y-2 mt-4">
<UButton variant="solid" label="Log in" to="https://admin.hub.nuxt.com/" color="white" size="md" class="flex justify-center sm:hidden" external />
<UButton variant="solid" label="Sign up" to="https://admin.hub.nuxt.com/" size="md" class="flex justify-center text-gray-900 bg-primary sm:hidden" external />
<UButton variant="solid" label="Log in" to="https://admin.hub.nuxt.com/" color="white" class="flex justify-center sm:hidden" external />
<UButton variant="solid" label="Sign up" to="https://admin.hub.nuxt.com/" class="flex justify-center text-gray-900 bg-primary sm:hidden" external />
</div>
</template>
</UHeader>
Expand Down
134 changes: 0 additions & 134 deletions docs/components/HeroDark.vue
Original file line number Diff line number Diff line change
@@ -1,41 +1,3 @@
<script setup lang="ts">
const timeoutIds = ref([])
const outline = ref<SVGPathElement>()
const lines = ref<SVGPathElement>()
const topLight = ref<SVGElement>()
const bottomLight = ref<SVGElement>()
const logo = ref<SVGElement>()

onMounted(() => {
const timeoutIdA = setTimeout(() => {
outline.value.classList.add('animate-border')
lines.value.classList.add('opacity-0')
topLight.value.classList.add('opacity-0')
bottomLight.value.classList.add('opacity-0')
logo.value.classList.remove('opacity-0')
logo.value.classList.add('opacity-1')

const timeoutIdB = setTimeout(() => {
lines.value.classList.add('animate-lines')
lines.value.classList.remove('opacity-0')
lines.value.classList.add('opacity-1')

const timeoutIdC = setTimeout(() => {
topLight.value.classList.add('animate-light')
bottomLight.value.classList.add('animate-light')
}, 500)
timeoutIds.value.push(timeoutIdC)
}, 1000)
timeoutIds.value.push(timeoutIdB)
}, 300)
timeoutIds.value.push(timeoutIdA)
})

onBeforeUnmount(() => {
timeoutIds.value.map(id => clearTimeout(id))
})
</script>

<template>
<svg viewBox="0 0 1439 872" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_414_4477)">
Expand Down Expand Up @@ -182,60 +144,6 @@ onBeforeUnmount(() => {
<circle cx="691" cy="418" r="2" fill="url(#paint219_radial_414_4477)" />
<circle cx="726" cy="393" r="2" fill="url(#paint220_radial_414_4477)" />
</g>
<g ref="logo" class="opacity-0 hidden lg:block">

<rect x="1031" y="185" width="370" height="370" fill="url(#paint221_radial_414_4477)" fill-opacity="0.7" />
<mask
id="mask0_414_4477" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="1089" y="286" width="254"
height="169"
>
<path
ref="outline"
d="M1231.33 448.196H1320.66C1323.5 448.196 1326.3 447.476 1328.77 446.107C1331.24 444.739 1333.28 442.771 1334.71 440.401C1336.13 438.03 1336.88 435.342 1336.88 432.605C1336.88 429.869 1336.13 427.181 1334.7 424.812L1274.48 324.594C1273.05 322.224 1271 320.257 1268.54 318.888C1266.07 317.52 1263.27 316.8 1260.43 316.8C1257.58 316.8 1254.78 317.52 1252.31 318.888C1249.85 320.257 1247.8 322.224 1246.38 324.594L1230.98 350.236L1200.87 300.094C1199.44 297.724 1197.4 295.757 1194.93 294.389C1192.46 293.021 1189.66 292.301 1186.82 292.301C1183.97 292.301 1181.17 293.021 1178.7 294.389C1176.24 295.757 1174.19 297.724 1172.76 300.094L1097.82 424.812C1096.39 427.181 1095.64 429.869 1095.64 432.605C1095.64 435.342 1096.39 438.03 1097.81 440.401C1099.23 442.771 1101.28 444.739 1103.75 446.107C1106.22 447.476 1109.01 448.196 1111.86 448.196H1168.16C1190.46 448.196 1206.91 438.783 1218.23 420.421L1245.7 374.703L1260.42 350.236L1304.59 423.729H1245.7L1231.33 448.196ZM1167.24 423.704L1127.95 423.695L1186.84 325.711L1216.22 374.703L1196.55 407.449C1189.04 419.363 1180.5 423.704 1167.24 423.704Z"
stroke="url(#paint222_linear_414_4477)" stroke-width="12"
/>
</mask>
<g mask="url(#mask0_414_4477)">
<path
d="M1231.33 448.196H1320.66C1323.5 448.196 1326.3 447.476 1328.77 446.107C1331.24 444.739 1333.28 442.771 1334.71 440.401C1336.13 438.03 1336.88 435.342 1336.88 432.605C1336.88 429.869 1336.13 427.181 1334.7 424.812L1274.48 324.594C1273.05 322.224 1271 320.257 1268.54 318.888C1266.07 317.52 1263.27 316.8 1260.43 316.8C1257.58 316.8 1254.78 317.52 1252.31 318.888C1249.85 320.257 1247.8 322.224 1246.38 324.594L1230.98 350.236L1200.87 300.094C1199.44 297.724 1197.4 295.757 1194.93 294.389C1192.46 293.021 1189.66 292.301 1186.82 292.301C1183.97 292.301 1181.17 293.021 1178.7 294.389C1176.24 295.757 1174.19 297.724 1172.76 300.094L1097.82 424.812C1096.39 427.181 1095.64 429.869 1095.64 432.605C1095.64 435.342 1096.39 438.03 1097.81 440.401C1099.23 442.771 1101.28 444.739 1103.75 446.107C1106.22 447.476 1109.01 448.196 1111.86 448.196H1168.16C1190.46 448.196 1206.91 438.783 1218.23 420.421L1245.7 374.703L1260.42 350.236L1304.59 423.729H1245.7L1231.33 448.196ZM1167.24 423.704L1127.95 423.695L1186.84 325.711L1216.22 374.703L1196.55 407.449C1189.04 419.363 1180.5 423.704 1167.24 423.704Z"
fill="url(#paint223_linear_414_4477)"
/>
</g>
<path
ref="lines"
d="M1260.5 346.5L1286.77 351.512L1299.84 372.963L1312.55 395.198L1309 427M1260.5 346.5L1243.05 337.633L1231.55 356.005M1260.5 346.5L1263.25 317.83M1309 427H1332.5M1309 427L1276 444.279L1246.08 428.167M1100.07 440.306L1122.96 425.886M1122.96 425.886V389.284L1138.87 361.57L1157.59 332.479L1186.39 317.868M1122.96 425.886L1145.18 445.019H1165.67C1165.67 445.019 1169.82 445.118 1176 444.5C1186 443.5 1198.5 436.5 1198.5 436.5V412.005L1221.56 407.083L1220.12 374.31L1231.55 356.005M1186.39 317.868L1174.03 300.836M1186.39 317.868L1202.07 309.277L1213.28 326.879L1231.55 356.005"
stroke="url(#paint224_linear_414_4477)" stroke-width="6"
/>

<g ref="topLight">
<g filter="url(#filter2_f_414_4477)">
<path
d="M1216.8 416C1201.41 446.111 1177.72 445.166 1166.9 444.942L1194.05 436.743L1216.8 416Z"
fill="#75EDAE"
/>
</g>
<g filter="url(#filter3_f_414_4477)">
<path
d="M1216.8 416C1201.41 446.111 1176.82 445.166 1166 444.942L1194.05 436.743L1216.8 416Z"
fill="#75EDAE"
/>
</g>
</g>
<g ref="bottomLight">
<g filter="url(#filter4_f_414_4477)">
<path
d="M1239.1 339.851C1247.47 313.465 1273.21 316.039 1276.75 331.484L1258.41 320.866L1239.1 339.851Z"
fill="#75EDAE"
/>
</g>
<g filter="url(#filter5_f_414_4477)">
<path
d="M1239.1 337.275C1247.47 310.89 1274.82 314.43 1278.36 333.415L1258.73 320.221L1239.1 337.275Z"
fill="#75EDAE"
/>
</g>
</g>
</g>
</g>
<defs>
<filter
Expand Down Expand Up @@ -1921,45 +1829,3 @@ onBeforeUnmount(() => {
</defs>
</svg>
</template>

<style lang="postcss">
@keyframes animateBorderHeight {
0% {
stroke-width: 0;
}

100% {
stroke-width: 12.4079;
}
}

@keyframes dash {
to {
stroke-dashoffset: 0;
}
}

@keyframes opacity {
from {
opacity: 0;
}

to {
opacity: 1;
}
}

.animate-lines {
stroke-dasharray: 2000;
stroke-dashoffset: 2000;
animation: dash 5s linear forwards;
}

.animate-border {
animation: animateBorderHeight 1s ease forwards;
}

.animate-light {
animation: opacity 2s ease forwards;
}
</style>
Loading