The recommended way to start a new project with Tairo.
Create a new Nuxt project (or use an existing one)
This command will create a new Nuxt project with minimal configuration and dependencies.
Add the Tairo layers from github
Link your project to the Tairo layers by adding them to the nuxt.config.ts
file. The version v1.5.1
is the latest stable version of Tairo, you can also use the edge
version which contains the current development version (useful for testing new features).
Add your Github token
The token is only need when installing. It is also needed on CI/CD environments.
Install dependencies with your package manager
In previous step, you should have chosen a package manager, use it to install the dependencies.
Run the development server
Start nuxt from the current folder and open the frontend in your browser.
Done!
You are now ready to edit your nuxt app! Continue by adding a layout.
In the documentation, <app>
in paths refers to the root of your project.
If you forgot to set the GITHUB_TOKEN
environment variable, if your token does not allow access to Tairo repository, or if you set a non existing version, you will see an error message like this:
Useful resources:
This is the quickest way to start a project with Tairo when you want to use the source code directly. It's also the way to go if you want to run the demo app.
Download the source code
Either from themeforest.net, cssninja.io or clone the repository from Github. The project structure should look like this:
Update the tsconfig
By default, the tsconfig.json
file is set to extend the .demo
folder. Update it to extend the .app
folder. If you are starting from the demo, you can keep it as is.
Install dependencies with pnpm
When using Tairo from source, pnpm is required in order to work. This is because we rely on the pnpm-workspace.yaml
to manage the dependencies between layers.
Run the development server
Start nuxt from the <app>/
folder and open the frontend in your browser.
Done!
You are now ready to edit your nuxt app! Continue by adding a layout.
In the documentation, <app>
in paths refers to the <app>/
folder.
The demo app is a separate app layer. It's a good starting point to see how Tairo is used to build a dashboard application.
•Demo project structure
The Tairo demo is split into different nuxt layers. This allow to separate the marketing part from the documentation part, and to enable or disable features easily.
By default, documentation layer is disabled.
You can set the ENABLE_DOCUMENTATION=true
environment variable in the .demo/.env
file to enable it before starting the demo server. This will generate the components documentation from the source code (via nuxt-component-meta). Note that this feature is heavy, requires more memory and can slow down the development server.
•Start the demo development server
To start the project from the .demo/
instead of the <app>/
folder, run this command: