Update URLs to point to new documentation site

pull/1838/head
Chocobozzz 2019-05-23 14:58:34 +02:00
parent 79ad1706f3
commit 46e9407c60
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
14 changed files with 18 additions and 202 deletions

View File

@ -9,8 +9,6 @@ Interested in contributing? Awesome!
* [Write documentation](#write-documentation)
* [Develop](#develop)
* [Improve the website](#improve-the-website)
* [Troubleshooting](#troubleshooting)
* [Tutorials](#tutorials)
## Translate
@ -101,7 +99,7 @@ You can get a complete PeerTube development setup with Gitpod, a free one-click
### Server side
You can find a documentation of the server code/architecture [here](/support/doc/development/server/code.md).
You can find a documentation of the server code/architecture [here](https://docs.joinpeertube.org/#/contribute-architecture?id=server-code).
To develop on the server-side:
@ -116,7 +114,7 @@ restart.
### Client side
You can find a documentation of the server code/architecture
[here](/support/doc/development/client/code.md).
[here](https://docs.joinpeertube.org/#/contribute-architecture?id=client-code).
To develop on the client side:
@ -193,11 +191,3 @@ $ npm run mocha -- --exit --require ts-node/register/type-check --bail server/te
Instance configurations are in `config/test-{1,2,3,4,5,6}.yaml`.
Note that only instance 2 has transcoding enabled.
### Troubleshooting
Please check out the issues and [list of common errors](https://docs.joinpeertube.org/lang/en/devdocs/troubleshooting.html).
### Tutorials
Please check out the related section in the [development documentation](https://docs.joinpeertube.org/lang/en/devdocs/index.html#tutorials). Contribute tutorials at [framagit.org/framasoft/peertube/documentation](https://framagit.org/framasoft/peertube/documentation).

View File

@ -1,45 +0,0 @@
# Architecture
## Vocabulary
- **Fediverse:** several servers following one another, several users
following each other. Designates federated communities in general.
- **Vidiverse:** same as Fediverse, but federating videos specifically.
- **Instance:** a server which runs PeerTube in the fediverse.
- **Origin instance:** the instance on which the video was uploaded and which
is seeding (through the WebSeed protocol) the video.
- **Cache instance:** an instance that decided to make available a WebSeed
of its own for a video originating from another instance. It sends a `ptCache`
activity to notify the origin instance, which will then update its list of
WebSeeds for the video.
- **Following:** the action of a PeerTube instance which will follow another
instance (subscribe to its videos).
## Base
### Communications
* All the communication between the instances are signed with [Linked Data
Signatures](https://w3c-dvcg.github.io/ld-signatures/) with the private key
of the account that authored the action.
* We use the [ActivityPub](https://www.w3.org/TR/activitypub/) protocol (only
server-server for now). Object models could be found in
[shared/models/activitypub
directory](/shared/models/activitypub).
* All the requests are retried several times if they fail.
### Instance
* An instance has a websocket tracker which is responsible for all videos
uploaded by its users.
* An instance has an administrator that can follow other instances.
* An instance can be configured to follow back automatically.
* An instance can blacklist other instances (only used in "follow back"
mode).
* An instance cannot choose which other instances follow it, but it can
decide to **reject all** followers.
* After having uploaded a video, the instance seeds it (WebSeed protocol).
* If a user wants to watch a video, they ask its instance the magnet URI and
the frontend adds the torrent (with WebTorrent), creates the HTML5 video
player and streams the file into it.
* A user watching a video seeds it too (BitTorrent). Thus another user who is
watching the same video can get the data from the origin server and other
users watching it.

View File

@ -224,8 +224,8 @@ and update your [.env](https://github.com/Chocobozzz/PeerTube/blob/develop/suppo
### Maintenance
* Improve REST API documentation: https://docs.joinpeertube.org/api.html ([@rigelk](https://github.com/rigelk))
* Add basic ActivityPub documentation: https://docs.joinpeertube.org/lang/en/devdocs/federation.html ([@rigelk](https://github.com/rigelk))
* Improve REST API documentation ([@rigelk](https://github.com/rigelk))
* Add basic ActivityPub documentation ([@rigelk](https://github.com/rigelk))
* Add CLI option to run PeerTube without client ([@rigelk](https://github.com/rigelk))
* Add manpage to peertube CLI ([@rigelk](https://github.com/rigelk))
* Make backups of files in optimize-old-videos script ([@Nutomic](https://github.com/nutomic))
@ -310,8 +310,8 @@ and update your [.env](https://github.com/Chocobozzz/PeerTube/blob/develop/suppo
### Maintenance
* Improve REST API documentation: https://docs.joinpeertube.org/api.html ([@rigelk](https://github.com/rigelk))
* Add basic ActivityPub documentation: https://docs.joinpeertube.org/lang/en/devdocs/federation.html ([@rigelk](https://github.com/rigelk))
* Improve REST API documentation ([@rigelk](https://github.com/rigelk))
* Add basic ActivityPub documentation ([@rigelk](https://github.com/rigelk))
* Add CLI option to run PeerTube without client ([@rigelk](https://github.com/rigelk))
* Add manpage to peertube CLI ([@rigelk](https://github.com/rigelk))
* Make backups of files in optimize-old-videos script ([@Nutomic](https://github.com/nutomic))
@ -525,7 +525,7 @@ This release could contain bugs. Don't expect a stable v1.1.0 until December :)
### Features
* Video redundancy system (experimental, see [the doc](https://docs.joinpeertube.org/lang/en/devdocs/architecture.html#redundancy-between-instances))
* Video redundancy system (experimental)
* Add peertube script (see [the doc](/support/doc/tools.md#cli-wrapper)) ([@rigelk](https://github.com/rigelk))
* Improve download modal ([@rigelk](https://github.com/rigelk))
* Add redirect after login ([@BO41](https://github.com/BO41))

2
FAQ.md
View File

@ -58,7 +58,7 @@ is named "Framatube".
Yes, the origin server always seeds videos uploaded on it thanks to
[Webseed](http://www.bittorrent.org/beps/bep_0019.html).
It can also be helped by other servers using [redundancy](https://docs.joinpeertube.org/lang/en/devdocs/architecture.html#redundancy-between-instances).
It can also be helped by other servers using [redundancy](https://docs.joinpeertube.org/#/contribute-architecture?id=redundancy-between-instances).
## What is WebSeed?

View File

@ -115,7 +115,7 @@ Be it as a user or an instance administrator, you can decide what your experienc
<h3 align="right">Communities that help each other</h3>
<p align="right">
In addition to visitors using WebTorrent to share the load among them, instances can help each other by caching one another's videos. This way even small instances have a way to show content to a wider audience, as they will be shouldered by friend instances (more about that in our <a href="https://docs.joinpeertube.org/lang/en/devdocs/architecture.html#redundancy-between-instances">redundancy guide</a>).
In addition to visitors using WebTorrent to share the load among them, instances can help each other by caching one another's videos. This way even small instances have a way to show content to a wider audience, as they will be shouldered by friend instances (more about that in our <a href="https://docs.joinpeertube.org/#/contribute-architecture?id=redundancy-between-instances">redundancy guide</a>).
</p>
<p align="right">
Content creators can get help from their viewers in the simplest way possible: a support button showing a message linking to their donation accounts or really anything else. No more pay-per-view and advertisements that hurt visitors and <strike>incentivize</strike> alter creativity (more about that in our <a href="./FAQ.md">FAQ</a>).
@ -153,7 +153,7 @@ Feel free to reach out if you have any questions or ideas! :speech_balloon:
See the [production guide](/support/doc/production.md), which is the recommended way.
See the [community packages](https://docs.joinpeertube.org/lang/en/docs/install.html), which cover various platforms (including [YunoHost](https://install-app.yunohost.org/?app=peertube) and [Docker](/support/doc/docker.md)).
See the [community packages](https://docs.joinpeertube.org/#/install-unofficial), which cover various platforms (including [YunoHost](https://install-app.yunohost.org/?app=peertube) and [Docker](/support/doc/docker.md)).
:book: Documentation
----------------------------------------------------------------
@ -162,13 +162,13 @@ If you have a question, please try to find the answer in the [FAQ](/FAQ.md) firs
### User documentation
See the [user documentation](https://docs.joinpeertube.org/lang/en/userdocs/).
See the [user documentation](https://docs.joinpeertube.org/#/use-setup-account).
### Admin documentation
See [how to create your own instance](#package-create-your-own-instance).
See the more general [admin documentation](https://docs.joinpeertube.org/lang/en/docs/).
See the more general [admin documentation](https://docs.joinpeertube.org/#/admin-following-instances).
#### Tools
@ -178,13 +178,13 @@ See the more general [admin documentation](https://docs.joinpeertube.org/lang/en
### Technical documentation
See the [architecture blueprint](https://docs.joinpeertube.org/lang/en/devdocs/architecture.html) for a more detailed explanation of the architectural choices.
See the [architecture blueprint](https://docs.joinpeertube.org/#/contribute-architecture) for a more detailed explanation of the architectural choices.
See our REST API documentation:
* OpenAPI 3.0.0 schema: [/support/doc/api/openapi.yaml](/support/doc/api/openapi.yaml)
* Spec explorer: [docs.joinpeertube.org/api.html](http://docs.joinpeertube.org/api.html)
* Spec explorer: [docs.joinpeertube.org/#/api-rest-reference.html](https://docs.joinpeertube.org/#/api-rest-reference.html)
See our [ActivityPub documentation](https://docs.joinpeertube.org/lang/en/devdocs/federation.html).
See our [ActivityPub documentation](https://docs.joinpeertube.org/#/api-activitypub).
:heart: Supports of our crowdfunding
----------------------------------------------------------------

View File

@ -38,7 +38,7 @@ info:
}
```
externalDocs:
url: https://docs.joinpeertube.org/api.html
url: https://docs.joinpeertube.org/#/api-rest-reference.html
tags:
- name: Accounts
description: >
@ -1739,7 +1739,7 @@ components:
- Have an account with sufficient authorization levels
- [Generate](https://docs.joinpeertube.org/lang/en/devdocs/rest.html) a
- [Generate](https://docs.joinpeertube.org/#/api-rest-getting-started) a
Bearer Token
- Make Authenticated Requests

View File

@ -47,7 +47,7 @@ $ curl -H 'Authorization: Bearer 90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0' https
```
### List videos
## List videos
```bash
$ curl https://peertube.example.com/api/v1/videos

View File

@ -1,67 +0,0 @@
# Client code documentation
The client is a HTML/CSS/JavaScript web application (single page application -> SPA) developed with [TypeScript](https://www.typescriptlang.org/)/[Angular](https://angular.io/).
## Technologies
* [TypeScript](https://www.typescriptlang.org/) -> Language
* [Angular](https://angular.io) -> JavaScript framework
* [SASS](http://sass-lang.com/) -> CSS framework
* [Webpack](https://webpack.js.org/) -> Source builder (compile TypeScript, SASS files, bundle them...)
* [Bootstrap](http://getbootstrap.com/) -> CSS framework
* [WebTorrent](https://webtorrent.io/) -> JavaScript library to make P2P in the browser
* [VideoJS](http://videojs.com/) -> JavaScript player framework
## Files
The client files are in the `client` directory. The Webpack 2 configurations files are in `client/config` and the source files in `client/src`.
The client modules description are in the [client/package.json](/client/package.json). There are many modules that are used to compile the web application in development or production mode.
Here is the description of the useful `client` files directory:
tslint.json -> TypeScript linter rules
tsconfig.json -> TypeScript configuration for the compilation
.bootstraprc -> Bootstrap configuration file (which module we need)
config -> Webpack configuration files
src
|__ app -> TypeScript files for Angular application
|__ assets -> static files (images...)
|__ sass -> SASS files that are global for the application
|__ standalone -> files outside the Angular application (embed HTML page...)
|__ index.html -> root HTML file for our Angular application
|__ main.ts -> Main TypeScript file that boostraps our Angular application
|__ polyfills.ts -> Polyfills imports (ES 2015...)
Details of the Angular application file structure. It tries to follow [the official Angular styleguide](https://angular.io/docs/ts/latest/guide/style-guide.html).
app
|__ +admin -> Admin components (followers, users...)
|__ account -> Account components (password change...)
|__ core -> Core components/services
|__ header -> Header components (logo, search...)
|__ login -> Login component
|__ menu -> Menu component (on the left)
|__ shared -> Shared components/services (search component, REST services...)
|__ signup -> Signup form
|__ videos -> Video components (list, watch, upload...)
|__ app.component.{html,scss,ts} -> Main application component
|__ app-routing.module.ts -> Main Angular routes
|__ app.module.ts -> Angular root module that imports all submodules we need
## Conventions
Uses [TSLint](https://palantir.github.io/tslint/) for TypeScript linting and [Angular styleguide](https://angular.io/docs/ts/latest/guide/style-guide.html).
## Concepts
In a Angular application, we create components that we put together. Each component is defined by an HTML structure, a TypeScript file and optionally a SASS file.
If you are not familiar with Angular I recommend you to read the [quickstart guide](https://angular.io/docs/ts/latest/quickstart.html).
## Components tree
![Components tree](/support/doc/development/client/components-tree.svg)
## Newcomers
The main client component is `app.component.ts`. You can begin to look at this file. Then you could navigate in the different submodules to see how components are built.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 18 KiB

View File

@ -1 +0,0 @@
<mxfile userAgent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0" version="8.9.9" editor="www.draw.io" type="device"><diagram name="Page-1" id="8be7db5e-9885-9541-e5e4-cf9e4eb3a109">7Zpbb5swFMc/TaTtZQLMLY9d1nYP2zSp2u3RwQ54dTAypkn36WeDSSCmVdcR3FTpQwXHN/z7G59zHGZgsd5ec1hknxnCdOY5aDsDH2aeFzuB/K8M943Bd93GkHKCGlPHcEP+YG10tLUiCJe9ioIxKkjRNyYsz3EiejbIOdv0q60Y7Y9awBQbhpsEUtP6gyCRaasbzvcFHzFJMz107EVNwRImtylnVa7Hm3lgVf81xWvY9qUnWmYQsU3HBC5nYMEZE83VervAVKFtsTXtrh4o3T03x7l4SgNPT6gU9+3cMZIo9C3jImMpyyG93Fvf1/PDqgdH3mViTeWlKy/xloifyvwu0He/2pJc8PtOkbr9pTsoBeTiQqkmDTnLcWu7IpTqOjhHbY2EwrIkSWPUVdQQv7EQ93opwUowado//ifGCl1vxXKhq7nq3kSmKZas4omG4ulFCHmKdS1NTuHqNNOYrzFbYzlHWYFjCgW5668sqBdouqu3F0leaJ2GNQPOWbNnahZb08w9a/ZMzSJrmnlnzZ6pGbCmWTymZk/F9rC2gxyeRTSaiKAfvFKCPpiKYGiF4CO7yBR0/f+kq5t+ZUQO7Dk6k5jPdbCjEwm3DX7aLppn0K0ONNo9xtNkG3XreEyOl/RSTLWt6LHvIK10pxdFUWdw60K6Na1eDz6lMt1TkDcZEfimgPU8NjLh7KM+dFor6fcWjDJe9wOwiwIc1X6Ts1vcKZmHEYDhY27uDnOBt4+6MF0K/P5CbRO8TSd9bG1ZN3N0RmA76obz8Ko7hWAEmGs8tBWMtKHrOYD8Z80Ca5qN6wVe27vk29IFGP7jO0GYlTMvhGvlEPJlWewmdgQ3giCOV8mQGwmTGC9XI7mR+CDeaaOSKfyIbzC+REQFY2+qgjKIZPuqQFDgt5I6lQO/R+ROXqainnxjWvJDi2zWq3csgQIcI39IoNhbgnAkPx8c+vkofBcYEsUDCgUjKBQYCn0i5fFCp2mQ+laRhgbSH1Ak2YkzNcLRSZlGBtOLJJE+8tRXauBa3J1j891nKclPHOnu1wwbSHdBzznYa3/O6gZ77Wq3EIV70whz6pnTkGiuLdHARMcQr1A0YC3fnZuuGq2P6VUmSaNsZlHtrtlBesUoVd+knDZU9zCkBAbU+VBAGY3A1DWY1um/6nZZlfjk0Xr22AIzqfxWYn7qSA8DyyGkg/nPGEgHEqAlq15A+mPwG6D8INLQt3k4ZZ4ADpxCfVUf9nnOF6aOra7q7/Be6CnUfykRRTaVMM8JB5T4rB53l/a/Qg3mjk0NzB2mdYiLDOY5pkfcvyfB6zoTngzI2/03t823A/vvmsHlXw==</diagram></mxfile>

View File

@ -1,58 +0,0 @@
# Server code documentation
The server is a web server developed with [TypeScript](https://www.typescriptlang.org/)/[Express](http://expressjs.com).
## Technologies
* [TypeScript](https://www.typescriptlang.org/) -> Language
* [PostgreSQL](https://www.postgresql.org/) -> Database
* [Redis](https://redis.io/) -> Job queue/cache
* [Express](http://expressjs.com) -> Web server framework
* [Sequelize](http://docs.sequelizejs.com/en/v3/) -> SQL ORM
* [WebTorrent](https://webtorrent.io/) -> BitTorrent tracker and torrent creation
* [Mocha](https://mochajs.org/) -> Test framework
## Files
The server main file is [server.ts](/server.ts).
The server modules description are in the [package.json](/package.json) at the project root.
All other server files are in the [server](/server) directory:
server.ts -> app initialization, main routes configuration (static routes...)
config -> server YAML configurations (for tests, production...)
scripts -> Scripts files for npm run
server
|__ controllers -> API routes/controllers files
|__ helpers -> functions used by different part of the project (logger, utils...)
|__ initializers -> functions used at the server startup (installer, database, constants...)
|__ lib -> library function (WebTorrent, OAuth2, ActivityPub...)
|__ middlewares -> middlewares for controllers (requests validators, requests pagination...)
|__ models -> Sequelize models for each SQL tables (videos, users, accounts...)
|__ tests -> API tests and real world simulations (to test the decentralized feature...)
## Conventions
Uses [JavaScript Standard Style](http://standardjs.com/).
## Architecture
The server is composed by:
* a REST API (relying on the Express framework) documented on http://docs.joinpeertube.org/api.html
* a WebTorrent Tracker (slightly custom version of [webtorrent/bittorrent-tracker](https://github.com/webtorrent/bittorrent-tracker#server))
A video is seeded by the server with the [WebSeed](http://www.bittorrent.org/beps/bep_0019.html) protocol (HTTP).
![Architecture scheme](/support/doc/development/server/upload-video.png)
When a user uploads a video, the REST API creates the torrent file and then adds it to its database.
If a user wants to watch the video, the tracker will indicate all other users that are watching the video + the HTTP url for the WebSeed.
## Newcomers
The server entrypoint is [server.ts](/server.ts). Looking at this file is a good start.
Then you can try to understand the [controllers](/server/controllers): they are the entrypoints of each API request.

View File

@ -1 +0,0 @@
<mxfile userAgent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" version="7.9.7" editor="www.draw.io" type="device"><diagram id="033390a3-e8de-cf4f-5be1-41b3d99c78ae" name="Page-1">3VpRc5s4EP41nmkekgGEwH6M3aS9md5Mpnbby6MA2dBgxIHs2P31J4EECGGbxLhNzu1MYLXC0re7364Wj8BsvfuUoTT8mwQ4Hll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