Transform your ideas into stunning visuals with AI-powered image generation!
A full-stack application built with Next.js 15, React 19, Node.js, Express, and TypeScript that allows users to generate AI images from text prompts π¨ with flexible credit-based plans. π
-
π Authentication:
β¨ SignUp,
π Login,
π€ User Profile Management. -
π³ Payment Integration:
π° Credit-based system,
πΈ Razor Pay integration,
π Free credits for new users. -
πΌοΈ Image Generation:
π€ AI-powered image creation from text prompts,
β¬οΈ Image downloading,
π Multiple style options. -
π¨ User Experience:
π Fully responsive design,
β‘ Optimized performance (99/100 Lighthouse score),
π Fast image generation and delivery.
Built with the tools and technologies:
- πOverview
- πΈ Screenshots
- πΎ Features
- π Performance
- π Project Structure
- π Getting Started
- π Project Roadmap
- π° Contributing
- π License
- π About the Author
- π Acknowledgments
Next GenArt is a cutting-edge AI-powered image generation platform that transforms text prompts into stunning visuals. Built with modern technologies like Next.js 15, React 19, and TypeScript, it offers a seamless user experience with a credit-based system for generating images. The application integrates Razor Pay for secure transactions and features a highly optimized frontend with a perfect Lighthouse performance score.
![]() |
![]() |
Home Page | Image Generation |
![]() |
![]() |
Results Page | Credit Purchase |
Feature | Summary | |
---|---|---|
βοΈ | Architecture |
|
π³ | Credit System |
|
πΌοΈ | Image Generation |
|
π | Authentication |
|
π¨ | User Experience |
|
β‘οΈ | Performance |
|
Next GenArt has achieved an exceptional Lighthouse performance score of 99/100 through several optimization techniques:
- Initial Score: 51/100
- Image Optimization: 71/100
- Implemented next/image with proper height, width
- Added lazy loading and priority image properties
- Font Optimization: 77/100
- Used next/font/local for downloaded fonts
- Preloaded critical fonts
- Script Optimization: 85/100
- Lazy loading with Script tag for non-critical components
- Deferred loading of third-party scripts
- CLS Improvements: 99/100
- Avoided conditional rendering based on state
- Used Tailwind CSS classes (hidden/flex/block) for toggling visibility
- Reduced animations through framer motion on largest content paint
- Simplified animations with CSS
π¦ next-genart
ββ client
β ββ app
β β ββ assets.ts
β β ββ buy
β β β ββ page.tsx
β β ββ globals.css
β β ββ layout.tsx
β β ββ page.tsx
β β ββ result
β β β ββ page.tsx
β β ββ types.d.ts
β β ββ ui
β β ββ fonts.ts
β ββ components
β β ββ Description.tsx
β β ββ Footer.tsx
β β ββ GenerateButton.tsx
β β ββ Header.tsx
β β ββ Loader.tsx
β β ββ Login.tsx
β β ββ Navbar.tsx
β β ββ Steps.tsx
β β ββ Testimonials.tsx
β ββ config
β β ββ index.ts
β ββ context
β β ββ AppContext.tsx
β ββ lib
β β ββ client-api.ts
β β ββ types.ts
β ββ public
β ββ assets
β β ββ [various SVG and PNG files]
β ββ fonts
β ββ outfit
β ββ [font files]
ββ server
ββ config
β ββ index.ts
β ββ mongoose.ts
β ββ razorpay.ts
ββ controllers
β ββ imageController.ts
β ββ userController.ts
ββ index.ts
ββ middlewares
β ββ authHandler.ts
β ββ errorHandler.ts
β ββ responseMiddleware.ts
β ββ validateRequest.ts
ββ models
β ββ TransactionModel.ts
β ββ UserModel.ts
ββ routes
β ββ imageRoutes.ts
β ββ userRoutes.ts
ββ validations
ββ imageValidation.ts
ββ userValidation.ts
Before getting started with Next GenArt, ensure your runtime environment meets the following requirements:
- Version Controller: Git
- Programming Language: Node.js (v16+)
- Package Manager: npm or yarn
Install Next GenArt using the following steps:
-
Clone the repository:
git clone https://github.com/harshal255/next-genart
-
Set up the server (backend):
cd server npm install
Create a
.env
file in the server directory with the following variables:PORT=4000 MONGODB_URL_ATLAS=your_mongodb_connection_string JWT_SECRET=your_jwt_secret # https://clipdrop.co/apis CLIPDROP_API=your_clipdrop_api_key # Razor Pay RAZORPAY_KEY_ID=your_razorpay_key_id RAZORPAY_KEY_SECRET=your_razorpay_key_secret CURRENCY=INR
-
Set up the client (frontend): open another terminal and then
cd client npm install
Create a
.env
file in the client directory with the following variables:NEXT_PUBLIC_SERVER_URL=http://localhost:4000 NEXT_PUBLIC_RAZORPAY_KEY_ID=your_razorpay_key_id
-
Start the server:
cd server npm run dev
-
Start the client:
cd client npm run dev
-
Open your browser and navigate to
http://localhost:3000
-
Core Features
: Basic image generation with credit system -
Performance
: Optimize to achieve 99/100 Lighthouse score -
User Gallery
: Add personal gallery for saved generations -
Advanced Options
: Add more customization options for image generation -
Social Sharing
: Implement direct sharing to social media platforms -
Subscription Model
: Add monthly subscription option alongside credit purchases
- π¬ Join the Discussions: Share your insights, provide feedback, or ask questions.
- π Report Issues: Submit bugs found or log feature requests for the
next-genart
project. - π‘ Submit Pull Requests: Review open PRs, and submit your own PRs.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your GitHub account.
- Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/yourusername/next-genart
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b feature/new-feature-name
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Add: implemented new feature'
- Push to GitHub: Push the changes to your forked repository.
git push origin feature/new-feature-name
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
- Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
This project is licensed under the MIT License - see the LICENSE file for details.
This project was developed by Harshal Kahar. Feel free to reach out with any questions or suggestions.
- Email: [email protected]
- GitHub: harshal255
- LinkedIn: harshal-kahar
- Thanks to ClipDrop API for powering the AI image generation
- Special thanks to all contributors who have helped improve this project
- Inspired by modern AI image generation tools and the potential of AI in creative processes
This read.md file follows the structure of the Conversa example but is tailored specifically for your Next GenArt project. It includes all the key information about your application, its features, performance optimizations, and setup instructions.
Would you like me to make any adjustments to the read.md file?