John Chen

Build Applications from Website to Mobile

Hackernews Clone - Apollo GraphQL

A Hackernews clone site built with next.js implementing GraphQL APIs and Firebase Cloud Firestore to substitute GraphQL subscriptions.

View the Site | GitHub | Expo Publish | GitHub(Mobile)

This is a Hackernews clone site built with next.js implementing GraphQL APIs, for which Apollo Client is adopted in the frontend and Apollo Server in the backend server. We can successfully build a full functionality of GraphQL server with next.js, including queries, mutations, and subscriptions.

The real-time communication of subscriptions however was found not to function well once the package is deployed to Vercel, which is a serverless platform. Therefore real-time Firebase Cloud Firestore is used to substitute GraphQL subscriptions.

In addition, iOS and Android mobile apps are also delivered for the clone site. The apps are developed with React Native, anyone who is interested can test the apps through the Expo Publish Link as above with Expo Go app.

Docker: docker run -p 3000:3000 jglchen/hackernews-nextjs-apollo

Screenshot of the Website AppScreenshot of the Mobile App