diff options
author | Chocobozzz <me@florianbigard.com> | 2019-05-23 14:58:34 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-05-23 14:58:34 +0200 |
commit | 46e9407c60650fefd0c0a3358da22d81dabe6f09 (patch) | |
tree | 7d8ea55346de655dd8c60dddc6a430541186ed6c /support/doc/development/server | |
parent | 79ad1706f3cf009e04db9cd9e6a721801d93e64e (diff) | |
download | PeerTube-46e9407c60650fefd0c0a3358da22d81dabe6f09.tar.gz PeerTube-46e9407c60650fefd0c0a3358da22d81dabe6f09.tar.zst PeerTube-46e9407c60650fefd0c0a3358da22d81dabe6f09.zip |
Update URLs to point to new documentation site
Diffstat (limited to 'support/doc/development/server')
-rw-r--r-- | support/doc/development/server/code.md | 58 | ||||
-rw-r--r-- | support/doc/development/server/peertube-architecture-server.xml | 1 | ||||
-rw-r--r-- | support/doc/development/server/upload-video.png | bin | 34643 -> 0 bytes |
3 files changed, 0 insertions, 59 deletions
diff --git a/support/doc/development/server/code.md b/support/doc/development/server/code.md deleted file mode 100644 index 3894c2542..000000000 --- a/support/doc/development/server/code.md +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | # Server code documentation | ||
2 | |||
3 | The server is a web server developed with [TypeScript](https://www.typescriptlang.org/)/[Express](http://expressjs.com). | ||
4 | |||
5 | |||
6 | ## Technologies | ||
7 | |||
8 | * [TypeScript](https://www.typescriptlang.org/) -> Language | ||
9 | * [PostgreSQL](https://www.postgresql.org/) -> Database | ||
10 | * [Redis](https://redis.io/) -> Job queue/cache | ||
11 | * [Express](http://expressjs.com) -> Web server framework | ||
12 | * [Sequelize](http://docs.sequelizejs.com/en/v3/) -> SQL ORM | ||
13 | * [WebTorrent](https://webtorrent.io/) -> BitTorrent tracker and torrent creation | ||
14 | * [Mocha](https://mochajs.org/) -> Test framework | ||
15 | |||
16 | |||
17 | ## Files | ||
18 | |||
19 | The server main file is [server.ts](/server.ts). | ||
20 | The server modules description are in the [package.json](/package.json) at the project root. | ||
21 | All other server files are in the [server](/server) directory: | ||
22 | |||
23 | server.ts -> app initialization, main routes configuration (static routes...) | ||
24 | config -> server YAML configurations (for tests, production...) | ||
25 | scripts -> Scripts files for npm run | ||
26 | server | ||
27 | |__ controllers -> API routes/controllers files | ||
28 | |__ helpers -> functions used by different part of the project (logger, utils...) | ||
29 | |__ initializers -> functions used at the server startup (installer, database, constants...) | ||
30 | |__ lib -> library function (WebTorrent, OAuth2, ActivityPub...) | ||
31 | |__ middlewares -> middlewares for controllers (requests validators, requests pagination...) | ||
32 | |__ models -> Sequelize models for each SQL tables (videos, users, accounts...) | ||
33 | |__ tests -> API tests and real world simulations (to test the decentralized feature...) | ||
34 | |||
35 | |||
36 | ## Conventions | ||
37 | |||
38 | Uses [JavaScript Standard Style](http://standardjs.com/). | ||
39 | |||
40 | ## Architecture | ||
41 | |||
42 | The server is composed by: | ||
43 | |||
44 | * a REST API (relying on the Express framework) documented on http://docs.joinpeertube.org/api.html | ||
45 | * a WebTorrent Tracker (slightly custom version of [webtorrent/bittorrent-tracker](https://github.com/webtorrent/bittorrent-tracker#server)) | ||
46 | |||
47 | A video is seeded by the server with the [WebSeed](http://www.bittorrent.org/beps/bep_0019.html) protocol (HTTP). | ||
48 | |||
49 | ![Architecture scheme](/support/doc/development/server/upload-video.png) | ||
50 | |||
51 | When a user uploads a video, the REST API creates the torrent file and then adds it to its database. | ||
52 | |||
53 | 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. | ||
54 | |||
55 | ## Newcomers | ||
56 | |||
57 | The server entrypoint is [server.ts](/server.ts). Looking at this file is a good start. | ||
58 | Then you can try to understand the [controllers](/server/controllers): they are the entrypoints of each API request. | ||
diff --git a/support/doc/development/server/peertube-architecture-server.xml b/support/doc/development/server/peertube-architecture-server.xml deleted file mode 100644 index 3299307a1..000000000 --- a/support/doc/development/server/peertube-architecture-server.xml +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | <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">3VpRc5s4EP41nmkekgGEwH6M3aS9md5Mpnbby6MA2dBgxIHs2P31J4EECGGbxLhNzu1MYLXC0re7364Wj8BsvfuUoTT8mwQ4HllGsBuBjyPLMm3LGvH/RrAvJeOxWQpWWRQIpVowj35hITSEdBMFOFcUKSExjVJV6JMkwT5VZCjLyLOqtiSx+q0pWmFNMPdRrEt/RAENxS4sp5Z/xtEqlN9sOpNyxEP+0yojm0R838gCy+JTDq+RfJbYaB6igDw3ROBuBGYZIbS8Wu9mOObYStjKefcHRqt1ZzihfSaAcsIWxRssV1ysi+4lFsVuMNc3R2D6HEYUz1Pk89FnZn0mC+k6FsPLKI5nJCZZMVfuHUxzmpEn3Bgxig8b0VcsNrHFGcW7hkjs4BMma0yzPVMRo7YAUzgbELfPteVcqRI2rGZPhBAJb1lVT64RYxcCtG4AbQ3AbznOmMQcFsixj32/C0hvDG04EJCmpSLpmjqUlU4TSmcAJOEhJAd2yd+CJJzAP4ckGGuI4YDxm7glGQ3JiiQovqul0xpTQ8UP7yL6DxffQHH3KJQYPNm+HLKgvH8U03KKMnrLuZgJEpJgKbuP+MLFAwKp4ccozyO/FAoV/pifmNK9SBBoQwkT1ev/QkgqrUwSKtRM85gNc7LJfIGKIG22qhWWWsJuHLCjhs5wjGi0VRPGWUwinawOgFmGEWV5kC0xxEUOzIr9sIwWMaNZTsxWPQ2iLbtc8cvbIKi1tyyHkmIWz8SIIg/l1SS2msY8zV+Ym1PVDTKcR7+QVyhw26UkSmixXTgdwY9MguJolXBTsiWywAVTHi4RS6q3YmAdBUHhazHycDytUmVXwjhtT+nlWlBWZYFYrZJau4LVuDEhtJR4vRa83tvK4uEPHJWGClkuc+ZabTeo1tDLMyaaY3y9my+Y5PbhL81yL2PDAOJxYHex4djygOMMw4aTsZqg3Q4ydOCFyNC5PBmaKhm6ChkabTKsqa7Jh+Yb4EOZpJqEODgfFlPZNtG+oSDYRA+kncyfjuJCjtuqa1v6zhge02cX5QpeG5J2V+Gs03H+lBfHD17GpBhn/O7DD+x9Xcyuupl4GtFFxfJpRnwSv0tydoYi52vGzsBUCcR6Q+QsY6bhCczAlQ01n1hkDFpe1/bKwy9jc2wyPne72HziuAANxOaOc5rOJ5dic0ODaBA2tw7SeXXzWNH+eyhtTdk2aVC5/SaoHMDW0cgelpqBXkffY+qHVV3sx1FJryhNY0aBNCLJu+RYyTwDFMAGtNQEe+2Y55GsXJB0xL28b7HAICQM9B7BILTgHq7y/j+08MdOvGbHiVfGJgOOhY446eYdefRDYTCLfYnxMy//0nCz9hIUxfnNzc2B+urMDMti0+ruHgWO58CBMixo9eE6D0zuhbpHpt7SlFB6NYqlgPugAqfz74bIgeu88M5bpmDZ6a4elE+Z42yrVELl49SvYGLvBW0K1S4iCptGFKL+XN3lIIRpL+MijEOmh5OB7A5PdrJNo8PscIjKytXM/rChdTdpk8YEcbqsG0v8JDPHOLjqCE9lrl/0sfhUqtbFJ2LzMhz+Lnga6jwN+tZvjZMTdCdqWpcvQi5b40G3dWBzjtR42uzW+xz7EhWDqb9u4PUYM3GHM38hK56LLpFPIP/XlU+c4jMMr1iGWnJXJNIgFjDpIBZzkITiaFB/K8iEP7emk3bsd0XgS19LaG8legWfrcfepGfoNQCFR4j63KJaDZC2kcq9iDnHmmTqY9qVebl/7TGvCDaJ6KV7sH0puZcXgA4G7ukFQ5HrOSci+Hsgfw/JFHQE9Ntoa7fz5Mm2NrxwW9vSqLrunTDv4ERmGaLs4xXg58Xi4UrztPfQPJH5f5AG9dh1Fbtcn9k8GbY5oh/ovosK/vQpuyrYZzJTc9VLHa6xc+Bw7U68oX4tBEGPw3XXKesVtRC7rX/LVZqu/sEcuPsP</diagram></mxfile> \ No newline at end of file | ||
diff --git a/support/doc/development/server/upload-video.png b/support/doc/development/server/upload-video.png deleted file mode 100644 index 7edc06792..000000000 --- a/support/doc/development/server/upload-video.png +++ /dev/null | |||
Binary files differ | |||