ch prefix

This commit is contained in:
2026-08-18 00:59:32 +05:00
parent dbb6f7bda9
commit 25e5068c8b
2446 changed files with 393356 additions and 455 deletions

26
frontend/readme.md Executable file → Normal file
View File

@@ -7,3 +7,29 @@ npm i
# Production build
npx tailwindcss -i assets/css/app.css -o src/css/app.css --minify
```
## Chatbot (Sorag-jogap)
Q&A bot with curated question buttons, backed by a SQLite database on the backend. Answers are auto-generated from [tbbank.gov.tm](http://tbbank.gov.tm) content. Embedded as a floating widget on the homepage — click **Soraglar** (bottom-right) to open the chat panel.
### Run locally
```bash
# Terminal 1 — API (Node 18)
cd ../backend && npm i && npm start
# Terminal 2 — static site (serve src/ with your usual tool)
cd frontend && npm i
npx tailwindcss -i assets/css/app.css -o src/css/app.css --minify
```
Open `/` and click **Soraglar**. Pick a question button or type your own. Russian UI: `/?lang=ru`. Old `/chatbot.html` links redirect to `/?chat=open`.
### Production API URL
If the API is not on `localhost:3001`, set the base URL before loading the chat script:
```html
<script>window.CHATBOT_API = 'https://your-api.example.com';</script>
<script src="/js/chatbot.js"></script>
```