Migrate Azure Functions to NextJS Server Actions following architecture standards#2
Merged
Merged
Conversation
… (4), Connects (3) Co-authored-by: mlynam <2816612+mlynam@users.noreply.github.com>
Co-authored-by: mlynam <2816612+mlynam@users.noreply.github.com>
…use crypto.randomUUID()
Co-authored-by: mlynam <2816612+mlynam@users.noreply.github.com>
- Add missing repository methods (upsertConnect, getScoringDocument, etc.) - Create ItemsRepository for deprecated items container - Fix all server actions to use repository methods instead of getContainer() - Add @azure/storage-blob dependency for upload functions - Fix lint warnings in idGenerator and BaseRepository - All type checks and lints now pass successfully Co-authored-by: mlynam <2816612+mlynam@users.noreply.github.com>
Complete documentation of Azure Functions to Server Actions migration with all metrics, benefits, and next steps. Co-authored-by: mlynam <2816612+mlynam@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor Azure functions into server actions
Migrate Azure Functions to NextJS Server Actions following architecture standards
Feb 4, 2026
mlynam
approved these changes
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactors 47 Azure Functions into NextJS App Router server actions following the Netsurit architecture guidelines and existing migration guide. Organizes functions into type-based service domains with proper authentication, error handling, and database integration.
Service Architecture
10 domains, 47 server actions:
users/(10) - Profile management, team assignments, file uploadsteams/(9) - Metrics, meetings, coach managementweeks/(6) - Current/past weeks, rollover, archivingprompts/(5) - AI prompt management and historydreams/(4) - Dream book, year vision, imagesitems/(4) - Deprecated item CRUD operationsscoring/(3) - Performance scoring across yearsconnects/(3) - Connection record managementai/(2) - Image/vision generation stubs (require OpenAI integration)admin/(2) - Coaching alerts, health checksEach domain has barrel exports for clean imports:
import { getUserData } from '@/services/users'Database Layer
Extended repositories with 15+ missing methods:
ConnectsRepository:upsertConnect()ScoringRepository:getScoringDocument(userId, year)TeamsRepository:getTeamRelationships(),createTeam(),updateTeam()UserRepository:getAllUsers(),getUsersByIds(),updateUserProfile()DreamsRepository:getDreamsDocuments()ItemsRepository: New repository for deprecated containerAuthentication
Three auth wrapper patterns:
Response Pattern
Consistent
ActionResultacross all actions:Implementation Notes
'use server'directive, JSDoc, auth check, error handlinganytypes except for legacy dynamic propertiesgenerateImage,generateVision) are stubs awaiting OpenAI integration@azure/storage-blobdependency for upload functionsNext Steps
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.