Restarting the App

June 23rd, 2020 By Alex Hu

main

After looking through a number of frameworks, it is time to restart the app with Next.js for the Server-Side Rendering, and Apollo GraphQL for the GraphQL server and client request.

The simple way to get a Next.js started is to run create-next-app with the desired example template. I picked this example as a starting point as it has all the hooks for Apollo server and client, along with some example codes to calling useQuery and useMutation, and the simple sign up / sign in / sign out pages. Othen than those, it is bare bone enough to experience the full back-end development.

npx create-next-app --example api-routes-apollo-server-and-client-auth

MongoDB hosted in by MongoDB Altas in the cloud, and MongoDB Compass for viewing the database.

TypeScript and Semantic UI React will be used on the client side. The content will be entered the form of Markdown using react-markdown as the UI component.

The Posts section will be built using the Semantic UI's Card component.

Each Post will have its own page hosting the Edit and Delete buttons. An Add button will be put in the Posts section.