Project Reflection

Learning, growth, and decision-making throughout the DonorConnect build.

๐Ÿง—

What Challenged Me Most

Next.js 16 Authentication Architecture

The biggest challenge was implementing session-based authentication with Next.js 16's App Router. The new async params and cookies() APIs required completely rethinking how API routes handle authentication. I had to migrate from usinggetSessionUser() in Server Components torequest.cookies.get('session') in API routes because the cookies() helper doesn't work in route handlers.

Multi-Tenant Data Isolation

Ensuring every database query was properly scoped to the user's organization was tedious but critical. I had to audit every API endpoint to verify organizationId filtering was applied, and that users couldn't access data from other organizations through parameter manipulation.

Prisma 7 with Neon PostgreSQL

Configuring Prisma 7 with the new driver adapters for Neon's serverless PostgreSQL required understanding the new configuration format in prisma.config.js and how the custom output path in prisma/generated/ works. Connection pooling and SSL settings needed careful tuning for both local development and production.

Making Workflows Actually Work

The workflow automation feature went through several iterations. Initially I had ambitious plans for complex triggers and conditional logic, but I had to scope down to practical step types (email, task creation, wait periods) that could actually be implemented and tested within the timeline.

๐Ÿ”„

What I Would Change or Add

If I Had More Time

  • โ†’Real email sending โ€“ Integrate SendGrid/Postmark for actual workflow emails
  • โ†’Advanced segmentation โ€“ More complex rule combinations with AND/OR logic
  • โ†’Deeper analytics โ€“ Charts, trends, year-over-year comparisons
  • โ†’Payment processing โ€“ Stripe integration for real donation handling
  • โ†’CRM imports โ€“ CSV/Excel upload and Salesforce sync
  • โ†’Mobile responsiveness โ€“ Better tablet and phone experience

What I Would Do Differently

  • โ†’Start with TypeScript โ€“ Would have caught many bugs earlier
  • โ†’Write tests first โ€“ TDD would have made refactoring safer
  • โ†’Simpler auth initially โ€“ Could have used NextAuth.js to start faster
  • โ†’Better error boundaries โ€“ More graceful error handling throughout
  • โ†’Component library earlier โ€“ Should have built shared components from day one
๐ŸŽ“

What I Learned About Building Real Products

๐Ÿ—๏ธ Architecture Matters

The multi-tenant architecture decision made early on (organizationId on every model) proved essential. It would have been nearly impossible to retrofit data isolation later. Taking time to design the schema properly saved countless hours of refactoring.

๐Ÿ” Security Is Non-Negotiable

Every API endpoint needs authentication and authorization checks. I learned to never trust client-side data and always validate on the server. HTTP-only cookies are more secure than localStorage for session management.

โšก Scope Ruthlessly

I started with grand plans for workflow automation, AI coaching, and advanced analytics. Reality forced me to cut features and focus on what users actually need first: basic CRUD, clear data display, and simple automation. Ship something usable, then iterate.

๐Ÿงช Seed Data Is Gold

The seed script with 75 donors and 200+ donations was invaluable. Realistic test data exposed edge cases, made the UI feel real, and helped stakeholders understand the product. Worth every minute invested in creating it.

๐Ÿ“š Technical Skills Gained

Next.js 16 App RouterReact Server ComponentsPrisma 7 ORMPostgreSQLSession-based AuthMulti-tenancyOpenAI APIZod ValidationReact Hook FormTailwind CSSshadcn/uiVitest Testing
๐Ÿค–

How AI Helped (and Where It Didn't)

โœ… Where AI Accelerated Development

  • โ€ขCode scaffolding โ€“ Generating boilerplate for API routes, components, and forms
  • โ€ขDebugging โ€“ Explaining error messages and suggesting fixes
  • โ€ขDocumentation โ€“ Writing README, policy pages, and inline comments
  • โ€ขRefactoring โ€“ Improving code structure and following best practices
  • โ€ขSeed data โ€“ Creating realistic nonprofit donor profiles and donations
  • โ€ขCSS/Styling โ€“ Tailwind class suggestions and responsive design

โŒ Where AI Fell Short

  • โ€ขNext.js 16 specifics โ€“ Often suggested outdated patterns from older versions
  • โ€ขPrisma 7 syntax โ€“ Many suggestions used Prisma 5/6 API that no longer works
  • โ€ขComplex auth flows โ€“ Had to manually trace session handling issues
  • โ€ขBusiness logic decisions โ€“ AI can't understand nonprofit context deeply
  • โ€ขSecurity review โ€“ Still needed manual auditing of auth and data access
  • โ€ขIntegration testing โ€“ AI-generated tests often missed edge cases

๐Ÿ’ญ Key Insight

AI is a powerful productivity multiplier but not a replacement for understanding. The biggest gains came when I used AI to accelerate tasks I already understood conceptually. When I relied on AI for unfamiliar territory (like Next.js 16's new APIs), I often had to spend extra time debugging incorrect suggestions. AI + human judgment is the winning combination.

๐ŸŽฏ Final Thoughts

Building DonorConnect taught me that real-world software development is about making trade-offs. You can't have everything โ€“ you have to choose what matters most for users right now, ship it, and improve iteratively. The nonprofit sector needs accessible tools, and I'm proud to have built something that could genuinely help small organizations manage donor relationships better. This project gave me confidence that I can design, build, and deploy a complete full-stack application from scratch, and that's a skill that will serve me well in any future role.