This guide will help you get up and running with the Nuxt 3 Tailwind Starter Template.
Before you begin, make sure you have the following installed:
# Clone from repository
git clone https://github.com/efesozen/vue-starter-template.git my-project
# Or create a new repository from this template on GitHub
# Then clone your new repository
cd my-project
npm install
# or
yarn install
Start the development server:
npm run dev
# or
yarn dev
The application will be available at http://localhost:3000.
Here’s a quick tour to help you get familiar with the template:
The main dashboard is at / (the index page). It demonstrates:
The Posts example at /examples/posts shows:
The /login page demonstrates:
By default, the template uses a mock API for demonstration purposes, allowing you to develop without a real backend.
/loginjohn@example.comWhen you’re ready to connect to a real API:
nuxt.config.ts:runtimeConfig: {
public: {
apiBase: 'https://your-real-api.com',
useMockApi: false,
}
}
Here’s a breakdown of the key directories and their purpose:
├── assets/ # CSS and static assets
├── components/ # Vue components
├── composables/ # Reusable Vue composition functions
├── docs/ # Documentation
├── layouts/ # Page layouts
├── middleware/ # Navigation guards
├── pages/ # Application pages and routes
├── plugins/ # Nuxt plugins
│ └── mock/ # Mock API implementation
├── public/ # Public static files
├── schemas/ # Validation schemas
├── services/ # API services
└── stores/ # Pinia stores
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Generate static site
npm run generate
# Lint code
npm run lint
Here are some suggested next steps after getting familiar with the template:
Customize the Branding: Update the logo, colors, and other branding elements.
Add Your Own Models: Follow the patterns in the Posts example to create your own data models.
Set Up Your API: Either implement a real backend API or extend the mock API for your needs.
Adjust the Authentication: Configure the authentication to work with your auth provider.
Learn More: Dive deeper into the Architecture Documentation and Component Documentation.
If you encounter module not found errors, try:
npm install
npm run dev
If the mock API isn’t working as expected:
useMockApi is set to true in nuxt.config.tsnpm install to install all dependenciesFor other issues, check: