CLI
DartStream simplifies the process of starting a new project by providing an intuitive, template-driven initialization process. With just a few commands, developers can set up a fully-functional project scaffold tailored to their needs.
Project Initialization
Getting Started
Install DartStream CLI To use DartStream's project templates, ensure you have the DartStream CLI installed. If you haven’t installed it yet, you can do so with the following command:
dart pub global activate dartstream
NB: command to be changed
Create a New Project Use the
dartstream init
command to initialize a new project. For example:dartstream init my-app
Navigate Inside the Project Folder Once the project is created, navigate into the project directory to begin configuring and developing:
cd my-app
Initialize the CLI
Run the
ds init
command to configure the project details and establish the context for subsequent steps:ds init
You will be prompted to provide initial details:
mathematicaCopy codeEnter Project Name: Select Version: 1. Open-Source Version (Stable) 2. Open-Source Version (Beta)
Select Project Type
Specify whether you are starting a new project or importing an existing one. This helps load the appropriate configurations:
Choose your project type: 1. New Project (from scratch) 2. Existing Project (import existing setup) 2a. Existing project previously created with DartStream 2b. Existing external project - migration to DartStream (vue, flutterweb)
Select Framework
Choose the frontend framework or platform for your project, as it impacts other configurations:
Select your frontend framework: 1. Dart Web 2. Flutter Web 3. Flutter (mobile) 4. Flutter Desktop 5. Flutter Games 6. Vue.js 7. Svelte
Choose Authentication SDK
Based on your framework and cloud vendor, select an appropriate authentication option:
mathematicaCopy codeChoose an Authentication SDK: 1. Firebase Authentication 2. AWS Cognito (third-party integration) 3. Azure Active Directory 4. Skip for now (configure later)
Choose Database / Data Storage
Select a database option that fits your project's requirements. You may skip this step if you prefer to configure it later:
Choose a database: 1. Firebase Firestore 2. PostgreSQL 3. MongoDB (extension created by partner on top of DartStream) 4. NoSQL Database (extension created by partner on top of DartStream) 5. Skip for now
Choose Middleware
Select middleware for request handling and additional functionality:
Choose Middleware: 1. DartStream Middleware (default) 2. Shelf Middleware 3. Custom Middleware (start from scratch OR use a partner extension)
Preview & Confirm Setup
Review your configuration choices and confirm before proceeding to code generation:
Review your selections: - Project Type: New - Cloud Vendor: Google Cloud - Authentication SDK: Firebase Authentication - Middleware: DartStream Middleware - Framework: Flutter - Database: Firebase Firestore - CI/CD: GitHub Actions - Custom Tools: Security Tools, Performance Tools Confirm setup? (y/n)
Generate Code with Examples & Documentation (Optional)
After confirmation, generate project files and optionally include example code or inline documentation:
Would you like to include example code and inline documentation? (y/n)
Upon completion, your project is ready to start. Use the following command to launch your server:
dart run
Last updated