9119e2383e
- Introduced a new `config.yaml` file for managing server, database, cache, queue, AI, scraping, logging, and rate limiting configurations. - Updated `docker-compose.yml` to reflect the new server port (8081) and adjusted health check endpoints accordingly. - Modified `Dockerfile` to expose the new server port. - Updated `README.md` to reflect changes in server configuration and added documentation for the new configuration structure. - Added test scripts for server and Swagger documentation testing. - Refactored customer domain structure to align with new configuration settings and improve maintainability.
79 lines
2.7 KiB
Markdown
79 lines
2.7 KiB
Markdown
# 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/`](./docs/) directory for better structure and maintainability.
|
|
|
|
### Quick Links
|
|
- **[📖 Main Documentation](./docs/README.md)** - Comprehensive project overview and guidelines
|
|
- **[🔧 Setup Guides](./docs/setup/)** - HTTP server and Swagger setup
|
|
- **[🚀 Implementation Details](./docs/implementation/)** - Architecture and implementation overview
|
|
- **[📡 API Examples](./docs/examples/)** - API usage examples and endpoints
|
|
|
|
## 🚀 Quick Start
|
|
|
|
1. **Setup Environment**
|
|
```bash
|
|
# Follow setup guides in docs/setup/
|
|
```
|
|
|
|
2. **Run the Application**
|
|
```bash
|
|
make run
|
|
```
|
|
|
|
3. **Access API Documentation**
|
|
- Swagger UI: `http://localhost:8081/swagger/index.html`
|
|
- API Base URL: `http://localhost:8081/api/v1`
|
|
|
|
## 🏗️ 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/`](./docs/) directory.
|
|
|
|
---
|
|
|
|
**Version**: 1.0.0
|
|
**Last Updated**: $(date) |