# Analytics Dashboards as Code

[Shaper](https://github.com/taleshape-com/shaper) has always been about **building dashboards using SQL**.

And it's just natural to manage **SQL as files** just like any other code.

With the latest release of Shaper you can now **deploy dashboards from files**,<br/>and **live-preview dashboard changes**.

You get to:
- use your favorite editor - including its AI features
- track dashboards in Git
- collaborate with your team using pull requests
- deploy dashboards via CI/CD

The workflow in action:
<YouTube id="https://www.youtube.com/watch?v=HHYvx_MsQHc" />

## Getting Started

Getting started and sharing Shaper projects is now simpler than ever since everything is just files.
Let's give it a try:

1. Clone [this](https://github.com/taleshape-com/demo-project/) demo Git repository:
   ```bash
    git@github.com:taleshape-com/demo-project.git
    ```
2. Install Shaper in the project directory:
   ```bash
    make install
    ```
3. Start a local Shaper server to serve the dashboards:
   ```bash
    make serve
    ```
4. Deploy the two dashboards in the `dashboards/` folder by running the deploy command in a second terminal:
   ```bash
    make deploy
    ```
5. Live-preview changes by running the dev file watcher in the second terminal:
   ```bash
    make dev
    ```
    <br/>Now edit or create any SQL file in the `dashboards/` folder and see the changes live in your browser.

## Learn More

Usually you will run Shaper on a server. Then you only need `shaper dev` locally when developing dashboards.
Once you configured authentication for your Shaper instance, the `dev` command will automatically prompt you to login and authenticate.
And instead of running `deploy` manually, you can use the [Shaper Github Action](https://github.com/taleshape-com/shaper-deploy-action) to deploy dashboards automatically in your CI/CD pipeline.

All details are in the [documentation](https://taleshape.com/shaper/docs/git-workflow/).

And as always - we are happy to hear about any feedback via socials or Github [issues](https://github.com/taleshape-com/shaper/issues) or [discussions](https://github.com/taleshape-com/shaper/discussions)!

<NewsletterSignup />