Xata Quickstart

Welcome to Xata! We're really happy you're here. Let's walk through your first steps on Xata by building a to-do list application. Before we do though, we'd like to invite you to our Discord server if you'd like to throw ideas around and chat, and also let you know that if you ever need support, our support portal is the place to get it. If you'd like to request new features, check out our feature board.

With that out of the way, let's get started! Begin by visiting the Xata web user interface (UI). If you're not logged in, you'll be asked to login with either with GitHub or Google.


Once you're logged in, you'll be prompted to create a workspace. A workspace is like an organization on GitHub, where you and your team can collaborate on your databases. Once your workspace is setup, let's create a database by clicking the "Add a database" button, and giving our new database a name and a color.


Our database is instantly ready to use, but empty. To follow our to-do list example, let's add an items table. To-do list items usually have a label and a is_done flag. Let's add those columns to our table. The label is of type String, and the is_done is of type Boolean.

One thing we notice while adding columns is Xata's support for rich column types: we don't just support strings, but also supersets of string, like email. If a column is of type email, Xata will validate it for you to ensure consistency.

Great! We've got a table ready. But in order to test it, we need some data. We can do this by clicking "Add a row" at the bottom of the table, and filling in the label of our new to-do item.


Our table is ready! Let's do a test query. To query this database, we click "Get Code Snippet". This will give us code snippets in multiple languages that we can use to query our new table.

If we choose curl, we can query our table directly from a shell environment that has it. If we choose JavaScript, we can paste the snippet directly in our browser console to test it out.

⚠️ This feature (Get Code Snippet) exposes a temporary API key. If you're building a production application, we suggest using a proper API key. See API keys for more information.

Great! We should be able to query our table now. How quick was that?! Next, we'll build an actual application from this database using Next.js. Let's go!

Last modified 1 mo2 days ago