Back to notes
What steps are involved in testing the application before deployment?
Press to flip
Testing different functionalities to ensure smooth operations and user experience, and updating hooks, components, and states to handle edge cases and improve performance.
Explain the process of adding a new post with respect to optimistic UI updates.
When adding a new post, the `useOptimistic` hook updates the UI immediately, then a server action handles form data and validates it before it is committed to the database.
Explain the deployment strategy for this social media app.
The app is deployed on a Hostinger VPS using Node.js via Cloud panel. Cloudinary is used for storing images.
What are the main components on the left side of the Home page in the social media application?
Profile card, menu, and advertisement component.
Which npm package is used to keep the Node.js process running in production?
The `pm2` package is used to keep the Node.js process running in production.
What are some of the database models defined in the Prisma schema for this application?
User, Post, Like, Comment, Follow, FollowRequest, Block, and Story.
Describe the functionality of the `useOptimistic` hook in the context of the social media app.
The `useOptimistic` hook is used to update the UI immediately without waiting for the server response, providing a smoother and faster user experience.
How is user authentication handled in the application?
User authentication is handled using Clerk, which also manages sessions and synchronizes users with the database via webhooks.
Which feature of Next.js is utilized to send forms in this application?
Server actions are used to send forms in this application.
What should be done if a user is blocked according to the application’s user profile logic?
If a user is blocked, their profile page should not be visible.
List the main tasks involved in backend operations for handling posts.
Adding posts, validating server-side form data, and updating the database.
How do you view and manage database entries in this application?
Database entries are viewed and managed using Prisma Studio.
What is the role of the `useFormAction` hook in this application?
The `useFormAction` hook is used to receive data from the backend after sending forms using server actions.
What are the components of the center section on the Home page?
The post feed, user stories (available for 24 hours), add new post feature, and add new story feature.
How is image storage handled in this application?
Image storage is handled using Cloudinary.
Previous
Next