Introduction
ClickGPT is an AI-driven application that combines chat and image generation functionalities using modern web and backend frameworks. This repository contains a Spring Boot-based backend and a React-based frontend.
Features β’ Chat Service: AI-powered conversational chatbot. β’ Image Generation Service: AI-generated images based on user input. β’ Scalable Architecture: Designed for performance and scalability. β’ Modern UI: Intuitive user interface built with React.
Technologies Used β’ Backend: β’ Spring Boot β’ Maven β’ Java β’ Frontend: β’ React.js β’ Node.js β’ CSS β’ Others: β’ RESTful APIs
Directory Structure:
siddharth-upadhyayula-ClickGPT/
βββ backend/
β βββ mvnw
β βββ mvnw.cmd
β βββ pom.xml
β βββ .DS_Store
β βββ .gitignore
β βββ src/
β β βββ main/
β β β βββ java/
β β β β βββ com/sidupadhyayula/GenAI/
β β β β βββ ChatService.java
β β β β βββ GenAIController.java
β β β β βββ GenAiApplication.java
β β β β βββ ImageService.java
β β β β βββ WebConfig.java
β β β βββ resources/
β β β βββ application.properties
β β βββ test/
β β βββ java/com/sidupadhyayula/GenAI/
β β βββ GenAiApplicationTests.java
β βββ .mvn/
β βββ wrapper/
β βββ maven-wrapper.properties
βββ frontend/
βββ README.md
βββ package-lock.json
βββ package.json
βββ .gitignore
βββ public/
β βββ index.html
β βββ manifest.json
β βββ robots.txt
βββ src/
βββ App.css
βββ App.js
βββ App.test.js
βββ index.css
βββ index.js
βββ reportWebVitals.js
βββ setupTests.js
βββ components/
βββ ChatComponent.js
βββ ImageGenerator.js
Setup Instructions
Prerequisites β’ Java 17+ β’ Node.js 18+ β’ Maven 3.8+ β’ Git
Backend Setup:
- Navigate to the backend/ directory:
cd backend
- Build the project using Maven:
./mvnw clean install
- Run the application:
./mvnw spring-boot:run
- The backend service will be available at http://localhost:8080.
Frontend Setup 1. Navigate to the frontend/ directory:
cd frontend
- Install dependencies:
npm install
- Start the development server:
npm start
- The frontend will be accessible at http://localhost:3000.
Backend Overview
The backend is built using Spring Boot and includes the following components:
Key Files β’ ChatService.java: Handles chat-related logic. β’ GenAIController.java: Manages REST endpoints for chat and image services. β’ GenAiApplication.java: Main application class to bootstrap the Spring Boot application. β’ ImageService.java: Contains logic for image generation. β’ WebConfig.java: Configures CORS and other web settings.
Configuration: β’ application.properties: Contains environment-specific configurations such as server ports and database details.
Frontend Overview
The frontend is built using React.js and includes reusable components for better scalability and modularity.
Key Files β’ App.js: Entry point for the application. β’ ChatComponent.js: Renders the chat interface. β’ ImageGenerator.js: Allows users to generate AI-powered images. β’ public/index.html: Base HTML file for the application.
Styling β’ CSS files (App.css, index.css) provide consistent styling.
Contributing
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature"
- Push to your fork:
git push origin feature-name
- Submit a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
This documentation provides a comprehensive overview of the ClickGPT repository, its structure, and how to set it up and contribute.