"# HALSVAR - Jewellery Generator
A full-stack web application that transforms jewelry design concepts into stunning visual representations using AI-powered image generation. HALSVAR provides three core services: text-to-image generation, sketch-to-reality rendering, and monochrome-to-color conversion.
-
Text to Visuals
- Convert descriptive text into jewelry design images
- Multi-language support with auto-translation (Hindi, French, Spanish, Chinese, German, English, Telugu, Japanese)
- Voice input with speech recognition
- Real-time image generation
-
Sketches to Reality
- Transform hand-drawn sketches into professional-grade jewelry renders
- Upload sketch images and receive fully rendered outputs
- High-resolution image processing (1280x1280)
-
Monochrome to Multicolor
- Colorize black and white jewelry images
- Advanced colorization algorithms
- Preserve design details while adding vibrant colors
- Traditional username/password registration and login
- Google OAuth integration
- JWT-based session management
- Password reset functionality
- reCAPTCHA protection
- MongoDB database with GridFS for image storage
- User-specific design history
- Persistent storage of input/output pairs
- Secure cookie-based authentication
- Responsive React-based frontend
- Bootstrap styling with custom CSS
- Interactive dashboard with smooth scrolling
- Profile management
- Contact form
- React 18.3.1 - UI framework
- React Router 6.27.0 - Navigation
- Bootstrap 5.3.3 - Styling
- Axios - HTTP client
- FontAwesome - Icons
- Three.js - 3D graphics (optional features)
- Node.js with Express 4.21.1
- MongoDB with Mongoose 8.8.0
- GridFS - Large file storage
- JWT - Authentication
- bcrypt - Password hashing
- Multer - File uploads
- Google OAuth2 - Social login
- AI image generation APIs (ports 5001, 8000, 8001)
- MyMemory Translation API
- Google reCAPTCHA
- Web Speech API
βββ src/
β βββ App.js # Main app component with routing
β βββ Main.js # Alternative main component
β βββ login.js # Login/registration page
β βββ dashboard.js # User dashboard
β βββ text.js # Text-to-image service
β βββ sketch.js # Sketch-to-reality service
β βββ black.js # Monochrome-to-color service
β βββ contactus.js # Contact form
β βββ components/ # Reusable components
βββ models/
β βββ User.js # User schema
βββ public/ # Static assets and Python scripts
βββ server.js # Main authentication server (port 5000)
βββ servertext.js # Text-to-image backend (port 1234)
βββ serversketch.js # Sketch service backend (port 4567)
βββ serverblack.js # Colorization backend (port 7654)
βββ package.json # Dependencies
- Clone the repository:
git clone <repository-url>
cd halsvar- Install dependencies:
npm install-
Set up MongoDB:
- Create a MongoDB Atlas account or use local MongoDB
- Update the connection string in server files
-
Configure environment variables:
- Google OAuth Client ID
- reCAPTCHA keys
- JWT secret key
- Frontend (port 3000):
npm start- Authentication Server (port 5000):
node server.js- Text-to-Image Service (port 1234):
node servertext.js- Sketch Service (port 4567):
node serversketch.js- Colorization Service (port 7654):
node serverblack.js- AI Generation Services:
- Port 5001: Text-to-image generation
- Port 8000: Sketch rendering
- Port 8001: Image colorization
POST /register- User registrationPOST /login- User login with reCAPTCHAPOST /google-login- Google OAuth loginPOST /forgot-password- Password recoveryPATCH /reset-password- Password resetGET /protected-route- JWT-protected endpoint
POST /upload-text-and-image- Save text prompt and generated image
POST /upload-sketches- Save input sketch and rendered output
POST /upload-images- Save B&W input and colorized outputGET /get-image/:id- Retrieve image by GridFS ID
The text-to-image service supports voice input in multiple languages with automatic translation to English for processing.
All images are stored in MongoDB using GridFS, allowing efficient storage and retrieval of large files.
Personalized dashboard showing:
- User profile with first letter avatar
- Quick access to all three services
- Smooth scroll navigation
- Logout functionality
- Password hashing with bcrypt
- JWT token authentication
- HTTP-only cookies
- reCAPTCHA verification
- CORS protection
- Chrome (recommended for speech recognition)
- Firefox
- Safari
- Edge
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a pull request
Β© HALSVAR. All Rights Reserved.
- Phone: +1 234 567 890
- Email: hi@fashion.com
Built by the HALSVAR team with modern web technologies and AI integration."