Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Restructure content #23

Merged
merged 35 commits into from
Dec 20, 2023
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4c4ad0a
docs: update
kaziwaseef Dec 18, 2023
d0bc450
docs: updated sidebar for cli
kaziwaseef Dec 18, 2023
5d00867
docs: added tab for backend and frontend in getting started
kaziwaseef Dec 18, 2023
ef65629
docs: added header for deployment
kaziwaseef Dec 18, 2023
16193ed
docs: updated tab titles
kaziwaseef Dec 18, 2023
27229a1
docs: update structure
kaziwaseef Dec 18, 2023
ef1a36c
docs: changed location of info
kaziwaseef Dec 18, 2023
3f66309
docs: update framework wording
kaziwaseef Dec 18, 2023
043c164
docs: mention cli in getting started
kaziwaseef Dec 19, 2023
819859d
docs: test
kaziwaseef Dec 19, 2023
9b9460b
docs: updated framework
kaziwaseef Dec 19, 2023
c8b6787
docs: sidebar
kaziwaseef Dec 19, 2023
1010e77
docs: split deployments
kaziwaseef Dec 19, 2023
db02015
docs: sidebar
kaziwaseef Dec 19, 2023
ffbf156
docs: reword
kaziwaseef Dec 19, 2023
d80b95c
docs: new assets
kaziwaseef Dec 19, 2023
f48ff41
docs: flutter web
kaziwaseef Dec 19, 2023
48e9ea3
docs: flutter web text update
kaziwaseef Dec 19, 2023
c51be3a
docs: flutter web title
kaziwaseef Dec 19, 2023
58a09da
docs: flutter web framework
kaziwaseef Dec 19, 2023
f53c9cc
docs: flutter web build_runner
kaziwaseef Dec 19, 2023
f14465b
docs: l
kaziwaseef Dec 19, 2023
6b1fd0d
docs: flutter web
kaziwaseef Dec 19, 2023
be966a5
docs: flweb
kaziwaseef Dec 19, 2023
626f002
docs: build settings fl web
kaziwaseef Dec 19, 2023
4258370
docs: favicon
kaziwaseef Dec 19, 2023
dd63572
docs: fixed favicon
kaziwaseef Dec 19, 2023
da74620
docs: github integration
kaziwaseef Dec 19, 2023
758f2d2
docs: renamed asset
kaziwaseef Dec 19, 2023
86dbe54
docs: update github
kaziwaseef Dec 19, 2023
d05c4a9
docs: typo
kaziwaseef Dec 19, 2023
3b2be72
docs: fix wording
kaziwaseef Dec 19, 2023
9f6798d
docs: add limits as a seperate page
kaziwaseef Dec 19, 2023
507ef8d
docs: limits header
kaziwaseef Dec 19, 2023
be753ae
docs: fix typo
kaziwaseef Dec 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions docs.yaml
Original file line number Diff line number Diff line change
@@ -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
@@ -27,6 +34,8 @@ sidebar:
- "/cli/commands/login"
- - Logout
- "/cli/commands/logout"
- - Update
- "/cli/commands/update"
- - Deployments
- - - Overview
- "/deployments"
@@ -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
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
@@ -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

34 changes: 32 additions & 2 deletions docs/deployments/github-integration.mdx
Original file line number Diff line number Diff line change
@@ -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
@@ -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.
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
@@ -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