Skip to content

feat: add Zod schemas, DTOs and typed API route handlers#315

Merged
RUKAYAT-CODER merged 4 commits intorinafcode:mainfrom
Thosine-01:feat/api-zod-schemas-and-dtos
Apr 28, 2026
Merged

feat: add Zod schemas, DTOs and typed API route handlers#315
RUKAYAT-CODER merged 4 commits intorinafcode:mainfrom
Thosine-01:feat/api-zod-schemas-and-dtos

Conversation

@Thosine-01
Copy link
Copy Markdown
Contributor

Summary

Implements typed request/response DTOs and Zod runtime validation for all API routes.

Changes

New files

  • src/types/api/index.ts — barrel export
  • src/types/api/auth.dto.ts — Login/Signup schemas + DTOs
  • src/types/api/courses.dto.ts — CourseListQuery/ById schemas + DTOs
  • src/types/api/notes.dto.ts — Notes CRUD schemas + DTOs
  • src/types/api/bookmarks.dto.ts — Bookmarks CRUD schemas + DTOs
  • src/lib/validation.ts — shared validateBody/validateQuery helpers

Updated files

  • src/app/api/courses/route.ts
  • src/app/api/courses/[id]/route.ts
  • src/app/api/notes/route.ts
  • src/app/api/bookmarks/route.ts
  • src/app/api/auth/login/route.ts
  • src/app/api/auth/signup/route.ts

close #113

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 28, 2026

@Thosine-01 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER
Copy link
Copy Markdown
Contributor

Kindly resolve conflict

@RUKAYAT-CODER RUKAYAT-CODER merged commit 52c8d6c into rinafcode:main Apr 28, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing API Response Types

2 participants