This is a template starter for Nuxt web applicatons. It is being build as the setup I'd currently use to start with a new "real world" Nuxt webapp. It will improve and grow together with my skills. I also try to include WHAT and WHY comments based on my knowledge about the framework and used libraries.
- Do a
git checkout
from https://github.com/AloisSeckar/nuxt-ignis.git - Open in IDE and run
pnpm install
in terminal - Configure modules via
.env
properties - Start dev server with
pnpm dev
command - Visit
localhost:3000
in browser
You are ready to build your next awesome project in Nuxt!
Aside from being "forked", nuxt-ignis
is also available as NPM package that can be referenced as a single-import with all the features incomming.
- Add following dependency into your
package.json
:
"nuxt-ignis": "0.1.6"
- Add following section into your
nuxt.config.ts
:
extends: [
'nuxt-ignis'
]
- Add
.npmrc
file with following content (if you don't have it yet):
shamefully-hoist=true
strict-peer-dependencies=false
- Setup your
.env
to fit your project needs. Check Configuration section for reference.
You are ready to build your next awesome project in Nuxt!
If you use Netlify for deployment then for some reasons not yet clear to me after extending from Nuxt Ignis you have to add two explicit dependencies into your package.json
, namely:
"vue": "latest",
"vue-router": "latest"
Without this workaround the project builds and deploys but will hit runtime error 500 upon loading the page. Hopefully, this is just a temporary issue (12/2024).
Fundamentals
pnpm
based project- Nuxt application framework built atop Vue.js
- Available as a starter template or standalone NPM package to extend from
Built-in features
- linting for maintaining coding standards and improving code quality via
@nuxt/eslint
- zero-config OWASP security patterns for Nuxt via
nuxt-security
- de-facto standard state management library for Vue apps via
@pinia/nuxt
- integration with utility functions library for Vue apps via
@vueuse/nuxt
- handful tools for working with images via
@nuxt/image
- SSR-friendly component for rendering dynamic date/time via
nuxt-time
Configurable features
- UI (pick 0-1)
- Nuxt UI - UI component and CSS library via
@nuxt/ui
- Tailwind CSS - CSS library (included in Nuxt UI) via
@nuxtjs/tailwindcss
- Nuxt UI - UI component and CSS library via
- Database (pick 0-1)
- Neon - serverless PostgreSQL database via
nuxt-neon
- Supabase - serverless PostgreSQL database via
@nuxtjs/supabase
- Neon - serverless PostgreSQL database via
- Other (opt-in)
- I18N - translations and internalization made easy via
@nuxtjs/i18n
- FormKit - for handling input forms via
@formkit/nuxt
- Content - for working with website content in
.md
or.json
via@nuxt/content
- Open Props - extra CSS styles via Open Props
- pslo - treating single letter words at the end of line via elrh-pslo
- I18N - translations and internalization made easy via
It is possible to select which Nuxt modules will be activated in your project. All dependencies are being downloaded into local node_modules
, but Nuxt build process will ensure only relevant packages will be bundled for production.
It is possible to pick from three options:
nuxt-ui
- full https://ui.nuxt.com/ via@nuxt/ui
connector module [RECOMMENDED]tailwind
- only https://tailwindcss.com/ via@nuxtjs/tailwindcss
connector moduleoff
- no UI library preset [DEFAULT]
Set the value via NUXT_PUBLIC_IGNIS_PRESET_UI
env variable.
Value other than off
will override Optional modules setting.
It is possible to pick from three options:
neon
- https://neon.tech/ vianuxt-neon
connector module [RECOMMENDED]supabase
- https://supabase.com/ via@nuxtjs/supabase
connector moduleoff
- no database module preset [DEFAULT]
Set the value via NUXT_PUBLIC_IGNIS_PRESET_DB
env variable.
Value other than off
will override Optional modules setting.
Currently, following modules are opinionated:
@nuxt/ui
- setNUXT_PUBLIC_IGNIS_UI
totrue | false
@nuxtjs/tailwindcss
- setNUXT_PUBLIC_IGNIS_TAILWIND
totrue | false
(ignored ifNUXT_PUBLIC_IGNIS_UI=true
)nuxt-neon
- setNUXT_PUBLIC_IGNIS_NEON
totrue | false
@nuxtjs/supabase
- setNUXT_PUBLIC_IGNIS_SUPABASE
totrue | false
@nuxtjs/i18n
- setNUXT_PUBLIC_IGNIS_I18N_ENABLED
totrue | false
@formkit/nuxt
- setNUXT_PUBLIC_IGNIS_FORMKIT_ENABLED
totrue | false
@nuxt/content
- setNUXT_PUBLIC_IGNIS_CONTENT
totrue | false
Default values are false (not included) for all optional modules.
- you can select default language locale via
NUXT_PUBLIC_IGNIS_I18N_LOCALE
- all
.json
files with messages in@assets/lang
folder will be auto-scanned - if default config file is not suitable for your project, you may specify path to your own using
NUXT_PUBLIC_IGNIS_I18N_CONFIG
- you can select default language locale via
NUXT_PUBLIC_IGNIS_FORMKIT_LOCALE
- if default config file is not suitable for your project, you may specify path to your own using
NUXT_PUBLIC_IGNIS_FORMKIT_CONFIG
Currently, following extra features (not using separate Nuxt Modules) are opinionated:
Open Props CSS
- setNUXT_PUBLIC_IGNIS_OPENPROPS
totrue | false
elrh-pslo
- setNUXT_PUBLIC_IGNIS_PSLO_ENABLED
totrue | false
Default values are false (not included) for all optional features.
There are two config values for this feature:
NUXT_PUBLIC_IGNIS_PSLO_ENABLED
- setting to true will allow utility functionpslo
to treat texts in your appNUXT_PUBLIC_IGNIS_PSLO_CONTENT
- if bothelrh-pslo
and@nuxt/content
are enabled, this allows or disallows Markdown content pre-processing withpslo
function
Currently, it is possible to override following Nuxt config via .env variables:
NUXT_PUBLIC_IGNIS_SSR
- set tofalse
to disable SSR (results inssr: false
in Nuxt Config)NUXT_PUBLIC_IGNIS_PAGES
- set tofalse
to disable multiple pages in simple projects (results inpages: false
in Nuxt Config)