- Go 1.21+
- Docker
- Task (Task runner)
- Protocol Buffers compiler
-
Clone Repository
git clone https://github.com/yourusername/upload-store-process.git cd upload-store-process -
Install Dependencies
task deps
-
Generate Proto Files
task proto:generate
-
FileUploadService
- Located in:
services/file-upload-service - Responsible for user authentication and upload coordination
- Located in:
-
FileProcessorService
- Located in:
services/file-processor-service - Handles file processing and metadata extraction
- Located in:
-
FileStorageService
- Located in:
services/file-storage-service - Manages file compression and storage
- Located in:
# Navigate to specific service directory
cd services/file-upload-service
# or
cd services/file-processor-service
# or
cd services/file-storage-serviceproto/fileupload/v1/upload.protoproto/fileprocessor/v1/processor.protoproto/filestorage/v1/storage.protoproto/shared/v1/shared.proto
# FileUploadService
task file-upload-service:dev
# FileProcessorService
task file-processor-service:dev
# FileStorageService
task file-storage-service:dev# Run all services
task services:up
# Run specific service
task service:backend
task service:storage
task service:processor# Run all unit tests
task test
# Test specific service
task test:backend
task test:storage
task test:processor# Run integration tests
task test:integration- FileUploadService: Authentication, token generation
- FileProcessorService: File transformation tests
- FileStorageService: Compression, storage mechanisms
# Run golangci-lint
task lint# Format all Go files
task fmt- Use structured logging
- Minimal, informative log levels
- Focus on key system events
- Delve debugger
- Go's built-in race detector
# Enable verbose logging for specific service
LOG_LEVEL=debug task file-upload-service:dev
LOG_LEVEL=debug task file-processor-service:dev
LOG_LEVEL=debug task file-storage-service:devmain: Stable releasedevelop: Active development- Feature branches:
feature/description
- Choose service directory
- Implement changes
- Write tests
- Run service-specific tests
- Submit pull request
- Clear, readable code
- Proper error handling
- Comprehensive tests
- Documentation updates
- Performance considerations
- Dependency conflicts
- Proto generation errors
- Docker configuration problems
- Check documentation
- Review error logs
- Open GitHub issues
# CPU profiling
go test -cpuprofile=cpu.prof
go tool pprof cpu.prof
# Memory profiling
go test -memprofile=mem.prof
go tool pprof mem.prof- Keep functions small and focused
- Use interfaces for flexibility
- Prioritize readability
- Write comprehensive tests
- Document non-obvious code
- Go official documentation
- gRPC guides
- Microservices design patterns
- Distributed systems concepts
- Declarative task descriptions
- Cross-platform compatibility
- Minimal configuration overhead
- Composable and reusable tasks
version: '3'
tasks:
default:
desc: "Default task"
cmds:
- echo "Welcome to Upload Store Process"
init:
desc: "Initialize project dependencies"
cmds:
- go mod download
- go mod tidy
proto:generate:
desc: "Generate protobuf files"
cmds:
- protoc --go_out=. --go_opt=paths=source_relative ...- Create feature branch
- Run
task init - Implement changes
- Run
task test - Run
task lint - Submit pull request
- Ensure Task is installed correctly
- Check Taskfile syntax
- Verify Go and protobuf installations
# Task help
task --help
# Specific task help
task --help service:backend- Keep tasks small and focused
- Use task dependencies
- Leverage task variables
- Write self-documenting tasks
- Maintain cross-platform compatibility
- Task Documentation
- Go module management
- Protobuf code generation
- Microservices design patterns