Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vietanhdev committed Oct 26, 2023
1 parent 642b813 commit aef5741
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Once the dependencies are installed, it will provide instructions for [starting

<Requirements />
<InstallDeps />
<StartApp />
<StartApp />
Original file line number Diff line number Diff line change
Expand Up @@ -18,50 +18,27 @@ This guide should be followed right after initializing an empty repository with

<Requirements />

### Setup using CLI starter kit

You can use a special CLI tool to run a new local instance of the <ProjectName/> as soon as possible. It will clone the repository and take care of setting up the environment. Run the following command in the directory where you would like to create a new project:

<Tabs>
<TabItem value="npm" label="npm" default>
<CodeBlock>
npm init shipfast
</CodeBlock>
</TabItem>
<TabItem value="pnpm" label="pnpm">
<CodeBlock>
pnpm create shipfast
</CodeBlock>
</TabItem>
<TabItem value="yarn" label="yarn">
<CodeBlock>
yarn create shipfast
</CodeBlock>
</TabItem>
</Tabs>

After the initialization process is complete, you will be able to start the app as described in the [Start the app](#start-the-app) section of the documentation.

### Manual setup
## Environment setup

<InstallDeps />

#### Adjust `.env.shared` files
Root and almost all packages allow configuration through environmental variables. For local machines, those need to be present in so-called `.env` files. These are, of course, ignored in GIT to avoid secret values being committed and shared with everyone. We prepared a set of defaults in the form of `.env.shared` files located in the same directories that will be enough to run the project locally, but a few need to be adjusted before you start the project for the first time.
### Adjust `.env.shared` files

Copy `.env.shared` to `.env` in the project root and `./packages/backend/.env.shared` to `./packages/backend/.env` and adjust the values to your needs.

:::caution

Never store any secret values in those files!

:::

##### `.env.shared` (in project root)
### `.env.shared` (in project root)

| Name | Example | Description |
|----------------|---------|-------------------------------------------------------------------------------------|
| `PROJECT_NAME` | `myapp` | The name of your project (best if 3-5 characters to avoid AWS names being too long) |

##### `./packages/backend/.env.shared`
### `./packages/backend/.env.shared`

| Name | Example | Description |
|--------------------------|------------------------------------|----------------------------------------------------------------------------------------------------|
Expand All @@ -70,4 +47,4 @@ Never store any secret values in those files!
| `ADMIN_EMAIL` | `[email protected]` | Will be used to create the first super admin user |
| `ADMIN_DEFAULT_PASSWORD` | `AvPZpabgj9Z8` | Will be used to create the first super admin user |

<StartApp />
<StartApp />

0 comments on commit aef5741

Please sign in to comment.