- Add comprehensive REST API at /api/v1 with modular structure - Implement authentication endpoints (register, login, logout, me) - Add converter listing and format discovery endpoints - Create job management and file download endpoints - Add health check endpoint for monitoring - Set up CORS support for browser-based API clients - Create API middleware for JWT authentication - Add environment variables for API configuration - Include comprehensive API documentation and test script Infrastructure: - Enhanced CI/CD workflow for custom Docker registries - Docker Compose setup with dev, prod, and monitoring profiles - Claude.ai integration files for development workflow - Environment-based configuration with .env.development Known limitations: - JWT authentication context needs fixing (using ALLOW_UNAUTHENTICATED=true) - Swagger UI temporarily disabled due to composition error - File upload endpoint needs multipart/form-data support The API code is isolated in src/api/ directory to maintain separation from the existing codebase, making it easy to maintain or contribute back.
1.2 KiB
1.2 KiB
Build and Test Docker Image
Please build and test the Docker image with these steps:
-
Build the Docker image:
docker build -t convertx-openapi:local . -
Verify the build:
- Check image size:
docker images convertx-openapi:local - Inspect layers:
docker history convertx-openapi:local
- Check image size:
-
Run container locally:
docker run -d \ --name convertx-test \ -p 3000:3000 \ -v $(pwd)/data:/app/data \ -e JWT_SECRET=test-secret \ -e NODE_ENV=production \ convertx-openapi:local -
Test the application:
- Check logs:
docker logs convertx-test - Test health:
curl http://localhost:3000 - Verify converters load properly
- Check logs:
-
Multi-platform build (if needed):
docker buildx build \ --platform linux/amd64,linux/arm64 \ -t convertx-openapi:local \ . -
Push to custom registry (if configured):
docker tag convertx-openapi:local ${DOCKER_REGISTRY}/convertx:latest docker push ${DOCKER_REGISTRY}/convertx:latest -
Cleanup:
docker stop convertx-test docker rm convertx-test
Please execute these steps and report any issues.