08cf927294d10caf2f4c873d7c1418a2dd738893
- Updated User entity to embed MongoDB model and replace uuid.UUID with string for ID fields. - Modified repository methods to accept string IDs instead of uuid.UUID, enhancing compatibility with MongoDB. - Refactored service and handler methods to align with the new ID type, ensuring consistent usage across the user management functionality. - Improved response handling in UserListResponse to directly use string IDs. - Streamlined index creation in the user repository using the MongoDB ORM for better maintainability.
Tender Management System
A comprehensive tender management backend system built with Go, following Clean Architecture principles with Domain-Driven Design (DDD) patterns.
📚 Documentation
All documentation has been organized in the docs/ directory for better structure and maintainability.
Quick Links
- 📖 Main Documentation - Comprehensive project overview and guidelines
- 🔧 Setup Guides - HTTP server and Swagger setup
- 🚀 Implementation Details - Architecture and implementation overview
- 📡 API Examples - API usage examples and endpoints
🚀 Quick Start
-
Setup Environment
# Follow setup guides in docs/setup/ -
Run the Application
make run -
Access API Documentation
- Swagger UI:
http://localhost:8081/swagger/index.html - API Base URL:
http://localhost:8081/api/v1
- Swagger UI:
🏗️ Architecture
This system implements Clean Architecture with:
- Domain Layer: Business entities and core rules
- Service Layer: Business logic and use cases
- Handler Layer: HTTP controllers and request handling
- Repository Layer: Data access implementations
- Infrastructure Layer: External dependencies
📋 Key Features
- Clean Architecture: DDD principles with clear separation of concerns
- MongoDB Integration: Robust data persistence with proper indexing
- Structured Logging: Comprehensive logging with context
- Input Validation: Govalidator integration for request validation
- Error Handling: Consistent error responses and logging
- Time Handling: Unix timestamps throughout the application
- API Documentation: Auto-generated Swagger documentation
🔧 Development
Prerequisites
- Go 1.23+
- MongoDB 4.4+
- Valid MongoDB connection
Project Structure
tm_back/
├── cmd/web/ # Application entry point
├── internal/ # Private application code
│ ├── customer/ # Customer domain
│ └── ... # Other domains
├── pkg/ # Public packages
│ ├── logger/ # Logging utilities
│ ├── mongo/ # MongoDB utilities
│ └── response/ # API response utilities
├── docs/ # 📚 All documentation
└── config.yaml # Configuration file
📞 Support
For detailed documentation, guides, and examples, please visit the docs/ directory.
Version: 1.0.0
Last Updated: $(date)
Description
Languages
Go
99.2%
Shell
0.5%
Makefile
0.2%
Dockerfile
0.1%