A base AI image service for creating AI image applications, built as a Blocklet on the ArcBlock platform. Powered by the AIGNE framework and integrated with AIGNE Hub services for advanced AI capabilities.
ImageSmith is a comprehensive AI-powered image processing service that provides a foundation for building various AI image applications. Built on the AIGNE framework, it combines a React frontend with a Node.js backend, leveraging AIGNE Hub services and AI runtime capabilities for advanced image generation, restoration, and manipulation.
- AIGNE Framework Integration: Built on the powerful AIGNE framework for AI image processing
- AIGNE Hub Services: Connected to AIGNE Hub for access to advanced AI models and capabilities
- AI Image Processing: Advanced image generation and restoration capabilities
- Credit-based Billing: Integrated payment system using Blocklet Payment Kit
- User Authentication: Secure login with ArcBlock DID Connect
- File Upload: Robust image upload functionality
- Admin Dashboard: Management interface for projects and settings
- Responsive UI: Modern Material-UI based interface
- TypeScript Support: Full TypeScript implementation for better code quality
Frontend (React + Material-UI)
↓
Backend API (Express.js)
↓
AIGNE Framework & Hub Services
↓
AI Runtime (@blocklet/ai-runtime)
↓
Database (SQLite/MariaDB)
- Node.js (latest LTS version)
- Blocklet CLI (
npm install -g @blocklet/cli) - ArcBlock Developer account
# Install dependencies
npm install
# Start development server
blocklet dev
# or
npm run start
# Access the application
# Frontend: http://localhost:3000
# API: http://localhost:3001# Lint and check code quality
npm run lint
# Fix linting issues
npm run lint:fix
# Build for production
npm run bundle
# Deploy to local Blocklet server
npm run deploy
# Upload to Blocklet Store
npm run upload├── src/ # React frontend application
├── api/ # Express.js backend server
│ ├── src/ # API source code
│ ├── hooks/ # Deployment hooks
│ └── dist/ # Compiled API code
├── public/ # Static assets
├── scripts/ # Build and utility scripts
├── docs/ # Documentation
├── screenshots/ # Application screenshots
├── .blocklet/ # Generated bundle directory
├── blocklet.yml # Blocklet configuration
└── package.json # Project dependencies
- React 19: Latest React with modern features
- Material-UI: Comprehensive UI component library
- TypeScript: Type-safe development
- Vite: Fast build tool and dev server
- React Router: Client-side routing
- Node.js: JavaScript runtime
- Express.js: Web application framework
- TypeScript: Type-safe server development
- Sequelize: ORM for database operations
- SQLite/MariaDB: Database options
- AIGNE Framework: Core AI framework for image processing and generation
- @aigne/aigne-hub: AIGNE Hub services integration for advanced AI capabilities
- @aigne/core: AIGNE core runtime and utilities
- @blocklet/ai-runtime: AI processing capabilities
- @blocklet/aigne-sdk: AIGNE AI SDK integration
- @arcblock/did-connect: Decentralized identity authentication
- @blocklet/payment-js: Credit-based payment system
Create .env.local file:
# Database
DATABASE_URL=sqlite://api/db/app.db
# AI Configuration
AI_RUNTIME_ENDPOINT=your-ai-endpoint
AI_API_KEY=your-api-key
# Payment
PAYMENT_ENDPOINT=your-payment-endpointKey settings in blocklet.yml:
- Main Entry:
api/dist/index.js - Web Interface: Port-based HTTP service
- Navigation: Admin dashboard and project management
- Requirements: Blocklet Server >= 1.16.28
The service provides comprehensive APIs for:
- Image processing and AI operations
- User authentication and management
- Credit and payment handling
- Project and asset management
See AI_API.md and PAYMENT_API.md for detailed API documentation.
- Follow TypeScript best practices
- Use ESLint and Prettier for code formatting
- Pre-commit hooks ensure code quality
- Maintain test coverage for critical functions
- Located in
api/src/store/migrations/ - Use Sequelize migration system
- Run migrations before deployment
- Feature branch workflow
- Pre-commit hooks run linting and formatting
- Semantic versioning for releases
# Bump version (patch/minor/major)
npm run bump-version
# Update dependencies
npm run update:depsThe application includes an admin dashboard accessible at /admin with:
- Dashboard: Overview and analytics
- Projects: Project management interface
- Settings: Configuration management
Access requires owner or admin privileges.
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
Licensed under the terms specified in the LICENSE file.
For issues and questions:
- Check the documentation in the
docs/directory - Review API documentation files
- Contact the development team