https://github.com/hode2002/image-enhancer
Image processing server with robust logging and cloud integration
https://github.com/hode2002/image-enhancer
aws-ec2 clerk cloudinary docker github-actions nestjs passport prisma sharp supabase swagger typescript
Last synced: about 1 month ago
JSON representation
Image processing server with robust logging and cloud integration
- Host: GitHub
- URL: https://github.com/hode2002/image-enhancer
- Owner: hode2002
- Created: 2025-05-16T13:42:05.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-30T09:57:58.000Z (about 1 year ago)
- Last Synced: 2025-06-06T10:35:25.588Z (12 months ago)
- Topics: aws-ec2, clerk, cloudinary, docker, github-actions, nestjs, passport, prisma, sharp, supabase, swagger, typescript
- Language: TypeScript
- Homepage: https://image.hovande.id.vn
- Size: 465 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
NestJS Image Server
Image processing server with robust logging and cloud integration
## 🚀 Quick Start
```bash
# Start development server
pnpm run start:dev
```
## ✨ Features
| Feature | Description |
|---------|-------------|
| 🖼️ Image Processing | Advanced image management and processing capabilities |
| 🔒 Authentication | Secure auth with Clerk and Google OAuth |
| 📝 Logging | Winston-based logging with file rotation |
| 🐳 Containerization | Docker support for easy deployment |
| 🗄️ Database | PostgreSQL with Prisma ORM |
| 🔄 CI/CD | Automated deployment with GitHub Actions |
| 🚀 Cloud | AWS EC2 deployment support |
| 📚 API Documentation | Interactive Swagger UI documentation |
## ⚙️ Configuration
### Environment Setup
```env
# Application
PORT=3001
ALLOWED_ORIGINS=["http://localhost:3001"]
FRONTEND_URL=http://localhost:3001
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
DIRECT_URL="postgresql://user:password@localhost:5432/dbname"
# Authentication
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
CLERK_PUBLISHABLE_KEY=your_clerk_key
CLERK_SECRET_KEY=your_clerk_secret
# Image Storage
CLOUDINARY_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_cloudinary_key
CLOUDINARY_API_SECRET=your_cloudinary_secret
# File Upload
MAX_FILE_SIZE=5242880
ALLOWED_MIME_TYPES=image/jpeg,image/png,image/gif,image/webp,image/avif
```
## 📚 API Documentation
The API documentation is available through Swagger UI at `/api/docs` when the server is running.
### Swagger UI Features
- Interactive API documentation
- Try-it-out functionality
- Request/response examples
- Bearer token authentication
- Schema validation
- API versioning
## 📝 Logging
The application implements a comprehensive logging system using Winston:
- **Console Output**: Colored, formatted logs
- **File Logs**:
- `logs/error.log`: Error-specific logs
- `logs/combined.log`: All application logs
- **Features**:
- Request/response logging
- Error stack traces
Configure log level via environment:
```env
LOG_LEVEL=debug # Options: error, warn, info, debug, verbose
```
## 🚀 Deployment
### GitHub Actions Setup
Required secrets:
- `DOCKER_USERNAME`
- `DOCKER_TOKEN`
- `EC2_HOST`
- `EC2_USER`
- `EC2_SSH_KEY`
Deploy by pushing to main branch.