Skip to content

Repository files navigation

Atomic Habits AI Assistant

Atomic Habits AI Assistant is a React and Vite chat interface for an AnythingLLM workspace backed by Google Gemini and retrieval-augmented generation. It lets users ask questions about James Clear's Atomic Habits content and receive context-aware answers from the indexed workspace.

Features

  • RAG-powered answers through an AnythingLLM workspace.
  • Google Gemini support through the configured AnythingLLM backend.
  • English and Turkish interface text.
  • Responsive chat UI built with React 18 and Tailwind CSS.
  • Runtime API configuration through Vite environment variables.

Live Demo

Open the deployed chatbot

Tech Stack

  • React 18
  • Vite
  • Tailwind CSS
  • AnythingLLM API
  • Google Gemini through AnythingLLM

Getting Started

Prerequisites

  • Node.js 18 or newer
  • npm
  • An AnythingLLM workspace with the Atomic Habits source material indexed
  • An AnythingLLM API key with access to that workspace

Installation

git clone https://github.com/suzunn/atomic-habits-chatbot.git
cd atomic-habits-chatbot
npm install

Environment

Copy the example environment file and fill in the AnythingLLM connection details:

cp .env.example .env
VITE_API_BASE_URL=https://your-anythingllm-instance.com
VITE_API_KEY=your-api-key
VITE_WORKSPACE_SLUG=atomic-habits

Development

npm run dev

Vite prints the local URL in the terminal, usually http://localhost:5173.

Production Build

npm run build
npm run preview

Project Structure

src/
  components/        Chat UI components and reusable buttons
  services/          AnythingLLM API client
  utils/             Translation strings and Markdown formatting helper
  App.jsx            Application shell and language/theme state
  main.jsx           React entry point
public/
  atomic_habits.png  Static image used by the interface

Configuration Notes

  • VITE_API_BASE_URL should point to the AnythingLLM server origin without a trailing /v1 path.
  • VITE_WORKSPACE_SLUG must match the workspace slug in AnythingLLM.
  • Vite exposes only variables prefixed with VITE_, so do not rename the existing environment keys unless the client code is updated too.
  • Keep API keys out of commits. Store local values in .env.

Turkish Summary

Atomic Habits AI Assistant, AnythingLLM ve Google Gemini ile çalışan bir RAG sohbet arayüzüdür. Uygulama, indekslenmiş Atomic Habits içeriğinden bağlam çekerek İngilizce ve Türkçe sorulara yanıt verir. Yerel geliştirme için .env dosyasındaki AnythingLLM API adresi, API anahtarı ve workspace slug değerleri girilmelidir.

License

MIT

About

AI-powered chatbot trained on Atomic Habits using RAG and Google Gemini via AnythingLLM.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages