Skip to content

Project Structure

This document provides an overview of the main directories and files in the NuxSaaS project. It is intended to help contributors and users quickly understand the organization of the codebase.

Top-Level Layout

NuxSaaS/
├── .env.example
├── .github/
├── .vscode/
├── app/
├── public/
├── server/
├── tests/
├── eslint.config.mjs
├── nuxt.config.ts
├── package.json
├── tsconfig.json
├── vitest.config.ts
└── wrangler.example.toml

Directory and File Overview

.env.example

Template for environment variables. Copy and rename to .env for your local setup.

.github/

GitHub configuration files, such as funding and workflow definitions.

.vscode/

VS Code workspace settings, extension recommendations, and debug configurations.

app/

Contains all frontend application code:

  • app.vue, app.config.ts: Main entry and configuration for the Nuxt app.
  • assets/: Static assets (CSS, images, etc.).
  • components/: Vue components.
  • composables/: Reusable composition API utilities.
  • i18n/: Internationalization resources.
  • layouts/: Layout components for different page structures.
  • middleware/: Frontend route middleware.
  • pages/: Nuxt pages, mapped to routes.
  • plugins/: Nuxt plugins for extending app functionality.
  • utils/: Utility functions and type definitions.

public/

Static files served at the root of the site, such as favicons, logos, and screenshots.

server/

Backend/server-side code:

  • api/: API route handlers.
  • database/: Database configuration and schema.
  • middleware/: Server middleware.
  • utils/: Server-side utilities.

tests/

Automated test files, including end-to-end (e2e) tests and setup scripts.

eslint.config.mjs

ESLint configuration for code linting and style enforcement.

nuxt.config.ts

Main Nuxt configuration file, defining modules, plugins, runtime settings, and more.

package.json

Project metadata, scripts, and dependencies.

tsconfig.json

TypeScript configuration for the entire project.

vitest.config.ts

Configuration for the Vitest testing framework.

wrangler.example.toml

Example configuration for deploying to Cloudflare Workers using Wrangler.


For more details on development workflow, environment setup, and recommended tools, please refer to the other guides in this directory.