Angular App for TPB
#1
Hi TPB Team,

I liked the changes that you all have done recently to the website, and I also thought of trying something at my end. So, over last 4-5 days, I started building an angular web app for TPB. Please see if you think it is worth considering. Of course, it is nothing compared to what you guys must be upto, but take a look.

Steps to run:
Code:
git clone https://SKMi@bitbucket.org/SKMi/tpb.git
npm install
npm start

I changed a few things to my liking since I did not have access to all static assets images, css, etc. Also, instead of live API, I am using dummy data. So, the api service will need modifications. I have already commented the code to integrate it with the live APIs.

Please consider it only as a beginning. If you think this is worth the effort, I'll be happy to invest more time and energy in this. However, as I am not sure what the tech team is already working at, please let me know if you already have plans in similar direction and I should not spend time over this.
Reply
#2
More Features:
1. Pagination support
2. rel="noreferrer" is added to all the links which are in the torrent description and imdb links.
Reply
#3
Seems to work fine as a prototype. On Win7sp1. The unblock.me page was a nice addition.
If there is one feature I've been dying for - its a blacklist for sporger posters. Or something that kill anyone with say over 50 posts in an hour...
Reply
#4
(May 09, 2020, 02:45 am)waregim Wrote: Seems to work fine as a prototype. On Win7sp1. The unblock.me page was a nice addition.
If there is one feature I've been dying for - its a blacklist for sporger posters. Or something that kill anyone with say over 50 posts in an hour...

Thanks waregim, but I haven't added the login, registration and secured pages (uploads, etc.) in this app yet. I'm not sure about their entire functionality. About the sporgers, I think correct way to implement this should be server-side, as client-side I prefer for sanity check and authentication rather than authorization, especially for such important usecase.

Completely unrelated to this, I have also added a feature where we can hide a particular category (for instance, right now category 5xx is hidden). This I did just in case we have certain categories completely hidden for certain type of users.
Reply
#5
Not sure i understand the reasons for client side security on this. But then again, I never consider apps on a multi-user network!

(Just the two of use here on this one...)

My system is basically configured to compile anything. However you may want to let folks know what they need to install node.js to compile this. And that they need to put the address of it in the browser bar.
Reply
#6
TPB quite wisely sets access control headers on the apibay queries, which means most modern browsers won't accept results from these queries.

It is possible to set up a proxy that strips the response header, or install a browser plugin that alters the header.

Or use the .onion address which eliminates cross domain queries.

In any case, it is a detail that will have to be dealt with in implementing any browser app for TPB.
Reply
#7
(May 09, 2020, 21:24 pm)waregim Wrote: Not sure i understand the reasons for client side security on this. But then again, I never consider apps on a multi-user network!

(Just the two of use here on this one...)

My system is basically configured to compile anything. However you may want to let folks know what they need to install node.js to compile this. And that they need to put the address of it in the browser bar.

Sure waregim. I'll add a much detailed guide to run. But pardon me, I may not be able to do that before this weekend.

(May 13, 2020, 01:25 am)Moe Wrote: TPB quite wisely sets access control headers on the apibay queries, which means most modern browsers won't accept results from these queries.

It is possible to set up a proxy that strips the response header, or install a browser plugin that alters the header.

Or use the .onion address which eliminates cross domain queries.

In any case, it is a detail that will have to be dealt with in implementing any browser app for TPB.

I understand. The reason I am stuck in that direction is I am not able to consume the live APIs' data due to cloudfront pages. When I request the TPB API directly, I get 500 response. Will appreciate any guidance to get the server response directly to the app running on my localhost. For same reason, even postman is not able to call the APIs.
Reply
#8
500 errors tend to be regional, and temporary.

The problem lies in that your browser will reject the api results when using the app while it would accept the same results sending the same query while visiting thepiratebay.org

It is annoying, but understandable.
Reply
#9
(May 13, 2020, 11:20 am)Moe Wrote: 500 errors tend to be regional, and temporary.

The problem lies in that your browser will reject the api results when using the app while it would accept the same results sending the same query while visiting thepiratebay.org

It is annoying, but understandable.

Thanks a lot. Finally got it working. It was a stupid mistake on my part. Anyway, now you can all browse TPB from your localhost.

Just realised few styling and layout issues. And of course, homepage, login/register and secured pages next! Then comes bugfixes.

Will post a detailed guide to run on this Sunday. Also, will try to set a proxy server through Angular to fetch the data from apibay.

Edit: The final build is not updated yet on master branch. Will do it after minor bugfixes on Friday and Saturday.
Reply
#10
I've been using a browser plugin to bypass the access control headers for the time being.

https://addons.mozilla.org/en-US/firefox/search/?q=cors
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Building a Chat App with React.js and Chatkit ankitdixit 1 20,110 Apr 23, 2020, 08:37 am
Last Post: rohanjoshi0894
  Piratebay app?? Edeldier123 12 46,994 Mar 17, 2018, 05:54 am
Last Post: bgcrack
  Pirate Bay Desktop Search App CelestialDog 1 17,715 May 20, 2015, 08:52 am
Last Post: west087
  Pirate Bay App for windows CSharpProgrammer 1 16,649 Aug 21, 2014, 03:40 am
Last Post: NokTham
  [REQ] Developing a Timed Lock App/Software sheikh2 17 42,461 Jun 20, 2014, 11:36 am
Last Post: sheikh2



Users browsing this thread: 2 Guest(s)