TypeScript Troubleshooting for Next.js App, Tier’d

Job ID: 38927177

Budget: $15 – $25 AUD

Project Title: Fixing Persistent TypeScript and Build Errors in Next.js Application for Tier’d

Message:

Hello Freelancers,

I am seeking a skilled TypeScript and Next.js developer with experience in data validation, type management, and frontend/backend alignment to help resolve a critical issue in my project, Tier’d. Here’s an overview of the project and the problem I’m facing:

About Tier’d
Tier’d is a community-driven platform focused on ranking gaming accessories like mice, keyboards, and monitors based on user votes and reviews. Our goal is to provide gamers with a transparent and interactive way to determine the best gaming products through community engagement.

The platform currently includes:

Product ranking based on votes (upvotes, downvotes, and scores).
User review aggregation with pros, cons, and ratings.
A database of products categorized by type (e.g., monitors, mice).
The Problem
Despite repeated efforts, I am encountering persistent TypeScript errors and build failures during deployment on Vercel. These errors often revolve around:

Type Mismatches:

For example, the Product type does not align with the data returned from APIs or mock data. Required fields like votes and optional fields like stats cause frequent issues.
Data Validation Issues:

Backend or mock data often misses required fields, causing type errors and deployment failures.
Optional Fields:

Properties like votes, pros, cons, and stats are inconsistently handled, resulting in crashes and compilation errors.
Schema Misalignment:

The Prisma schema, mock data, and TypeScript definitions don’t always align, leading to recurring bugs.
Goals
Resolve Type Errors:

Fix all TypeScript errors to ensure smooth builds and deployments on Vercel.
Align the Product type, backend schema, and mock data.
Implement Data Validation:

Integrate runtime validation (e.g., using libraries like Zod) to ensure all incoming data aligns with the defined types.
Enhance Codebase Scalability:

Refactor the codebase for long-term maintainability.
Standardize how types and data are handled across the frontend and backend.
Ensure Deployment Stability:

Ensure the application builds and deploys reliably on Vercel.
What I Need From You
Audit the current codebase to identify the root cause of recurring TypeScript errors and build failures.
Refactor the Product type and related data handling to ensure consistency across the codebase.
Standardize the use of optional fields and add runtime validation where necessary.
Provide recommendations or implement a workflow to prevent similar issues in the future.
Ideal Freelancer
Proficient in TypeScript, Next.js, and Vercel deployments.
Experienced in data validation tools like Zod or Yup.
Familiar with Prisma for database integration and type generation.
Able to communicate effectively and work collaboratively on debugging and refactoring tasks.
If you are confident in your ability to resolve this issue and help me achieve the goals of Tier’d, please send me your proposal, including:

Your relevant experience.
How you would approach resolving this issue.
Your expected timeline and budget.
I look forward to working with you to make Tier’d a success!

Note: I have already created the majority of the file, please see it here: https://file.io/8QcjstUZJJ6e
Related categories: PHP JavaScript HTML Node.js Next.js