Comments - TS | NextJS | trpc | prisma | mySQL | zustand | NextAuth

Solution retrospective
Fully working comments section with CRUD functionality based on NextJS with TS.
- Ability to add, edit, delete comments, reply to comments
- Change ratings on comments that are not yours. Changed approach with rating functionality: you can rate
+1
or-1
now. - All changes go to DB, such as comments, users, and rates through Prisma and trpc on the backend
- Used Zustand for global storage
- Added NextAuth authentication with Google and GitHub providers and the information of the user also goes to DB.
Very interesting project, with many new tools, which took a lot of time exploring documentation and examples. This was my first experience working with the database. And I've learned so many things.
Question:
- When trpc SSR is true, can't get user and that broke render flow. Should I get user in getServerSideProps?
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Maksim Baravy's solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord