/twitter-copy-graphql

A simple Twitter clone using React/Apollo to connect to a GraphQL Spring Boot API

Primary LanguageJava

twitter-copy-graphql

A simple Twitter clone using React/Apollo to connect to a GraphQL Spring Boot API. This app supports viewing tweets made by other users, viewing user profiles, and creating new tweets.

The purpose of this project is not to completely copy the functionality of Twitter. This project was created to explore how web applications built with Java and React can use GraphQL as an alternative to REST.

Screenshots

Home Page

Profile Page

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Ensure you have the following installed on your machine:

  • Java 8
  • Maven
  • Node JS & NPM
  • Yarn

Installing

The GraphQL API can be started like any other Maven project

$ cd /path/to/twitter-copy-graphql/server
$ mvn clean install
$ java -jar /target/graphql-service-0.0.1-SNAPSHOT.jar

Alternatively, you could compile the graphql-service project and run the DemoApplication main method in your IDE.

Once you have the API running, you should switch to another termial window before booting up the UI. To set up the React UI, you'll need to install your dependencies and run the start command through Yarn.

$ cd /path/to/twitter-copy-graphql/ui
$ yarn install
$ yarn run start

After both the UI and API are running, you should be able to see the app in your browser at http://localhost:3000.

Built With

  • GraphQL - Back end service architecture
  • Apollo - Front end tool for GraphQL interaction
  • Spring Boot - API framework used
  • Maven - Java Dependency Management
  • Yarn - JS Dependency Management
  • React - UI Library