This project is a personal LLM client. The website is built using HTMX and Templ for serving HTML templates in Golang. The backend is written in Go, which serves the static content and the templates for the front-end.
The project is organized into the following directories and files:
/web
: Contains all front-end related files./static
: Holds static files like CSS for styling./css
: Directory for CSS stylesheets.
/templates
: Contains HTML templates served by the Go backend./images
: Directory for image files.
/backend
: Contains all Go backend logic./handlers
: Route handlers that respond to HTTP requests./models
: Data models used throughout the application.main.go
: The main entry point for the Golang application.
To build the project, ensure you have Go installed on your system. Navigate to the /backend
directory and run:
go build
To run the project in development mode with Tailwind CSS in watch mode, use the run_dev.sh
script. This script will start your Go server and also start Tailwind CSS in watch mode, which automatically rebuilds your CSS file whenever you make changes to your styles.
In the project root directory, execute:
./run_dev.sh
Make sure to make the script executable before running it. You can do this with the following command:
chmod +x run_dev.sh
This will start the server and Tailwind CSS watcher. The website will be accessible at http://localhost:8080
or the configured port.
For production, use the run.sh
script which starts the server without Tailwind CSS in watch mode, ensuring that your application is running with the optimized and compiled CSS files.
In the project root directory, execute:
./run.sh
Similarly, ensure the script is executable:
chmod +x run.sh
To run tests, navigate to the /backend
directory and execute:
go test ./...
This command will recursively run all tests in the backend directories.
Just run:
docker compose up --build
If you wish to contribute to this project, please follow the below steps:
- Fork the repository.
- Create a new branch for your feature or fix.
- Commit your changes with clear, descriptive messages.
- Create a pull request against the main branch.
For major changes, please open an issue first to discuss what you would like to change.
[MIT]
#TODO
- Write tests
- Better session handling
- Add model options
- Write a Dockerfile and
- a compose.yaml
- history of past chats
- chat config template
- render markdown
- highlight codeblocks
- button to easily copy code
- upload file
- add custom url as provider
- add ollama as a provider