Week Log 3

Rewrite of Week Log using Next.js, Typescript, PostgreSQL and Prisma

🧪 Trying out the new tech stack

17th December 2020

The last few days I did some work on a trial of the new tech stack, which is now online. This was my first taste of typescript, next.js and prisma.

The steepest learning curve was with typescript. Having not thought about types for quite some time, there was a lot of back-and-fourth with references to find the correct types for (say) React events or the like. Once I had the basics of an app in place, it definitely helped to turn on strict mode and work through any missing types.

It was also interesting to start learning next.js's approach to data loading to support SSR - getStaticProps, getServerSideProps and friends.

I could definitely run further with this demo. Some possible lines of extension:

  • Work out how to use Prisma to initialise the DB
  • Try out Prisma migrations
  • Create a wrapper for our Prisma calls
  • Deploy to Vercel

Beyond that, the next step would be to start up a weeklog3 project and work on the data layer, setting up a db schema, an import tool from a weeklog2 JSON backup and a data layer around prisma calls.

Next.js has a writeup on techniques to migrate to it incrementally. It'll be interesting to explore different migration approaches.

Development Effort "Building a chat app" Begins

Effort Type: Experimentation