Welcome to the Anachan project — a web application with a frontend (Vite + TS) and a Go backend that helps users analyze logs from UNIX-like distributions.
- About the Project
- Repository Structure
- Quick Start
- Development Scripts
- Environment Variables
- Contacts
Anachan consists of two parts:
- backend — an HTTP service in Go that handles requests, builds prompts, and aggregates responses from local and remote models.
- frontend — a SPA built with Vite + TypeScript that provides the UI for interacting with the backend.
- backend
- internal
- config — application configuration
- controllers — HTTP controllers (generate)
- dto — request/response types
- services — domain logic (divide/merge, etc.)
- res — resources and test data
- go.mod — Go dependencies
- internal
- frontend
- src — frontend source code (components, styles)
- vite.config.ts — Vite configuration
- package-lock.json — locked dependencies
Requirements:
- Node.js LTS and npm
- Go 1.22+
Steps:
-
Install frontend dependencies
- Go to the frontend folder and install dependencies: npm install
-
Run the frontend in development mode npm run dev
-
Run the backend
- Go to the backend/ folder and run:
- go run main.go
By default, Vite starts the dev server at http://localhost:5173, and the backend listens on the port specified in the configuration.
- frontend:
- npm run dev — start the dev server
- npm run build — build the production bundle
- npm run preview — preview the built bundle
- backend:
- go build — build the binary
- go test ./... — run tests
- For the backend, set the required environment variables according to backend/internal/config/config.go.
- You also need to install and configure Ollama (https://github.com/ollama/ollama) for the local model to work.
- Questions and suggestions (Telegram) — prettytapeworms.