Common commands
Learn about common commands you need to know to work with the project.
For sure, you don't need these commands to kickstart your project, but it's useful to know they exist for when you need them.
Want shorter commands?
You can set up aliases for these commands in your shell configuration file. For example, you can set up an alias for pnpm
to p
:
Or, if you're using Zsh, you can add the alias to ~/.zshrc
:
Then run source ~/.bashrc
or source ~/.zshrc
to apply the changes.
You can now use p
instead of pnpm
in your terminal. For example, p i
instead of pnpm install
.
Installing dependencies
To install the dependencies, run:
Starting development server
Start development server by running:
Building project
To build the project, run:
Building specific app
To build a specific app, run:
Cleaning project
To clean the project, run:
Then, reinstall the dependencies:
Formatting code
To format code using Prettier, run:
Linting code
To lint code using ESLint, run:
Typechecking
To typecheck the code using TypeScript, run:
Adding UI components
To add a new web component, run:
This command will add and export a new component to @turbostarter/ui-web
package.
Supabase commands
Prerequisite: Docker installed
To run the Supabase instance locally, you need to have Docker installed on your machine.
You can always use the Supabase Cloud for your projects.
We have a few commands to help you manage the Supabase instance (for local development).
Starting containers
To start the Supabase containers, run:
It will run all the required containers for the Supabase instance. You can check config for them in packages/db/supabase/config.toml
.
Stopping containers
To stop the Supabase containers, run:
Displaying status
To check the status of the Supabase instance, run:
This will result in the following output:
You can check there what services are running on what ports and what are the credentials to connect to them.
Database commands
We have a few commands to help you manage the database leveraging Drizzle CLI.
Generating migrations
To generate a new migration, run:
It will create a new migration .sql
file in the migrations
folder.
Running migrations
To run the migrations against the db, run:
It will apply all the pending migrations.
Pushing changes directly
Don't mess up with your schema!
Make sure you know what you're doing before pushing changes directly to the db.
To push changes directly to the db, run:
It lets you push your schema changes directly to the database and omit managing SQL migration files.
Checking database
To check the database schema consistency, run:
Last updated on