A full-stack web application that converts textual descriptions into images using AI technology. The application features user authentication, credit system, and secure payment integration.
- Framework: React.js (v18)
- Build Tool: Vite
- Routing: React Router DOM (v6)
- Styling: TailwindCSS
- Animation: Framer Motion
- HTTP Client: Axios
- Notifications: React Toastify
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB with Mongoose ODM
- Authentication: JSON Web Tokens (JWT) with bcrypt
- Payment Integration:
- Razorpay
- Stripe
- Environment Variables: dotenv
- Development: Nodemon
├── client/ # Frontend application
│ ├── public/ # Static files
│ ├── src/
│ │ ├── assets/ # Media files and assets
│ │ ├── components/ # Reusable React components
│ │ │ ├── Description.jsx
│ │ │ ├── Footer.jsx
│ │ │ ├── GenerateBtn.jsx
│ │ │ ├── Header.jsx
│ │ │ ├── Login.jsx
│ │ │ ├── Navbar.jsx
│ │ │ ├── Steps.jsx
│ │ │ └── Testimonials.jsx
│ │ ├── context/ # React Context for state management
│ │ ├── lib/ # Utility functions and helpers
│ │ ├── pages/ # Application pages/routes
│ │ │ ├── BuyCredit.jsx
│ │ │ ├── Home.jsx
│ │ │ ├── Result.jsx
│ │ │ └── Verify.jsx
│ │ ├── App.jsx # Main application component
│ │ └── main.jsx # Application entry point
│ └── package.json
│
└── server/ # Backend application
├── configs/ # Configuration files
│ └── mongodb.js # Database configuration
├── controllers/ # Route controllers
│ ├── imageController.js
│ └── UserController.js
├── middlewares/ # Custom middleware
│ └── auth.js # Authentication middleware
├── models/ # MongoDB models
│ ├── transactionModel.js
│ └── userModel.js
├── routes/ # API routes
│ ├── imageRoutes.js
│ └── userRoutes.js
├── server.js # Server entry point
└── package.json
-
User Authentication
- Login/Register functionality
- JWT-based authentication
- Secure password hashing
-
Image Generation
- Text to image conversion
- Result display and management
-
Credit System
- Credit-based usage
- Credit purchase functionality
-
Payment Integration
- Secure payment processing
- Multiple payment gateway support (Razorpay, Stripe)
- Node.js (v14 or higher)
- MongoDB
- NPM or Yarn
- Clone the repository
git clone https://github.com/SGNayak12/Text_To_Image-Converter.git
cd Text_To_Image-Converter- Install frontend dependencies
cd client
npm install- Install backend dependencies
cd ../server
npm install-
Set up environment variables Create
.envfiles in both client and server directories with necessary configurations. -
Start the development servers
Frontend:
cd client
npm run devBackend:
cd server
npm run serverwelcome contributions to improve the Text to Image Converter! Here's how you can help:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Write clean, maintainable code
- Follow existing code style and conventions
- Include comments where necessary
- Update documentation as needed
- Test your changes thoroughly