jamesgeer / conf-twitter-bot

A Twitter Bot to post about academic papers
MIT License
4 stars 0 forks source link

Implement React #6

Closed jamesgeer closed 2 years ago

jamesgeer commented 2 years ago

I have rewritten the backend to act as a server to a React client.

This is a significant change and not all features have been restored, this is because a database will need to be configured but for now, the system uses the same JSON data that it did before.

Notes

"Tweets" will now be scheduled with CRON however, I have not written the code to send the actual Tweet to Twitter as a database needs to be added however, the system will put the Tweet into a JSON file as it did before.

The web scraper is intermittent, I have commented out the code as a better solution is needed, the NPM library "fetch-cookies" is using an out-of-date version of "fetch" which TypeScript refuses to compile, and the website seems to depend on cookies to return the correct data, I think using something like "Playwright" would give us better results.

To run the application you will need to cd into the backend and do "npm run start" and then cd into the frontend and run the same command. I want to implement Docker to make this easier, if Docker is too difficult then I will add "Concurrently" to run both with one command.