ToDo application (server action version)

In this version of the ToDo application, I have taken advantage of Next.js Server Actions to handleCRUD (Create, Read, Update, Delete) operations directly on the server (restful api version), the backend is still powered by Prisma ORM for database access. In the same way, I've integrated NextAuth.js with Google OAuth for user authentication, allowing users to securely sign in and manage their own personalized Todo lists.
The frontend (again) was developed using ShadCN UI components and TanStack Table, providing a modern, responsive, and efficient user experience.

The main advantage of using Server Actions is that it eliminates the need for separate API routes and allows for a more cohesive development experience within the Next.js framework.

It reminds me when i walked hand in hand with php ♥️ and how it was to be able to write backend and frontend code in the same file.

Also, I took the opportunity to test out VS Studio Copilot. I've had mixed feelings about it so far.  It's good at generating boilerplate code and can save time for simple tasks, but when it comes to  more complex logic, it often generates code that is not optimal or even incorrect, which can lead to more time spent fixing it  than writing it from scratch.

What I've learned?

Note:

  • Because Next.js agressive caching, export const dynamic = 'force-dynamic';and export const revalidate = 0; were added in page.tsx and route.ts in order to work properly. In other words, applicaction didn't notice when db records were added or updated.

@Todo

  • Implement the D functionality in the CRU 😝
  • Implement a preloader while server action does its thing

Important!

To create, manage your tasks, you'll need to . Logging in ensures your to-do lists are securely stored and available whenever you return.