This is an minimal—opinionated starter template for Nuxt 3. It is based on the what we use and love at Input Studio.
Look at the Nuxt 3 documentation to learn more.
Don't worry, if you don't need something, you can remove it.
- 👓 Sass and Tailwind CSS
- ✨ Headless UI components
- 🇬 Google Fonts module
- 🪛 Eslint and Prettier with Tailwind plugin (automatically sorts classes based on recommended class order)
- ⚙️ VS Code settings and recommended extensions
- 🐋 Dockerfile optimized for production (also includes a GitHub Actions workflow to build and publish the Docker image)
Make sure to have Node.js and Yarn (optional) installed. If it's not the case, you can install volta. Volta will automatically install the required versions of Node.js and Yarn.
Now, you can run the following command to create a new Nuxt 3 project based on this starter template:
# Create a new Nuxt 3 project using this starter template:
# You can remove `--gitInit` if you don't want to initialize a Git repository.
# You can remove `--packageManager yarn` if you want to use another package manager.
npx nuxi init --gitInit --packageManager yarn -t gh:inputstudio/nuxt3-starter <project-name>
After the project is created (dependencies are already installed), you can run the following commands:
# Go to the project directory:
cd <project-name>
# Start the development server:
yarn dev
# Build the application for production:
yarn build
# Preview production build:
yarn preview
Check out the deployment documentation for more information.
When you're ready, start your application by running:
docker compose up --build
.
Your application will be available at http:https://localhost:3000.
First, build your image, e.g.: docker build -t myapp .
.
If your cloud uses a different CPU architecture than your development
machine (e.g., you are on a Mac M1 and your cloud provider is amd64),
you'll want to build the image for that platform, e.g.:
docker build --platform=linux/amd64 -t myapp .
.
Then, push it to your registry, e.g. docker push myregistry.com/myapp
.
Consult Docker's getting started docs for more detail on building and pushing.