Skip to main content

Create a Project

Creating a project is easy with TakeShape, whether you're starting from scratch or already have a project to import. Below we'll lay out the project creation process with the Web Interface, CLI, and Starter Project functionalities.

The first step, of course, is logging in!

Web Interface#

Choosing a Name#

A name is required to create a project. Don't worry too much about the name, though; it can be changed at any time in the project settings menu.

Choosing a Source#

A source is required to create a project. Choosing a source allows you to either create a project from scratch, or base your project on an existing project or pattern. Any code contained in your source will be automatically added to your project's schema.

Your source can be an existing project at a URL endpoint, an existing project in a zip file, a blank project with no defaults, or one of TakeShape's existing Patterns.

  • Pattern - TakeShape's pre-defined Patterns automatically add relevant queries and mutations to your schema. For example, the Shape Shop Pattern will add queries and mutations useful for e-commerce solutions. For more information, see our Pattern article.
  • Blank Project - Best for new projects that don't fit a common use-case. You should look through the Patterns before choosing this. If none suit your needs, this option will start you with a clean project schema.
  • URL - Best option for importing a pattern from TakeShape's Pattern Repo, or importing a project you already have hosted at a URL endpoint.
  • Upload Zip - Best option for experienced users who have exported projects stored locally on their PC.

Still not working? Click here to ask for help.

Back to top.

Starter Projects#

If you need a more plug-and-play solution, try one of our Starter Projects!

Starter projects allow you to immediately create a project with a schema custom-built to your use-case. Making a Shopify lookbook? There's a starter project for that. Making a portfolio? There's a starter project for that. Starter projects also include pre-written front-end code for popular frameworks like React, Next.js, Gatsby.js and more!

Click Starter Projects in the navbar from the homepage to get started.

Choosing a starter project#

From the Starter Project gallery, choose which starter project suits your needs best and click the Use starter button.

You'll be taken to a page where you can set the name of your project. A name is required, but you can change it at any time. There will be a default name provided.

Click the Deploy to TakeShape button.

You'll see a page that describes the pattern that the project will use. You must be logged in to continue from here. If you are logged in, an Add To TakeShape button should appear below the project name.

Set the project name to whatever you would like, and click the Add To TakeShape button.

Service authentication warning#

Depending on which pattern you chose, you may be taken to a page with a popup modal that says "Service authentication needed. In order to proceed, authenticate the following service:".

That's normal behavior. When you add a service to your project, you have to set it up by providing certain information. This information varies based on the service and your use-case. See our docs on connecting services to resolve this issue.

Still not working? Click here to ask for help.

Back to top.

TakeShape CLI#

note

You cannot currently create a blank project from the TakeShape CLI. To use your blank project with the CLI, create a new project through the Web Interface or with a Starter Project. Then follow our TakeShape CLI guide to link your project to the CLI.

Creating a project with the CLI#

If you have an existing project, or if you want to import a project from a URL endpoint, you can do either through the CLI.

Use npm in your terminal to install the TakeShape CLI as a global utility:

npm install -g @takeshape/cli

After this process is done, run takeshape -v. If your installation was a success, this command will return the installed version number.

Logging in through the TakeShape CLI#

To import a project or schema through the CLI, you must first log in. Use the login command.

takeshape login

The login page should open up in your default broswer:

caution

If you're using an adblocker, or a browser with heightened security like Brave, the CLI may have trouble connecting. Try setting a different browser to your default. Otherwise, you can log in without the browser by following the instructions below.

Logging into the TakeShape CLI without opening the browser.#

You may have trouble logging in through the web interface after using the login command in the CLI for various reasons. To log in while staying in the terminal, use the flag --cli-login. For example:

takeshape login --cli-login

You will first be prompted for your email, and then your password.

After that, you should have successfully logged in. If this process fails, check that you have a TakeShape account, and that your email and password are correct.

info

If your TakeShape account uses Sign in with Google, you'll need to create a password before logging in from the CLI. You can do this by triggering a password reset from the login screen using "Forgot your password?" link, then providing your Google account's email in the password reset form.

Still not working? Click here to ask for help.

Back to top.

Importing a project#

There are two ways to import a project through the CLI: From a URL or from a locally stored zip file.

Importing a project from a URL#

Use the takeshape import --project --from command to import a project from a url. For example:

takeshape import --project --from https://github.com/takeshape/patterns/tree/main/shopify-lookbook

You should see a message that says Success! Created project [id] from import.

If it fails, you'll see a message like Failed to read data.jsonl: Response code [code] [message].

Based on the HTTP status code in the failure message, you can troubleshoot what the problem is. For example if the code is 404 with a message of Not Found, then likely your URL is wrong, or the endpoint is not accessible.

You can read more about http status codes here.

Still not working? Click here to ask for help.

Back to top.

Importing a project from a zip file#

Use the takeshape import --project --from command to import a project from a zip file. You will need to specify the relative path from wherever the terminal is running. For example:

takeshape import --project --from ./utils/custom-project.zip

You should see a message that says Success! Created project [id] from import.

If it fails, you'll see a message like Error ENOENT: no such file or directory, stat 'path/to/file.zip'.

Your failure message may vary based on the error you're having. Ensure that your zip file is in the file location you specified, and that the zip file contains a valid TakeShape project or pattern.

Still not working? Click here to ask for help.

Back to top.

Need Help?#

Can't find what you're looking for on this page? Click here to ask for help.