Skip to content

Commit

Permalink
chore(docs): refactor pages (immich-app#1144)
Browse files Browse the repository at this point in the history
* chore(docs): refactor pages

* fix: links

* fix: broken link

* refactor: post install steps using partials
  • Loading branch information
jrasm91 authored Dec 21, 2022
1 parent 7966c92 commit 752b267
Show file tree
Hide file tree
Showing 67 changed files with 379 additions and 257 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@

## Content

- [Official Documentation](https://immich.app/docs/overview/introduction)
- [Official Documentation](https://immich.app/docs)
- [Demo](#demo)
- [Features](#features)
- [Introduction](https://immich.app/docs/overview/introduction)
- [Installation](https://immich.app/docs/installation/requirements)
- [Contribution Guidelines](https://immich.app/docs/contribution-guidelines)
- [Installation](https://immich.app/docs/install/requirements)
- [Contribution Guidelines](https://immich.app/docs/overview/support-the-project)
- [Support The Project](#support-the-project)
- [Known Issues](#known-issues)

Expand Down Expand Up @@ -98,4 +98,4 @@ If you feel like this is the right cause and the app is something you are seeing

Symptoms: the container logs `illegal instruction core dump` and restarts

Solution: https://immich.app/docs/installation/requirements#hardware
Solution: https://immich.app/docs/install/requirements#hardware
4 changes: 2 additions & 2 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
- [示例](#示例)
- [功能特性](#功能特性)
- [介绍](https://immich.app/docs/overview/introduction)
- [安装](https://immich.app/docs/installation/requirements)
- [贡献指南](https://immich.app/docs/contribution-guidelines)
- [安装](https://immich.app/docs/install/requirements)
- [贡献指南](https://immich.app/docs/overview/support-the-project)
- [支持本项目](#support-the-project)
- [已知问题](#known-issues)

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ sidebar_position: 6

### How can I sync an existing directory with Immich's server?

Immich doesn't have the mechanism to sync an existing directory with the server. There is however, a helper CLI tool to help you bulk upload the existing photos and videos to the server. You can find the guide to use the CLI tool [here](/docs/usage/bulk-upload.md).
Immich doesn't have the mechanism to sync an existing directory with the server. There is however, a helper CLI tool to help you bulk upload the existing photos and videos to the server. You can find the guide to use the CLI tool [here](/docs/features/bulk-upload.md).

### Why doesn't Immich watch an existing photo gallery directory?

The initial approach of Immich is to become a backup tool, primarily for mobile device usage. Thus, all the assets must be uploaded from the mobile client. The app was architectured to perform that job well.

### How can I reset the admin password?

The admin password can be reset by running the [reset-admin-password](/docs/usage/server-commands) command on the immich-server.
The admin password can be reset by running the [reset-admin-password](/docs/features/server-commands.md) command on the immich-server.
4 changes: 4 additions & 0 deletions docs/docs/developer/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Developer",
"position": 4
}
39 changes: 39 additions & 0 deletions docs/docs/developer/architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
sidebar_position: 1
---

# Architecture

## High Level Diagram

![Immich Architecture](./img/app-architecture.png)

## Technology

Immich is a full-stack [TypeScript](https://www.typescriptlang.org/) application, with a [Flutter](https://flutter.dev/) mobile app.

### Mobile

- [Flutter](https://flutter.dev/)
- [Riverpod](https://riverpod.dev/) for state management.

### Web

- [SvelteKit](https://kit.svelte.dev/)
- [tailwindcss](https://tailwindcss.com/)

### Server

- [Node.js](https://nodejs.org/)
- [Nest.js](https://nestjs.com/)
- [TypeORM](https://typeorm.io/) for database management.
- [Jest](https://jestjs.io/) for testing.

### Database

- [PostgreSQL](https://www.postgresql.org/)
- [Redis](https://redis.io/) for job queuing.

### Web Server

- [NGINX](https://www.nginx.com/) for internal communication between containers and load balancing when scaling.
7 changes: 7 additions & 0 deletions docs/docs/developer/open-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 5
---

# Open API

Immich uses the [Open API](https://swagger.io/specification/) standard to generate API documentation. To view the published docs see [here](/docs/api).
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
sidebar_position: 5
sidebar_position: 2
---

# Contribution guidelines
# Setup

## Environment setup
## Environment

### Server and web app

Expand Down Expand Up @@ -88,16 +88,19 @@ OpenAPI is used to generate the client (Typescript, Dart) SDK. `openapi-generato
```bash
npm run api:generate # Run from the `server` directory
```

You can find the generated client SDK in the `web/src/api` for Typescript SDK and `mobile/openapi` for Dart SDK.

## Database migrations

After making any changes in the `server/libs/database/src/entities`, a database migration need to run in order to register the changes in the database. Follow the steps below to create a new migration.

1. Attached to the server container shell.
2. Run
2. Run

```bash
npm run typeorm -- migration:generate ./libs/database/src/<migration-name> -d libs/database/src/config/database.config.ts
```

3. Check if the migration file makes sense.
4. Move the migration file to folder `server/libs/database/src/migrations` in your code editor.
4 changes: 4 additions & 0 deletions docs/docs/features/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Features",
"position": 3
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,39 @@
sidebar_position: 2
---


# Automatic Backup

A guide on how the foreground and background automatic backup works.

<img src={require('./img/background-foreground-backup.png').default} width="50%" title="Foreground&Background Backup" />

On iOS, there is only one option for automatic backup
* [**Foreground backup**](#foreground-backup)
On iOS, there is only one option for automatic backup

- [Automatic Backup](#automatic-backup)
- [Foreground backup](#foreground-backup)

On Android, there are two options for automatic backup

On Android, there are two options for automatic backup
* [**Foreground backup**](#foreground-backup)
* [**Background backup**](#background-backup)
- [Automatic Backup](#automatic-backup)
- [Foreground backup](#foreground-backup)
- [Background backup](#background-backup)

## Foreground backup

If foreground backup is enabled: whenever the app is opened or resumed, it will check if any photos or videos in the selected album(s) have yet to be uploaded to the cloud (the remainder count). If there are any, they will be uploaded.

## Background backup

Background backup is only available on Android thanks to the contribution effort of [@zoodyy](https://github.com/zoodyy).
Background backup is only available on Android thanks to the contribution effort of [@zoodyy](https://github.com/zoodyy).

If background backup is enabled. The app will periodically check if there are any new photos or videos in the selected album(s) to be uploaded to the cloud. If there are, it will upload them to the cloud in the background.

A native Android notification shows up when the background upload is in progress. You can further customize the notification by going to the app's settings.

:::note
* The app must be in the background for the backup worker to start running.
* It is a well-known problem that some Android models are very strict with battery optimization settings, which can cause a problem with the background worker. Please visit [Don't kill my app](https://dontkillmyapp.com/) for a guide on disabling this setting on your phone.
* If you reopen the app and the first page you see is the backup page, the counts will not reflect the background uploaded result. You have to navigate out of the page and come back to see the updated counts.
:::info Note

- The app must be in the background for the backup worker to start running.
- It is a well-known problem that some Android models are very strict with battery optimization settings, which can cause a problem with the background worker. Please visit [Don't kill my app](https://dontkillmyapp.com/) for a guide on disabling this setting on your phone.
- If you reopen the app and the first page you see is the backup page, the counts will not reflect the background uploaded result. You have to navigate out of the page and come back to see the updated counts.

:::
File renamed without changes.
File renamed without changes
37 changes: 37 additions & 0 deletions docs/docs/features/mobile-app.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
sidebar_position: 1
---

import MobileAppDownload from '../partials/_mobile-app-download.md';
import MobileAppLogin from '../partials/_mobile-app-login.md';
import MobileAppBackup from '../partials/_mobile-app-login.md';

# Mobile App

:::tip
To upload from other devices, try using the [Bulk Upload CLI](/docs/features/bulk-upload.md).
:::

## Download

<MobileAppDownload />

:::info Beta Program
The beta release channel allows users to test upcoming changes before they are officially released. To join the channel use the links below.

- Android: Invitation link from [web](https://play.google.com/store/apps/details?id=app.alextran.immich) or from [mobile](https://play.google.com/store/apps/details?id=app.alextran.immich)
- iOS: [TestFlight invitation link](https://testflight.apple.com/join/1vYsAa8P)

:::

## Login

<MobileAppLogin />

## Backup

<MobileAppBackup />

:::info
You can enable automatic backup on supported devices. For more information see [Automatic Backup](/docs/features/automatic-backup.md).
:::
4 changes: 2 additions & 2 deletions docs/docs/usage/oauth.md → docs/docs/features/oauth.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
sidebar_position: 5
sidebar_position: 6
---

# OAuth Authentication

This page contains details about using OAuth 2 in Immich.
This page contains details about using OAuth in Immich.

## Overview

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 7
---

# Server Commands
Expand Down
9 changes: 9 additions & 0 deletions docs/docs/features/storage-template.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
sidebar_position: 5
---

import StorageTemplate from '../partials/_storage-template.md';

# Storage Template

<StorageTemplate />
22 changes: 22 additions & 0 deletions docs/docs/features/user-management.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
sidebar_position: 4
---

import RegisterAdminUser from '../partials/_register-admin.md';
import UserCreate from '../partials/_user-create.md';

# User Management

Immich supports multiple users, each with their own library.

## Register the Admin User

<RegisterAdminUser />

## Create a New User

<UserCreate />

## Delete a User

If you need to remove a user from Immich, head to "Administration", where users can be scheduled for deletion. The user account will immediately become disabled and their library and all associated data will be removed after 7 days.
4 changes: 4 additions & 0 deletions docs/docs/install/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Install",
"position": 2
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
sidebar_position: 3
---

# Docker Compose [Recommended]

# Recommended installation

This is the recommended installation method for production use.
Docker Compose is the recommended method to run Immich in production. Below are the steps to deploy Immich with Docker Compose.

### Step 1 - Download the required files

From a directory of your choice (e.g. `./immich-app`) run the following commands
Download [`docker-compose.yml`][compose-file] [`.env.example`][env-file].

From a directory of your choice (e.g. `./immich-app`) run the following commands:

```bash title="Get docker-compose.yml file"
wget https://raw.githubusercontent.com/immich-app/immich/main/docker/docker-compose.yml
Expand Down Expand Up @@ -99,9 +100,9 @@ PUBLIC_LOGIN_PAGE_MESSAGE="My Family Photos and Videos Backup Server"

</details>

* Populate custom database information if necessary.
* Populate `UPLOAD_LOCATION` with your preferred location for storing backup assets.
* Populate a secret value for `JWT_SECRET`. You can use the command below to generate a secure key:
- Populate custom database information if necessary.
- Populate `UPLOAD_LOCATION` with your preferred location for storing backup assets.
- Populate a secret value for `JWT_SECRET`. You can use the command below to generate a secure key:

```bash title="Command to generate secure JWT_SECRET key"
openssl rand -base64 128
Expand All @@ -114,5 +115,16 @@ docker-compose up -d # or `docker compose up -d` based on your docker-compose ve
```

:::tip
For more information on how to use the application, please refer to the [Post Installation](/docs/usage/post-installation) guide.
For more information on how to use the application, please refer to the [Post Installation](/docs/install/post-install.md) guide.
:::

### Step 4 - Upgrading

When a new version of Immich is (released)[], the application can be upgraded with the following commands, run in the directory with the `docker-compose.yml` file:

```bash title="Upgrade Immich"
docker-compose pull && docker-compose up -d # Or `docker compose`
```

[compose-file]: https://raw.githubusercontent.com/immich-app/immich/main/docker/docker-compose.yml
[env-file]: https://raw.githubusercontent.com/immich-app/immich/main/docker/.env.example
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ openssl rand -base64 128


:::tip
For more information on how to use the application, please refer to the [Post Installation](/docs/usage/post-installation) guide.
For more information on how to use the application, please refer to the [Post Installation](/docs/install/post-install.md) guide.
:::
38 changes: 38 additions & 0 deletions docs/docs/install/post-install.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
sidebar_position: 100
---

import RegisterAdminUser from '../partials/_register-admin.md';
import UserCreate from '../partials/_user-create.md';
import StorageTemplate from '../partials/_storage-template.md';
import MobileAppDownload from '../partials/_mobile-app-download.md';
import MobileAppLogin from '../partials/_mobile-app-login.md';
import MobileAppBackup from '../partials/_mobile-app-backup.md';

# Post Install Steps

A list of common steps to take after installing Immich include:

## Step 1 - Register the Admin User

<RegisterAdminUser />

## Step 2 - Create a New User (optional)

<UserCreate />

## Step 3 - Update the Storage Template

<StorageTemplate />

## Step 4 - Download the Mobile App

<MobileAppDownload />

## Step 5 - Login to the Mobile App

<MobileAppLogin />

## Step 6 - Backup Your Library

<MobileAppBackup />
Loading

0 comments on commit 752b267

Please sign in to comment.