Skip to content

The AI Image Generator Backend is a Node.js app using MongoDB, Mongoose, JWT authentication, and AWS S3 for storing AI-generated images. It offers RESTful API endpoints for image generation and user management. πŸš€

License

Notifications You must be signed in to change notification settings

Null-logic-0/ai-image-gen-backend-1.1.0-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

40 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI Image Generator - Backend A backend service that enables AI-powered image generation, user authentication, and image storage. Built using Node.js, Express.js, and MongoDB.

πŸ“Œ Features

βœ… AI Image Generation – Generate images based on user prompts
βœ… User Authentication – Secure login and authentication using JWT TOKEN
βœ… Image Storage – Save and retrieve images from AWS bucket Storage
βœ… REST API – Well-documented API endpoints for frontend integration

πŸ›  Tech Stack

Backend: Node.js, Express.js
Database: Mongo.DB & Mongoose
Authentication: JWT token stored in cookies
Storage: AWS storage S3
AI API: Replicate API

πŸš€ Installation & Setup: Development

1️⃣ Clone the Repository

git clone https://github.com/Null-logic-0/ai-image-gen-backend-1.1.0-.git
cd ai-image-gen-backend-1.1.0-

2️⃣ Install Dependencies

npm install

3️⃣ Developent: Setup Environment Variables This project uses environment variables to connect to services like MongoDB, AWS, and Replicate. These should be stored in a .env file for local development. Create a .env file in the root directory and add:

DATABASE=your_mongo_URI
DATABASE_PASSWORD=your_password

JWT_SECRET=secret
JWT_EXPIRES_IN=30d
JWT_COOKIE_EXPIRES_IN=30


AWS_ACCESS_KEY_ID=your_AWS_access_key_id
AWS_SECRET_ACCESS_KEY=your_AWS_secret_access_key_id
AWS_REGION=your_AWS_secret_access_key_id
AWS_BUCKET_NAME=your_AWS_bucket_name

REPLICATE_API_TOKEN=your_replicate-ai-token

4️⃣ Run the Server

npm run dev

πŸ”’ .env files should never be committed to Git. Make sure .gitignore includes .env

πŸš€ Installation & Setup: Production

In production, environment variables should be set using your hosting provider’s dashboard. You don’t need or use a .env file on the live server. Use the provider’s UI to add each key (e.g., AWS_BUCKET_NAME, DATABASE, etc.). These will be securely injected into the environment at runtime.

1️⃣ Clone the Repository

git clone https://github.com/Null-logic-0/ai-image-gen-backend-1.1.0-.git
cd ai-image-gen-backend-1.1.0-

2️⃣ Install Dependencies

npm install

3️⃣ Run the Server

npm start

Screenshot 2025-03-07 at 14 48 06 Screenshot 2025-03-07 at 14 48 57 Screenshot 2025-03-07 at 14 49 18 Screenshot 2025-03-07 at 14 49 33 Screenshot 2025-03-07 at 14 49 49 Screenshot 2025-03-07 at 14 50 00 Screenshot 2025-03-07 at 14 50 29 Screenshot 2025-03-07 at 14 51 03 Screenshot 2025-03-07 at 14 51 33 Screenshot 2025-03-07 at 14 51 44 Screenshot 2025-03-07 at 14 51 57 Screenshot 2025-03-07 at 14 52 36 Screenshot 2025-03-07 at 14 52 53 Screenshot 2025-03-07 at 14 53 06 Screenshot 2025-03-07 at 14 53 28 Screenshot 2025-03-07 at 14 54 58 Screenshot 2025-03-07 at 14 56 07 Screenshot 2025-03-07 at 14 58 08 Screenshot 2025-03-07 at 14 58 18

Whatch video ----->

https://www.youtube.com/watch?v=J5digNPWANw

Front-End -------->

https://github.com/Null-logic-0/AI-image-generator-version-1.1.0-Front-end

About

The AI Image Generator Backend is a Node.js app using MongoDB, Mongoose, JWT authentication, and AWS S3 for storing AI-generated images. It offers RESTful API endpoints for image generation and user management. πŸš€

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •