Skip to content

Ollama chat webui - AI Chatbot made with React, Vite, Nest.js, tailwind, shadcn & more

Notifications You must be signed in to change notification settings

martwozniak/ollama-chat-webui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Installation and Running Guide

This guide will help you to set up and run the project, which consists of two main parts: the API backend and the frontend. Follow the steps below to get everything up and running.

Overview

Table of Contents

  1. Prerequisites
  2. Installation
  3. Running the Project
  4. Project Features
  5. Project Structure
  6. Troubleshooting

Prerequisites

Ensure you have the following installed on your machine:

Installation

API Installation

  1. Download Ollama, and run it on your local machine. Download ollama models from https://ollama.com/models

    ollama serve
  2. Navigate to the api directory:

    cd api
  3. Install the dependencies:

    npm install

    or if you prefer yarn:

    yarn install

Frontend Installation

  1. Navigate to the frontend directory:

    cd ../frontend
  2. Install the dependencies:

    npm install

    or if you prefer yarn:

    yarn install

Running the Project

Running the API

  1. Navigate to the api directory if not already there:

    cd api
  2. Start the API server:

    npm run start:dev

    or if you prefer yarn:

    yarn start:dev
  3. The API server should now be running on http://localhost:7010.

  4. Swagger http://localhost:7010/api

Running the Frontend

  1. Navigate to the frontend directory if not already there:

    cd ../frontend
  2. Start the frontend development server:

    npm run dev

    or if you prefer yarn:

    yarn dev
  3. The frontend development server should now be running on http://localhost:5173 or 5174.

Project Features

status-online status-offline time list-of-all-ai-models users-message users-message-input-field

server-response

Project Structure

The project is divided into two main parts:

  • api: Contains the backend code built with NestJS.
  • frontend: Contains the frontend code built with Vite and React.

API Directory Structure

  • dist: Compiled code
  • node_modules: Dependencies
  • src: Source code
  • test: Test files
  • package.json: NPM configuration file
  • tsconfig.json: TypeScript configuration file

Frontend Directory Structure

  • node_modules: Dependencies
  • public: Static assets
  • src: Source code
  • package.json: NPM configuration file
  • tsconfig.json: TypeScript configuration file
  • vite.config.ts: Vite configuration file

Troubleshooting

If you encounter issues during installation or running the project, try the following steps:

  1. Ensure all prerequisites are installed and updated.

  2. Delete the node_modules directory and the package-lock.json or yarn.lock file, then reinstall dependencies:

    rm -rf node_modules package-lock.json
    npm install

    or for yarn:

    rm -rf node_modules yarn.lock
    yarn install
  3. Check for specific error messages and consult the respective documentation for Node.js, npm, yarn, NestJS, Vite, or React.

If problems persist, feel free to open an issue on the project's repository or contact the maintainers.