Migrating out of tRPC to use server actions instead
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
# Issue: Migrating out of tRPC to use server actions instead
**Date**: 2025-07-07
**Status**: Open
**Tags**: #refactor #tech #architecture #api #medium
**Branch**: issue-[pending]-migrate-trpc-server-actions
## Problem Statement
The current implementation uses tRPC for type-safe API communication between client and server. We want to migrate to Next.js server actions to simplify the architecture, reduce bundle size, and leverage Next.js native patterns for better performance and developer experience.
## User Impact
- Developers experience complexity when adding new API endpoints
- Additional abstraction layer increases cognitive load
- Bundle size includes tRPC client libraries
- Type safety can be achieved more directly with server actions
## Benefits of Migration
1. Reduced bundle size (no tRPC client needed)
2. Simpler mental model (direct server function calls)
3. Better integration with Next.js App Router
4. Improved performance with automatic request deduplication
5. Simplified error handling and data validation
## Migration Scope
- All tRPC procedures need to be converted to server actions
- Client-side hooks need to be updated to use server actions
- Type safety must be maintained throughout
- Error handling patterns need to be adapted
## Environment
- Framework: Next.js 15 with App Router
- Current: tRPC with type-safe procedures
- Target: Native Next.js server actions
## Related Issues
- Architecture improvements
- Performance optimizations
- Developer experience enhancements
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by inventorying the existing tRPC procedures and client-side hooks, then read the Next.js 15 App Router server actions guidance. The migration is done when all procedures and hooks use server actions while preserving type safety, error handling, and the stated bundle-size and performance goals.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, typescript
- Domain
- api, full-stack
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100