Skip to content

Latest commit

 

History

History
208 lines (162 loc) · 10.9 KB

README.md

File metadata and controls

208 lines (162 loc) · 10.9 KB


Logo

A twitter-clone framework built on React.js and Java!

Home page


Stack:

Front-end

ReactTypeScript

Back-end

AWSDockerPostgresJavaSpringApache MavenIntelliJ IDEANodeJSNPMHibernateJWT

(back to top)


What's included

  • Rudimentary sign-in system with JWT
  • Tweet functionality: add, like, retweet, reply, quote, schedule, delete, send via DM, add to bookmarks
  • List functionality: Create, Edit, Follow, Pin, Add users
  • Customizable email notification settings (not scalable)
  • Tweet multimedia support: images (are put on a Amazon S3 bucket (can be improved)), poll, link preview, youtube video link (uses Youtube API, better to have its own embedded video player).
  • User functionality: follow, block, mute
  • Profile functionality: edit, save,
  • Site has customizable color scheme (DARK MODE ftw)
  • Account Settings

What's not included

  • Search (though, lets be real, twitter's current search functionalities really sucks, and the platform would probably be better with a 4chan-style board/search)
  • User mentions ("@*")
  • Tweet thread
  • "Refactoring"

(back to top)


Installation

Prerequisites:

Install, if you do not have:

Also, have these accounts:

GoogleAWS

Set up java environment for spring framework:

  1. In Intellij: select settings>plugins. add the Lombok plugin.
  2. In Intellij: select project structure. select Java 17.
  3. Build the project with Maven.

Set up containers:

  1. In the docker-compose file (or in Docker desktop), run the four services: postgres, pgadmin, zipkin, rabbitmq link

Set up DB:

  1. Open http://localhost:5050/browser/ and create these databases: user, tweet, chat, lists, notification, tag, topic

Set Up AWS:

  1. Create a new AWS S3 bucket. Change its access from private to public.
  2. Add a public access policy to the AWS S3 bucket (doc, github examle)
  3. Get AWS keys (link) and add them to the application.properties file (link)
  4. Add the bucket, access-key, and secret-key properties to the image-service.yml config file.

YouTube Data API (for video embedding):

  1. Go to the Google Cloud console. Generate the Youtube Data API key (link). Add the key to the tweet-service.yml config file
  2. Add a gmail account and password to the email-service.yml config file. Note that it is better practice to use a proper IAM; this feature will be deprecated when Google accounts do not allow less secure applications link.

NPM, then run:

  1. Open terminal.
cd frontend
npm install
# or, yarn install
  1. In Intellij, run (Spring Boot) services in this order:

    • eureka-server
    • config-server
    • api-gateway
    • user-service

    ... and then all other services in any order.

  2. Terminal once more.

cd frontend
npm start
  1. http://localhost:3000/home

    (Default) Login: [email protected]
    (Default) Password: qwerty123

(back to top)


note: why I made this

x sucks.

here are principles you should live by (aka my needless virtue-signaling):

  • don't instagramify. you dont need to compete against tiktok with a variant of reels.
  • don't have bloated ux! 'the everything app' kills (seemingly) lightweight legacies.
  • don't be a twitter-ui-inspired derivative pornography clone (onlyfans, fansly, etc.) with no conception of content discovery.
  • dont take government subsidies, lest you are making a honeypot
  • try not to have your two largest content ecosystems be politics and porn --- given their controversial and non-commercial nature.
  • dont rely on decades-old techno-humanist marketing ploys as the lowest-common-dominator in society does not use technology.
  • and, most stereotypically, and above all else: the network that generates culture and promotes content discovery controls the web!

god died in the 1800s. and now x is on life support.

cheers.

(back to top)