A feature-packed Nuxt 3 starter template designed to streamline your development process.
- π TypeScript support.
- β¨ Prettier for code formatting.
- π οΈ ESLint for linting.
- β‘ Lint-staged for efficient pre-commit checks.
- π Dark mode support.
- π¨ Tailwind CSS integration.
- π§© Shadcn components for reusable UI elements.
- π Internationalization (i18n) with RTL support.
- π Clerk integration for authentication.
- ποΈ Drizzle ORM for database management.
- π Postgres as the database.
- π Vue-sonner for toast notifications.
- π¦ pre-made components switchers, confirm modal and more.
- π Security configuration with strict CSP.
- π Logging with Winston.
Install the required project dependencies:
npm install- Sign up for a Clerk account.
- Add your Clerk Publishable Key and Secret Key to the
.envfile:
NUXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your-publishable-key
NUXT_CLERK_SECRET_KEY=your-secret-key- configure protected paths in:
server/middleware/auth.tsapp/middleware/auth.ts
Replace placeholder values across the project. Search for CHANGE_ME and update them with your own values, such as your website's domain.
remove the components/ui folder, remove components.json file, and run
pnpm dlx shadcn-vue@latest init
pnpm dlx shadcn-vue@latest addnpx drizzle-kit generate && npm run db:migratenpm run devIf you encounter Content Security Policy (CSP) errors during development, follow these steps:
- Modify CSP settings in the
nuxt.config.tsfile. - If issues persist, consider disabling strict mode.
For further guidance, refer to:
Internationalization is pre-configured. To add or modify locales:
- Add your languages file in the
i18nfolder. - Add the desired locale to the
localesarray innuxt.config.ts. - Update locale messages in
i18n.config.ts. - Define locale types in
types/locales.ts.
Each locale object in nuxt.config.ts should include:
code: Locale code (e.g.,en,he).language: Language and region code (e.g.,en-US,he-IL).dir: Text direction (ltrorrtl).name: Display name for the locale.
i18n: {
locales: [
{
code: 'he',
language: 'he-IL',
dir: 'rtl',
name: 'Χ’ΧΧ¨ΧΧͺ',
},
{
code: 'en',
language: 'en-US',
dir: 'ltr',
name: 'English',
},
// Add more locales as needed...
],
}Some preloaded translation files include components and libraries. Update these translations as needed.
Basic SEO configuration is included. To customize:
- Update the
sitesettings innuxt.config.ts. - Modify the
titleanddescriptioninapp.vue.
The default configuration shows only the app name. To display page-specific titles, set the title property in useHead and adjust the titleTemplate property. Refer to the Nuxt SEO documentation for more details.
To remove Drizzle ORM:
- Uninstall
drizzle-orm,drizzle-kit, anddrizzle-zodfrompackage.json. - Remove related imports from
nuxt.config.tsandeslint.config.mjs. - Delete the
server/dbdirectory.
To remove Clerk:
- Uninstall
vue-clerkfrompackage.json. - Remove
clerkimports fromnuxt.config.ts. - Delete
clerk.tsandauth.tsfromserver/middleware. - Remove the
contentSecurityPolicyconfiguration related to Clerk innuxt.config.ts. Update or redefine the policy based on your requirements.
This template comes with several pre-built components to streamline your development process, including:
- Theme Switcher: Easily toggle between light and dark modes.
- Language Switcher: Switch between different languages seamlessly.
- Copy Token Value: Quickly copy token values with a single click.
- Confirmation Dialog: User-friendly confirmation prompts.
- Breadcrumbs: Navigate through your app with ease.
If you wish to remove these components, simply delete the corresponding files from the components directory.
You can personalize page transitions by modifying the CSS classes in app.vue and the viewTransition settings in nuxt.config.ts.
Nuxt errors in development mode can produce lengthy logs due to extensive configurations. To simplify debugging, redirect the output to a file by running:
pnpm dev > output.txt 2>&1Currently, logging too verbose for easy debugging. Fine-tune the logging settings by editing the following files:
utils/logger.tsserver/plugins/logger-plugin.ts
This project is licensed under the MIT License.
- update clerk to official version (done, theme switch not working)
- update tailwind to v4