Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App architecture? #49

Open
mesb1 opened this issue Jul 18, 2024 · 10 comments
Open

App architecture? #49

mesb1 opened this issue Jul 18, 2024 · 10 comments

Comments

@mesb1
Copy link

mesb1 commented Jul 18, 2024

Hi.
Did i get it right, your app isn't directly posting into twitter anything?
And you are using some 3rd party for this?

I am asking because when i have checked log of application access - there is no any address related to my server, only some random servers logon approximately at the time of posting messages.

@devhindo
Copy link
Owner

Yeah, I'm using a Next.js server for handling authentication and posting. It's located in the src/server. The CLI interacts with the server and the server does the necessary validations and interacts with Twitter API. This is due to the new Twitter API specifications, in which every request to the Twitter API should be linked to some Twitter APP. (Mine is X CLI) the one you authenticated to post on your behave when you opened the URL in your browser.

@mesb1
Copy link
Author

mesb1 commented Jul 18, 2024

I'm using a Next.js server for handling authentication and posting. It's located in the src/server.

Is it safe for us to use it?
Is it possible to run it locally also if it will be banned or experiencing connectivity issues?

@devhindo
Copy link
Owner

devhindo commented Jul 18, 2024

Is it safe for us to use it? Is it possible to run it locally also if it will be banned or experiencing connectivity issues?

The whole codebase resides on this repo, both the CLI code and the server. You can check it and suggest enhancements or even open a PR for improving security or its functionality. It's simply an open-source project.

As I said this is the only approach as Twitter's new plan is to attach every request to their API to an APP ID for better monetization. To run it locally you will need to create a Twitter Developer account and initiate a Twitter APP and also deploy the Next.js server somewhere and a DB to save credentials. The server is just a global interface with the Twitter API that has my app secret ID that allows it to interact with the Twitter API. I'm assuming it's fairly safe if it's open source. I can add local hosting information but you would have to deploy 3 ends and also create a Twitter APP. Would you suggest that?

@devhindo
Copy link
Owner

Is it possible to run it locally also if it will be banned or experiencing connectivity issues?

You can of course deploy it locally with your own Twitter APP ID as I said. But you would need to deploy the Next.js server and deploy a DB but I can't see this is necessary for just one user. Should I add instructions for doing so?

@mesb1
Copy link
Author

mesb1 commented Jul 18, 2024

Should I add instructions for doing so?

In future yes.
As for now as far as i understand your server is a kind of hardcoded inside x app.

@devhindo
Copy link
Owner

Should I add instructions for doing so?

In future yes. As for now as far as i understand your server is a kind of hardcoded inside x app.

Which x app? the server is separate from the CLI.
The CLI only performs GET and POST requests to the server.

@mesb1
Copy link
Author

mesb1 commented Jul 18, 2024

The CLI only performs GET and POST requests to the server.

yep, that's what i am mean, but the address of server is a hardcoded

@devhindo
Copy link
Owner

devhindo commented Jul 18, 2024

The CLI only performs GET and POST requests to the server.

yep, that's what i am mean, but the address of server is a hardcoded

Should it be located in .env file? Or Where?

@mesb1
Copy link
Author

mesb1 commented Jul 18, 2024

Should it be located in .env file? Or Where?

it is up to you, personally iam fine with optional arguments

@mesb1
Copy link
Author

mesb1 commented Jul 20, 2024

Well, because of issue #47 there is a sense to provide some information of how:
Add developer acc.
Register own app.
Run own server.
Target xcli to own server.

I assume most hard part is a run own server, as it doesn't looks like standalone app written on GOlang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants