Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akhand-pratap-tiwari/product-management-system
https://github.com/akhand-pratap-tiwari/product-management-system
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/akhand-pratap-tiwari/product-management-system
- Owner: Akhand-Pratap-Tiwari
- Created: 2024-12-16T05:31:45.000Z (20 days ago)
- Default Branch: main
- Last Pushed: 2024-12-16T07:31:38.000Z (20 days ago)
- Last Synced: 2024-12-16T08:24:47.255Z (20 days ago)
- Language: Go
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Product Management System
## Overview
This is a scalable backend system for product management, built with Go, featuring:
- RESTful API for product operations
- Asynchronous image processing
- Redis caching
- PostgreSQL database
- RabbitMQ for message queuing
- Structured logging## System Architecture
The system follows a modular architecture with clear separation of concerns:
- **API Layer**: Handles HTTP requests and routing
- **Service Layer**: Implements business logic
- **Repository Layer**: Manages database interactions
- **Caching Layer**: Uses Redis for performance optimization
- **Message Queue**: RabbitMQ for asynchronous image processing## Prerequisites
- Go 1.20+
- PostgreSQL
- Redis
- RabbitMQ
- AWS S3 (for image storage)## Configuration
Create a `config.yaml` file with the following structure:
```yaml
database:
host: localhost
port: 5432
user: youruser
password: yourpassword
dbname: productdbredis:
host: localhost
port: 6379rabbitmq:
host: localhost
port: 5672server:
host: localhost
port: 8080aws:
s3bucket: your-bucket-name
region: us-west-2
```## Setup and Installation
1. Clone the repository
2. Install dependencies:
```bash
go mod tidy
```
3. Run migrations:
```bash
go run cmd/migrate/main.go
```
4. Start the server:
```bash
go run cmd/api/main.go
```## API Endpoints
- `POST /api/v1/products`: Create a new product
- `GET /api/v1/products/:id`: Retrieve a specific product
- `GET /api/v1/products`: List products with optional filtering## Testing
Run tests with:
```bash
go test ./...
```## Key Features
- Asynchronous image processing
- Distributed caching
- Comprehensive error handling
- Structured logging
- High scalability design## Performance Considerations
- Redis caching for frequently accessed products
- Asynchronous image processing via message queue
- Efficient database queries with filtering## Potential Improvements
- Implement more advanced caching strategies
- Add more comprehensive error handling
- Implement circuit breakers for external services
- Add more granular logging