Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– MiniChatGPT

An AI-powered Full-stack Chat Application with secure authentication, persistent chat history, and intelligent conversations powered by Google Gemini API.

Built with React, Node.js, PostgreSQL, and deployed on Microsoft Azure using GitHub Actions CI/CD.


πŸ“Έ Preview

πŸ’¬ Chat


πŸ›  Admin Dashboard


πŸ“± Mobile


✨ Features

  • πŸ€– AI-powered conversations using Google Gemini API
  • πŸ” Secure JWT Authentication
  • πŸ’¬ Persistent Conversation History
  • πŸ‘€ User & Admin Dashboard
  • πŸ›‘ Role-Based Authorization
  • ☁ Cloud-native deployment on Microsoft Azure
  • βš™ Automated CI/CD with GitHub Actions
  • πŸ“± Fully Responsive Design
  • πŸŒ™ Dark / Light Theme
  • ⚑ Smart Error Handling & Rate Limiting

πŸ— System Architecture

The application follows a cloud-native architecture on Microsoft Azure with automated CI/CD using GitHub Actions.

MiniChatGPT Azure Architecture


Architecture Overview

  • React + Vite frontend hosted on Azure Static Web Apps.
  • Node.js + Express backend deployed on Azure Container Apps.
  • Azure Database for PostgreSQL stores users, conversations, and messages.
  • Azure Key Vault securely manages application secrets.
  • Application Insights collects logs and telemetry.
  • Google Gemini API provides AI-powered responses.
  • GitHub Actions automates CI/CD deployments.

πŸ›  Tech Stack

Frontend


Backend


Database


Cloud & DevOps


AI


πŸ“‚ Project Structure

MiniChatGPT
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ public/
β”‚   └── package.json
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ package.json
β”‚   └── Dockerfile
β”‚
β”œβ”€β”€ database/
β”‚   └── mini_chatgpt.sql
β”‚
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”‚
└── README.md

βš™ Environment Variables

Backend

DATABASE_URL=

JWT_SECRET=

GEMINI_API_KEY=

GEMINI_MODEL=

CLIENT_ORIGIN=

NODE_ENV=production

Frontend

VITE_API_BASE_URL=

πŸš€ Getting Started

Clone Repository

git clone https://github.com/vuth9808/MiniChatGPT_Main.git

Backend

cd backend

npm install

npm run dev

Frontend

cd frontend

npm install

npm run dev

πŸ“‘ REST API

Authentication

Method Endpoint
POST /register
POST /login
POST /logout

Conversations

Method Endpoint
GET /conversations
POST /conversations
GET /conversations/:id
DELETE /conversations/:id
POST /conversations/:id/messages

Admin

Method Endpoint
GET /users
DELETE /users/:id

πŸ”’ Security

  • JWT Authentication
  • Password Hashing with bcrypt
  • Parameterized SQL Queries
  • Role-Based Authorization
  • CORS Protection
  • Rate Limiting
  • Secure Cookies

πŸš€ Deployment

The application is automatically deployed through GitHub Actions.

GitHub
      β”‚
      β–Ό
GitHub Actions
      β”‚
 β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
 β–Ό         β–Ό
Azure Static Web Apps
Azure Container Apps
      β”‚
      β–Ό
Azure Database for PostgreSQL

Every push to the main branch automatically triggers the deployment pipeline.


πŸ“„ License

This project is licensed under the MIT License.


πŸ‘¨β€πŸ’» Author

To Hoang Vu

πŸ“§ tohoangvu161225@gmail.com

🌐 https://github.com/vuth9808

About

Free AI Chat

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages