Meeting My Talented Developer Friends

Oct 5, 2024

The Game-Changing Meeting

I met a group of developers who completely changed my perspective on software development. They were using technologies and patterns I'd never heard of.

When they mentioned "Next.js 14 with App Router, microservices, clean architecture," I realized I was way behind.

Learning Next.js Before React

The Unconventional Path

Most people learn React first. My friends threw me straight into Next.js:

  • App Router architecture
  • Server Components vs Client Components
  • Server Actions for forms
  • Streaming with Suspense
// My first Next.js component
async function UserPosts({ userId }: { userId: string }) {
  const posts = await fetch(`/api/posts/${userId}`);
  
  return (
    <div>
      {posts.map(post => (
        <PostCard key={post.id} post={post} />
      ))}
    </div>
  );
}

export default function ProfilePage({ params }) {
  return (
    <div>
      <ProfileHeader userId={params.id} />
      <Suspense fallback={<Loading />}>
        <UserPosts userId={params.id} />
      </Suspense>
    </div>
  );
}

Learning Next.js first was brilliant - built-in optimizations taught me good practices from day one.

Microservices Architecture

From Monolith to Microservices

They showed me how to break applications into smaller services:

Before: Single App
┌─────────────────┐
  Users, Posts,  
  Auth all in    
  one app        
└─────────────────┘

After: Microservices
┌─────────┐ ┌─────────┐ ┌─────────┐
  User      Post      Auth   
 Service   Service   Service 
└─────────┘ └─────────┘ └─────────┘

Docker Implementation

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
CMD ["npm", "run", "dev"]

Clean Architecture Patterns

Layered Structure

They taught me proper separation of concerns:

// Domain Layer
export interface User {
  id: string;
  email: string;
}

// Application Layer  
export class CreateUserUseCase {
  constructor(private userRepo: UserRepository) {}
  
  async execute(email: string): Promise<User> {
    const user = new User(email);
    return await this.userRepo.save(user);
  }
}

// Infrastructure Layer
export class PostgresUserRepository implements UserRepository {
  async save(user: User): Promise<User> {
    // Database implementation
  }
}

What I Learned

Technologies Mastered

  • Next.js 14 with TypeScript
  • Docker containerization
  • Microservices architecture
  • Clean Architecture patterns
  • Testing with modern tools

Key Principles

  • Quality over speed mindset
  • Architecture first approach
  • Continuous learning habit
  • Clean code practices

The Growth Impact

Before vs After (6 months)

Before:

  • Basic CRUD apps
  • Monolithic thinking
  • No testing culture

After:

  • Full-stack architecture understanding
  • Microservices design patterns
  • Clean code principles
  • Professional development workflows

Key Takeaways

  1. Surround yourself with smart people
  2. Don't fear asking questions
  3. Learn by building projects
  4. Share knowledge with others

Meeting these talented developers was like finding a cheat code for my career. They taught me to think like a software architect, not just a coder.

Huynh Thanh Loc