Getting Started with Flatfile
Welcome to Flatfile! If you're new here, you've chosen the right place to start. Flatfile offers a streamlined way to import, clean, and seamlessly integrate your data into any application. This guide will help you set up your environment and take your first steps towards using Flatfile's powerful data management tools.
Table of Contents
Setup Your Environment Variables
Before diving into the functionalities of Flatfile, it's crucial to set up your environment variables. This involves renaming the .env.example
file to .env
and updating it with your unique credentials. These are vital for securing your application's access to Flatfile's services.
Your .env
file should resemble the following structure:
FLATFILE_ENVIRONMENT_ID=us_env_1234
FLATFILE_API_KEY=sk_1234
You can find these values in the Flatfile Dashboard, under the Developer Settings section in the sidebar. Remember, your .env
file contains sensitive information, so keep it secure and never share it publicly.
Seeing Your Configuration In Flatfile
With your environment variables set, you're ready to integrate Flatfile into your project:
-
Deploying Your Configuration: Use the command npm run deploy
to deploy your configuration to the specified environment. This step is crucial for making your setup live.
-
Running Locally: To test and tweak your configuration in a development setting, use the command npm run dev
. This allows you to run your setup locally on your machine.
Please Note: Running both the deploy
and dev
commands simultaneously could lead to duplicated activities or events within Flatfile. To avoid confusion, it's best to use these commands separately during different stages of your development process.
Creating A New Space
After deploying or developing your configuration, you'll have the ability to create a new space within Flatfile. The simplest way to do this is by using the "Create a New Space" button found on the dashboard. Clicking this button will activate the code designed to listen for a space:configure
event, seamlessly creating a new space for your data.
See All Code Examples
For comprehensive code examples covering a wide range of functionalities, visit our flatfile-docs-kitchen-sink repository. Here, you'll find examples for importing data, configuring spaces, and much more, providing you with a solid foundation to build upon.