Week Log 3

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

🧪 Chat app, styles and testing support

22nd December 2020

The chat app is functional, and along the way I got a few more parts up and running.

I took a look at different options for styling, and ended up going with CSS module styles. JSS is great, but this is built-in and works great until we want to do computations in CSS. It was also trivial to add SASS support, which is always nice.

I did a little housekeeping, then created an abstraction around the data layer, so that the pages & API don't need to know about Prisma. There's not much there yet, but I think it establishes a nice pattern.

Finally, I started playing with testing in Next.js. The default starting template doesn't come with it configured, but there's one provided that sets it up (along with typescript and eslint). I reckon this one would be a great starting point for the app.