Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 38 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,38 @@
# AI Chat Assistant
# My AI Chat Assistant

A modern web-based AI chat assistant built with FastAPI and vanilla JavaScript.
Welcome to my personal AI Chat Assistant project! This is a modern web-based AI chat application I built to explore full-stack development, integrating a FastAPI backend with a clean vanilla JavaScript frontend. It leverages the GitHub Models API for AI responses, providing a seamless chat experience.

## Overview of My Process

This project was developed as part of my learning journey in building AI-powered applications. Here's a summary of the steps I took:

### 1. Project Planning and Setup
- Conceptualized the idea of a simple yet functional AI chat assistant.
- Set up the project structure with separate backend and frontend directories.
- Chose FastAPI for the backend due to its speed and ease of use with Python, and vanilla JavaScript for the frontend to keep it lightweight without frameworks.

### 2. Backend Development
- Built the API using FastAPI, including endpoints for health checks, chat interactions, and CORS middleware for frontend integration.
- Integrated the LLM module to connect with GitHub Models API, handling authentication via environment variables.
- Implemented proper error handling, logging, and request validation using Pydantic models.

### 3. Frontend Development
- Created a responsive chat interface with HTML, CSS, and JavaScript.
- Implemented real-time message handling, including user input, API calls, and dynamic message display.
- Added features like loading states, keyboard shortcuts (Enter to send), and accessibility attributes.

### 4. Testing and Integration
- Tested the backend API endpoints locally.
- Ensured frontend-backend communication worked smoothly.
- Handled edge cases like empty messages and API errors.

### 5. Version Control and Deployment Preparation
- Initialized Git in the project directory.
- Added all files to staging, committed with an initial message.
- Set up GitHub repository as remote origin and pushed the code to the main branch.
- Prepared documentation and setup instructions for others to run the project.

Throughout the process, I focused on clean code, modularity, and best practices. The project demonstrates my skills in Python web development, JavaScript, API integration, and basic DevOps tasks like Git and environment management.

## Quick Start

Expand Down Expand Up @@ -53,6 +85,10 @@ Open `frontend/index.html` in your web browser, or use VS Code's Live Server ext
- `GET /health` - Health check
- `POST /chat` - Send chat messages

## Repository

The source code for this project is available on GitHub: [https://github.com/B3smoove/AI-Chat-Assistant](https://github.com/B3smoove/AI-Chat-Assistant)

## Development

- Backend: FastAPI with Python
Expand Down
12 changes: 6 additions & 6 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# TODO: Push Local Code to GitHub Repository

- [ ] Check if Git is initialized in the project directory
- [ ] Add GitHub repository as remote origin
- [ ] Add all files to Git staging area
- [ ] Commit changes with message "Initial commit"
- [ ] Push to the main branch on GitHub
- [ ] Verify the push succeeded
- [x] Check if Git is initialized in the project directory
- [x] Add GitHub repository as remote origin
- [x] Add all files to Git staging area
- [x] Commit changes with message "Initial commit"
- [x] Push to the main branch on GitHub
- [x] Verify the push succeeded
2 changes: 1 addition & 1 deletion backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ fastapi==0.104.1
uvicorn==0.24.0
openai==0.28.0
python-dotenv==1.0.0
pydantic==2.5.0
pydantic==1.10.13
Binary file not shown.