WebSorcery / cucoders

Development Site
https://main.cuchapter.tech/
Apache License 2.0
0 stars 4 forks source link

Develop Frontend Access for Displaying All Resources via API Endpoint #1

Open ank1traj opened 11 months ago

ank1traj commented 11 months ago

The goal of this task is to enable frontend access to an API endpoint that retrieves and displays all available resources within the application. By implementing this feature on the frontend, users will gain visibility and access to a comprehensive view of available resources through the application interface.

singhcoder694 commented 11 months ago

@ank1traj I am facing problem in setup for this repo... Can you help me in this

Screenshot 2023-12-11 093227 Screenshot 2023-12-11 093237
ank1traj commented 11 months ago

@singhcoder694 What's your node version? Please try with latest node and let me know is it working or not?

singhcoder694 commented 11 months ago

Node v20 @ank1traj

ank1traj commented 11 months ago

Are you trying npm install? If yes please try with yarn install. And let me know the status.

singhcoder694 commented 11 months ago

No I did yarn install, as per README.md

ank1traj commented 11 months ago

This issue is coming from open SSL. Please run the yarn install with --openssl-legacy-provider

singhcoder694 commented 11 months ago

Is there any need to use any specific yarn version I am using Yarn v3

ank1traj commented 11 months ago

No, I don't think so. Have you tried yarn install --openssl-legacy-provider?

singhcoder694 commented 11 months ago

yarn install --openssl-legacy-provider, showing this error: Unknown Syntax Error: Unsupported option name ("--openssl-legacy-provider").

singhcoder694 commented 11 months ago

After cloning project: I ran yarn install command but this was the first error:

Usage Error: The nearest package directory (C:\Users\91620\cucoders) doesn't seem to be part of the project declared in C:\Users\91620.

If you can tell me what to do in this case as I have tried many solutions😔

ank1traj commented 11 months ago

I've yarn 1.22.19 and it's working fine. Please try this once. If it will not work then we can do a meet and figure out the issues.

singhcoder694 commented 11 months ago

Finally it has worked but I had to do bit more changes other than changing version....

I want to work on this issue but unable to understand it properly if you can provide some more reference and explanation..

ank1traj commented 11 months ago

So, in the website there is one section called Resources. On which right now all resources url are hardcoded. Need to change it to show using API. Resources are stored on cloudinary and google drive.

singhcoder694 commented 11 months ago
Screenshot 2023-12-13 102843

On resource page it is showing only this page nothing else, and when trying to login it is showing undefined on local and on official website also it is not working https://main.cuchapter.tech/resources it leads to home page again if we try to login.

ank1traj commented 11 months ago

You can turn off the authentication code from the App.js file.

singhcoder694 commented 11 months ago

Hmm I got what to do, we need to use api call to fetch data from cloudinary and drive and using forEach loop we will show data instead of hardcode, But how am I going to get the data which I have to fetch since there is no link to get data from cloudinary or drive @ank1traj

ank1traj commented 11 months ago

Provide me with your email ID. Will give you the access of the same

singhcoder694 commented 11 months ago

vivekkr694@gmail.com @ank1traj

ank1traj commented 11 months ago

Added

singhcoder694 commented 11 months ago

Ok , thankyou

singhcoder694 commented 11 months ago

curl https://API_KEY>:<API_SECRET>@api.cloudinary.com/v1_1/<CLOUD_NAME/resources/image Nedd API KEY and API SECRET but unable to get it as it is showing no permission

ank1traj commented 11 months ago

You can get it from the Cloudinary dashboard only.

singhcoder694 commented 11 months ago

In my case it is not in setting tab may be I don't have permission or something else... @ank1traj

Screenshot 2023-12-14 143130
ank1traj commented 11 months ago

Updated the role. Please try now

singhcoder694 commented 11 months ago

@ank1traj the data retrieved from API is like this... { asset_id: '43797c36ffa399ffbd807fb520c4582a', public_id: 'addResources/Database/1656485202797_mw9pvc', format: 'pdf', version: 1656485207, resource_type: 'image', type: 'upload', created_at: '2022-06-29T06:46:47Z', bytes: 960146, width: 595, height: 841, backup: true, folder: 'addResources/Database', url: '..', secure_url: '...' } As you can see it is missing many aspects such as Image URL , Category, Title etc. If you may tell what to specify if these values are not known.

ank1traj commented 11 months ago

https://res.cloudinary.com/cuchapter/image/upload/v1656485437/addResources/Data-Structure-Algorithms/Algorithms_1_x8d2xx.pdf

This is the public url and some data are static and some are dynamic which is coming from the API itself. You can work in this way.

singhcoder694 commented 10 months ago

@ank1traj I have solved this issue but unable to check due to blank page error, if you may tell me reason for this....

Screenshot 2023-12-23 133658
ank1traj commented 10 months ago

@singhcoder694 What is the issue here? Is there any console error?

singhcoder694 commented 10 months ago

There are so many errors in console, due to process.env, but I don't think it is reason for blank screen @ank1traj

Screenshot 2023-12-24 103404
ank1traj commented 10 months ago

It's error from cloudinary. Please check your code where you're using split function. And, please let me know the result.

ank1traj commented 10 months ago

It's working fine for me @singhcoder694. Let's connect over meet if it's still not working for you.

singhcoder694 commented 10 months ago

@ank1traj I found the problem, I think due to installation of cloudinary package-lock.json also initiated in my project, maybe that was overlapping with yarn.lock creating error.

Finally hope I would be able to make PR for this by tommorow 🙂, I have put my alot of time in configuring mistakes and understanding API😣

ank1traj commented 10 months ago

Great. Please don't use multiple package installer in same repo. Also, whatever you put all will go to your skill sets and help you in longer run.

singhcoder694 commented 10 months ago

@ank1traj can you help me in this issue, I have tried everything but unable to complete it😔 if you can provide help in this...

ank1traj commented 10 months ago

@singhcoder694 Sure, What help do you require?

singhcoder694 commented 10 months ago

Can we connect on google meet to discuss it tommorow? If you have time?

ank1traj commented 10 months ago

Sure

singhcoder694 commented 10 months ago

So how can I contact you? Any contact information?

ank1traj commented 10 months ago

https://calendly.com/honesthacker

singhcoder694 commented 10 months ago

Done @ank1traj, lets discuss it tommorow and solve this issue🙂