Getting started
This guide walks you through setting up Celest on your development machine, and how to create a new project.
Prerequisites
To use Celest in your Flutter app, you need the following prerequisites:
- Install Flutter (opens in a new tab)
- Create a new Flutter project (or navigate to an existing one)
- Download and install the Celest CLI
That's it! You are now ready to start building your backend - all in Dart!
Starting a new Celest project
Start by first creating a new Flutter project. If you have an existing Flutter project, you can use that instead. To start a new Flutter project, go to your console and run the following command.
$ flutter create my_celest_app
Then, navigate to your new Flutter app.
$ cd my_celest_app
Once you are in your Flutter app directory, run the following command to initialize your Celest project.
$ celest start
Once the project is generated, Celest will continue to run in the terminal. A local development environment is spun up as the CLI watches for changes made to your backend, hot-reloading your changes and code-generating a client library automatically.
Your backend lives in the generated celest
folder. Every celest
folder follows this structure, which helps to keep your backend organized.
my_celest_app/
└── celest/
├── functions/ # Celest Functions folder
| └── greeting.dart # Example API file
├── lib/
│ │── client.dart # Generated client for your Flutter app
│ ├── models/ # Custom API models
| | └── person.dart
│ └── exceptions/ # Custom API exceptions
| └── bad_name_exception.dart
└── test/ # Tests for your backend
Next steps
Ready to start building? Choose which Cloud Widget you want to start with: