This is a well-structured Go skeleton project that follows Clean Architecture principles. Coming from Rails, you'll find some familiar patterns but with Go's unique approach.
Strong Points:
- ✅ Clean separation of concerns (Handler → Usecase → Repository)
- ✅ Dependency injection pattern (similar to Rails services)
- ✅ JWT authentication with RS512 (like Devise but more explicit)
- ✅ Database migrations (like Rails migrations)
- ✅ Unit testing with mocks (like RSpec with doubles)
- ✅ API documentation with Swagger
- ✅ Background jobs via RabbitMQ (like Sidekiq)
- ✅ Proper error handling and logging
Rails vs Go Comparison:
- Handlers = Rails Controllers
- Usecases = Rails Service Objects/Interactors
- Repositories = Rails ActiveRecord Models (but more explicit)
- Entities = Rails Models (just data structures, no ORM magic)
- Fiber = Rails/Sinatra (fast HTTP framework)
Based on your Rails background, here are practical scenarios ranked by learning value:
Why: Extends existing patterns, teaches Go relationships
What to build:
- Posts CRUD (title, body, author)
- Comments (belongs to posts)
- Categories/Tags (many-to-many)
- Markdown support for posts
What you'll learn:
- Go struct composition
- GORM associations (has_many, belongs_to)
- Nested JSON responses
- Filtering and pagination
Why: Real-world complexity, teaches transactions
What to build:
- Products with variants (size, color)
- Inventory tracking
- Shopping cart (session-based)
- Order creation with transactions
What you'll learn:
- Database transactions
- Concurrent updates (Go's strength)
- Redis caching for cart
- Complex queries with GORM
Why: Teaches Go's concurrency and streaming
What to build:
- Image/document upload
- Thumbnail generation (goroutines!)
- S3/local storage
- Progress tracking
What you'll learn:
- Go channels and goroutines
- File I/O patterns
- Multipart form handling
- Background processing
Why: Utilizes RabbitMQ worker architecture
What to build:
- Multi-channel notifications (email, SMS, push)
- Template system
- Queue-based delivery
- Retry logic
What you'll learn:
- Message queue patterns
- Worker processes
- Error handling strategies
- Go's interface power
Why: WebSockets, concurrency, real-time
What to build:
- Chat rooms
- Direct messages
- Online status
- Message history
What you'll learn:
- WebSocket with Fiber
- Goroutines for real-time
- Redis pub/sub
- Connection management
For your first learning project, I suggest:
Build on the existing todo-list by adding:
- Teams/Workspaces (users can create teams)
- Shared todos (assign todos to team members)
- Comments on todos
- File attachments
- Activity feed (using RabbitMQ)
Why this is perfect:
- 70% of the code already exists
- You'll modify existing patterns (learn by doing)
- Covers relationships, uploads, and queues
- Small enough to complete, big enough to learn
Time estimate: 2-3 days for a Rails dev learning Go
| Concept | Rails | Go |
|---|---|---|
| Type Safety | Dynamic | Strict static typing |
| Error Handling | Exceptions | Explicit err returns |
| Concurrency | Threads/Fibers | Goroutines (way better!) |
| ORM | ActiveRecord (magical) | GORM (explicit) |
| Dependencies | Gemfile | go.mod |
| Nil checks | present? |
if obj != nil everywhere |
| Testing | RSpec DSL | Table-driven tests |