Skip to content

Commit

Permalink
docs: Restructure content (#23)
Browse files Browse the repository at this point in the history
* docs: update

* docs: updated sidebar for cli

* docs: added tab for backend and frontend in getting started

* docs: added header for deployment

* docs: updated tab titles

* docs: update structure

* docs: changed location of info

* docs: update framework wording

* docs: mention cli in getting started

* docs: test

* docs: updated framework

* docs: sidebar

* docs: split deployments

* docs: sidebar

* docs: reword

* docs: new assets

* docs: flutter web

* docs: flutter web text update

* docs: flutter web title

* docs: flutter web framework

* docs: flutter web build_runner

* docs: l

* docs: flutter web

* docs: flweb

* docs: build settings fl web

* docs: favicon

* docs: fixed favicon

* docs: github integration

* docs: renamed asset

* docs: update github

* docs: typo

* docs: fix wording

* docs: add limits as a seperate page

* docs: limits header

* docs: fix typo
  • Loading branch information
kaziwaseef authored Dec 20, 2023
1 parent 8591491 commit 3673e1a
Show file tree
Hide file tree
Showing 25 changed files with 287 additions and 90 deletions.
23 changes: 18 additions & 5 deletions docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,24 @@ anchors:
icon: discord
link: https://invertase.link/globe-discord
theme: "#FFA03F"
favicon: "/assets/globe_dark.png"
favicon: "/assets/globe-favicon-dark.png"
sidebar:
- - Overview
- "/"
- - Getting Started
- "/getting-started"
- - - Overview
- "/getting-started"
- - Shelf Server
- "/getting-started/shelf-server"
- - Flutter Web
- "/getting-started/flutter-web"
- - CLI
- - - CLI Overview
- - - Overview
- "/cli"
- - Deploy
- "/cli/commands/deploy"
- - Build Logs
- "/cli/commands/build-logs"
- - Link
- "/cli/commands/link"
- - Unlink
Expand All @@ -27,6 +34,8 @@ sidebar:
- "/cli/commands/login"
- - Logout
- "/cli/commands/logout"
- - Update
- "/cli/commands/update"
- - Deployments
- - - Overview
- "/deployments"
Expand All @@ -40,18 +49,22 @@ sidebar:
- "/deployments/github-integration"
- - Hooks
- "/deployments/hooks"
- - Redeployments
- "/deployments/redeployments"
# - - Redeployments
# - "/deployments/redeployments"
- - Frameworks
- - - Overview
- "/frameworks"
- - Dart Frog
- "/frameworks/dart-frog"
- - Flutter Web
- "/frameworks/flutter-web"
# - - Jaspr
# - "/frameworks/jaspr"
- - Infrastructure
- - - Overview
- "/infrastructure"
- - Limits
- "/infrastructure/limits"
- - Cold Starts
- "/infrastructure/cold-starts"
# - - Cron Jobs
Expand Down
Binary file added docs/assets/authorize-github-app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/configure-github-app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/configured-github-repos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/connect-github-account.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/deployments.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/flutter-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/github-configure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/github-import.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/globe-favicon-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/new-env-variable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/project-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions docs/cli/commands/build-logs.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: View Build Logs
description: View Build Logs for a given deployment ID within the CLI
---

# Build Logs

The `build-logs` command allows you to view the live build logs of a running deployment. The deployment must be in the `building` state for this command to work. The --deployment flag is required.

## Usage

To use, run the following command with the deployment ID of the currently running deployment.

```bash
globe build-logs -d <DEPLOYMENT-ID>
```

### Flags

The command has flags (in addition to [global flags](/cli#global-flags)) that can be used to modify the behavior of the command, which can be accessed by running `globe build-logs --<flag>`:

- `-d, --deployment` - Provide the deployment ID of the deployment you want to view the build logs for
28 changes: 28 additions & 0 deletions docs/cli/commands/update.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: Update the Globe CLI
description: Update the Globe CLI to the latest version
---

# Update

The `update` command allows you to update the currently installed Globe CLI to the latest version available.

## Updates Available

While using the CLI, if a newer version is available, it will be shown as the first output as follows:
```
Update available! 0.0.2 → 0.0.3
Run globe update to update
```

## Usage

To use, run the following command and the latest version of the CLI will be downloaded and installed and the current CLI will be updated to the latest version

```bash
globe update
```

### Flags

The command has no additional flags.
4 changes: 3 additions & 1 deletion docs/cli/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ globe login
The Globe CLI provides the following commands, which can be accessed by running `globe <command>`:

- [`deploy`](/cli/commands/deploy) - Deploy your Dart application to Globe directly from the command line.
- [`link`](/cli/commands/link) - Link a local project to a Globe project.
- [`login`](/cli/commands/login) - Login to your Globe account.
- [`logout`](/cli/commands/logout) - Logout of your Globe account.
- [`link`](/cli/commands/link) - Link a local project to a Globe project.
- [`unlink`](/cli/commands/unlink) - Unlink a local project from a Globe project.
- [`update`](/cli/commands/update) - Updates the CLI to the latest version.
- [`build-logs`](/cli/commands/build-logs) - View build logs for a given deployment ID.

## Global Flags

Expand Down
34 changes: 32 additions & 2 deletions docs/deployments/github-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,38 @@ Globe integrates with GitHub via the [GitHub Application](https://github.com/app

## Authorization

TODO: Add authorization instructions.
Within the Globe dashboard, browse to **Projects** -> **Create Project** by clicking the `+ Create Project Button`. If not already authorized, you will be able to add a Github account to your Globe Organization.

![Connect Github Account](/assets/connect-github-account.png)

Click on `Connect your GitHub account` and you will be asked to authorize our GitHub app.

![Authorize Github App](/assets/authorize-github-app.png)

Click on `Authorize Dart Globe` to add your GitHub account to your Globe Organization. You will be redirected back to the `Project Create` screen afterwards.

## Configuration

TODO: Add configuration instructions.
After authorizing the GitHub app, you will need to configure the repositories that are available to Globe. Click on `Configure` to select the repositories you want to import.

![Configure Repositories](/assets/configure-github-app.png)

In this screen you can add all repositories or specific repositories that you want available in Globe. After configuration you should be redirected to the `Project Create` screen. Now you will have a list of all the repositories that you have configured.

![Configured Repositories](/assets/configured-github-repos.png)

## Importing a Repository and Creating a Deployment

You can click on the `Import` button on the right side of any repository you want to import to create a project from it.

![Github Import](/assets/github-import.png)

Select the options you want for your project and click on `Configure`.

![Github Configure](/assets/github-configure.png)

Framework Preset will be selected based on detected framework. Check the [Frameworks Section](/frameworks) for more details.

After configuration you can click on the `Deploy` button to create a new Project and trigger the first deployment.

From now on, every time you push to GitHub, Globe will create a new deployment. If there is a new commit in the specified production branch (selected in the import stage), a production deployment will be created. For all other branches, a preview deployment is triggered.
4 changes: 4 additions & 0 deletions docs/deployments/redeployments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ title: Redeployments

# Redeployments

<Warning>
Currently, Redeployments are an experimental feature and is actively being worked on and may change at any time.
</Warning>

Redeployments are the process of triggering a new deployment build from a previous deployment. This is useful if you update build settings or environment variables and want to apply those changes without making any other changes to your code.

Redeployments apply any new build settings and environment variables you might have updated since the original deployment.
Expand Down
23 changes: 23 additions & 0 deletions docs/frameworks/flutter-web.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Flutter Web
---

# Flutter Web

To deploy a Flutter Web Application, you can add it via the [Github Integration](/deployments/github-integration) or if you use the CLI, you can run the following command in the root of the project:

```bash
globe deploy
```

Globe will automatically apply the correct preset and deploy your application. The build system will auto-detect `build_runner` if used and runs it during the building stage of the deployment.

For a more detailed example, [click here](/getting-started/flutter-web).

## How it works

Globe builds your Flutter Application for the Web and uploads the built files to our globally distributed CDN network. Hence, your application is always served from a location nearest to the user thus reducing latency and improving load times.

## Automatic Optimizations

Globe hashes your assets and applies filename fingerprinting to vastly improve cache performance. This also ensures your files are correctly updated by the browser for every new deployment.
7 changes: 5 additions & 2 deletions docs/frameworks/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ title: Frameworks

# Frameworks

Globe aims to be framework agnostic, however, some frameworks have additional steps like build commands that need to be run before deployment. Globe supports these frameworks by automatically providing default build settings for each framework that can be used to build and deploy your application.
Globe aims to be framework agnostic and hence you can deploy any frameworks that does not have additional build steps. If the framework that you are using does not require such additional steps, then it is already supported by Globe. There is auto detection for `build_runner` and `melos`, so these are already covered by the Globe system. In addition, you can also set a custom build command for your project.

## Supported Frameworks
Some frameworks have additional steps like build commands that need to be run before deployment. Globe supports these frameworks by automatically providing default build settings for each framework that can be used to build and deploy your application.

## Framework Presets

Ongoing work is being done to support more frameworks. If you'd like to see a framework supported please submit a [feature request](https://invertase.canny.io/globe).

- [Dart Frog](/frameworks/dart-frog)
- [Flutter Web](/frameworks/flutter-web)
50 changes: 50 additions & 0 deletions docs/getting-started/flutter-web.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Deploy Flutter Web
---

# Deploy a Flutter Web Application

To get started, we're going to create a Flutter application and deploy Flutter Web to Globe. Globe has pre-configured build presets and it will be automatically detected and applied. If your application uses `build_runner`, then it will also automatically be detected and runs it during the building stage of the deployment.

## Create a new Flutter project

To create a basic Flutter application, in your terminal, run the following command where you'd like to create a project:

```bash
flutter create my_flutter_app
cd my_flutter_app
```

## Deployment

Deploying to Globe is simple; run the `globe deploy` command from your project root in the terminal:

```bash
globe deploy
```

The first time you deploy, you'll:

1. Be prompted to continue with the setup of the deployment (press `Y`)
1. Enter a name for your project: Enter: `my-flutter-app`

The CLI will show the following output:
```
Detected "Flutter" preset, would you like to use the default build settings? (Y/n)
```
Press <kbd>Enter</kbd> to accept these build settings.

After waiting for a couple of seconds, you'll be shown that your new deployment has been queued and be provided a unique URL for that deployment. You can visit this URL in your browser to view the build logs and deployment status. You can also use the [`build-logs`](/cli/commands/build-logs) command to view the logs directly from the CLI.

## View your application

Once complete, your deployment will be available via the URL shown in the dashboard. Each deployment has its own unique URL, with a `globeapp.dev` domain. Click the URL and you'll visit your Flutter Web Application.

![Flutter Web Application](/assets/flutter-web.png)

## Further reading

- [Flutter Web Framework Preset](/frameworks/flutter-web)
- [Learn about managing your deployments](/deployments)
- [Learn about the Globe CLI](/cli)
- [Integrate with GitHub](/deployments/github-integration)
45 changes: 45 additions & 0 deletions docs/getting-started/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: Getting started with Globe
---

# Getting Started

To get started using Globe, ensure you have [logged in](https://globe.dev/login) to your account.

There are two ways to deploy to Globe:
- Using the [Globe CLI](#install-the-globe-cli-optional), or
- Using the [GitHub integration](/deployments/github-integration)

## Install the Globe CLI (optional)

The Globe CLI is a command line tool that allows you to interact with your Globe account and deploy from the command line. It is not required to use Globe, but it can be useful for some workflows.

#### Pre-requisites

To get started, you must have the [Dart SDK](https://dart.dev/get-dart) installed on your machine.

#### Installation

To install the Globe CLI, run the following command:

```bash
dart pub global activate globe_cli
```

Once installed, you can access the globe executable from anywhere on your machine.

To login with your Globe account, run the following command:

```bash
globe login
```

To learn more about the CLI, view the [documentation](/cli).

## Deploying your first application

You can deploy your Dart applications to a Globally distributed network using the [framework of your choice](/frameworks). It is possible to deploy both Backend and Frontend applications as shown below. For simplicity, the CLI will be used for deployment.

- [Backend Shelf Server](/getting-started/shelf-server)
- [Frontend Flutter Web Application](/getting-started/flutter-web)

Loading

0 comments on commit 3673e1a

Please sign in to comment.