- koa plus koa-*
- mongodb (Origin MongoDB Driver)
- underscorejs
- co-body or co-busboy for parse the params of request
- koa-router
- validator.js
- magnet-uri
- parse-torrent
- RSS
Managed via bower
- bootstrap Paper OR material
- angularjs
- ui-router
- ngProgress
- angular-translate with static language file
- FontAwesome
- redactor
- momentjs
- Prerender.io For SEO
- opentracker
Shall we give it a try? webtorrent
- APP_ROOT
- bin/ - Executables
- controller/ - Controllers and route definitions
- doc/ - Documentations
- lib/ - Libraries & functions
- models/ - Model definitions
- public/ - Public static directory, delegate to nginx directly as root directory
- bower_components/ - Static app resource (managed by bower)
- templates/ - ui-router page templates
- images/ - images directory (if necessary)
- angular-prpr.js - Angular.js main app file
- index.html - Frontpage index file
- package.json - Package info file
- rin.js - rin-pr main app
All routes defined under /api
-
Frontpage: 50 latest torrents
- Path:
/torrents/latest
- Method:
GET
- Return: 50 latest torrents (all bangumi, sort by
publish_time
) list
[ { _id: ObjectID(), title: '[KNA][Sora no Method][天體運行式]][10][720p][MP4]', tags: ['KNA', 'Sora no Method', '720p', 'mp4', 'PSV', 'Mizi-raws'], bangumi_id: ObjectID(), downloads: 144, finished: 128, leechers: 17, seeders: 26, team: 'KNA', author: 'angelcat', publish_time: UNIX_TIMESTAMP(), magnet: 'magnet:...', file: '/download/2014/12/(md5).torrent', content: 'Torrent desc here.' }, {...} ]
- Path:
-
Frontpage: Season bangumi list
- Path:
/bangumi/current
- Method:
GET
- Return: Currently on showing bangumi list
[ { _id: ObjectID(), name: '天體運行式', startDate: UNIX_TIMESTAMP(), endDate: UNIX_TIMESTAMP(), showOn: 6, // Date().getDay() tags: ObjectID() }, {...} ]
- Path:
-
Frontpage: Team list
- Path:
/team/all
- Method:
GET
- Return: Registered team list
[ { _id: ObjectID(), name: 'KNA' }, {...} ]
- Path:
-
Frontpage: Torrent details
- Path:
/torrent/:torrent_id
- Method:
GET
- Return: Torrent details Deprecated: angular already requested the resources
- Path:
-
Filter page: Specific bangumi torrents list
- Path:
/bangumi/:bangumi_id
- Method:
GET
- Return: 50 (or customizable amount) latest torrents list of the bangumi
[ { _id: ObjectID(), title: '[KNA][Sora no Method][天體運行式]][10][720p][MP4]', tags: ['KNA', 'Sora no Method', '720p', 'mp4', 'PSV', 'Mizi-raws'], bangumi_id: ObjectID(), downloads: 144, finished: 128, leechers: 17, seeders: 26, team: 'KNA', author: 'angelcat', publish_time: UNIX_TIMESTAMP(), magnet: 'magnet:...', file: '/download/2014/12/(md5).torrent', content: 'Torrent desc here.' }, {...} ]
- Path:
-
Filter page: Specific team torrents list
- Path:
/team/:team_id
- Method:
GET
- Return: 50 (or customizable amount) latest torrents list by the team
[ { _id: ObjectID(), title: '[KNA][Sora no Method][天體運行式]][10][720p][MP4]', tags: ['KNA', 'Sora no Method', '720p', 'mp4', 'PSV', 'Mizi-raws'], bangumi_id: ObjectID(), downloads: 144, finished: 128, leechers: 17, seeders: 26, team: 'KNA', author: 'angelcat', publish_time: UNIX_TIMESTAMP(), magnet: 'magnet:...', file: '/download/2014/12/(md5).torrent', content: 'Torrent desc here.' }, {...} ]
- Path:
-
Admin: Summary
- Path:
/admin/summary
- Method:
GET
- Return: App & system summary
{ sysload: [0.20, 0.51, 0.73], teams: 32, members: 41, torrents: 765 }
- Path:
-
Admin: Team CRUD
-
Admin: User CRUD
-
Admin: Torrents CRUD
-
Admin: Bangumi CRUD
-
User: signin
-
User: signout
-
User: Submit new torrent
-
Function: Search tags
-
Model: Admin
- Prototype:
-
Model: Users
- Document object:
{ _id: ObjectID(), username: 'user', password: md5(md5('password') + salt), salt: random(12), email: '[email protected]', team_ids: [ ObjectID(team_id) ], group: 'members'|'admin' }
- Prototype:
-
Model: Bangumis
- Document object:
{ _id: ObjectID(), name: '天體運行式', startDate: UNIX_TIMESTAMP(), endDate: UNIX_TIMESTAMP(), showOn: 6, // Date().getDay() tag: ObjectID(tag_id) }
- Prototype:
-
Model: Torrents
- Document object:
{ _id: ObjectID(), title: '[KNA][Sora no Method][天體運行式]][10][720p][MP4]', tags: ['KNA', 'Sora no Method', '720p', 'mp4', 'PSV', 'Mizi-raws'], bangumi_id: ObjectID(), downloads: 144, finished: 128, leechers: 17, seeders: 26, team: 'KNA', author: 'angelcat', publish_time: UNIX_TIMESTAMP(), magnet: 'magnet:...', file: '/download/2014/12/(md5).torrent', content: 'Torrent desc here.' }
-
Model: Tags
- Document object:
{ _id: ObjectID(), name: '天体のメソッド', synonyms: ['天体のメソッド', 'Sora no Method', '天體運行式', '天体运行式', '天体的方式'] }