This is a starter template to kick-start your Nuxt
full-stack project
Note: the app comes with a localcert
SSL for local development, generated with mkcert, you can install mkcert's local CA to remove the untrusted SSL warning
ā© This template is powered by Turborepo.
š Out-of-the-box, this repo is configured for an SSG frontend
Nuxt app, and a backend
Hono app that will be the main API, to optimize on cost and simplicity.
- Simply change the
apps/frontend
's build script tonuxt build
to enable SSR building
š©ļø Utilizing SST Ion for Infrastructure-as-Code, with powerful Live development.
- SST is 100% opt-in, by using
sst
CLI commands yourself, likesst dev
,
simply removesst
dependency andsst.config.ts
if you want to use another solution. - currently only
backend
app is configured, which will deploy a Lambda with Function URL enabled
š Comes with fully-configured Kinde typescript-sdk, see: /apps/backend/api/auth
- Add your env variables, activate the auth routes, profit$
frontend
: a Nuxt app, configured same as starter-nuxt.- In development,
/api/*
routes is proxied to thebackendUrl
. - The
rpcApi
plugin will call the/api/*
proxy if they're on the same domain (e.g: 127.0.0.1)-
this mimics a production environment where the static frontend and the backend lives on the same domain at /api, which is the most efficient configuration for Cloudfront + Lambda Function Url
- If the
frontend
andbackend
are on different domains then the backend will be called directly without proxy.
-
- In development,
backend
: a Honoš„ app.@local/common
: a shared library that can contain constants, functions, types shared across all apps.@local/common-vue
: a shared library that can contain components, constants, functions, types shared across vue-based apps.tsconfig
:tsconfig.json
s used throughout the monorepo.
Each package/app is 100% TypeScript.
This Turborepo has some additional tools already setup for you:
- TypeScript for static type checking
- ESLint for code linting
To build all apps and packages, run the following command:
pnpm run build
To develop all apps and packages, run the following command:
pnpm run dev
Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:
npx turbo login
This will authenticate the Turborepo CLI with your Vercel account.
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
npx turbo link
Learn more about the power of Turborepo: