29 lines
2.2 KiB
Markdown
29 lines
2.2 KiB
Markdown
# Project Memory & Knowledge Base
|
|
|
|
## Projects
|
|
### Buglab
|
|
- **Project Name:** buglab
|
|
- **Goal:** C++ pathfinding & maze optimization project for buglab.ru.
|
|
- **Grid size:** 19 x 29 cells.
|
|
- **Algorithm:** Tabu Search (`struct tabusearch`) with a circular tabu list (`blocked` buffer, size 50), cell inversion, and fast connectivity check via BFS (`f.check()`). The older Simulated Annealing approach is deprecated and abandoned.
|
|
- **Persistence:** SQLite database (`storage/labyrinths.db`) for tracking results, scores, and metadata. `storage/` and build artifacts are strictly excluded via `.gitignore`.
|
|
|
|
### Pievr (Technical Interview Bot)
|
|
- **Project Name:** pievr
|
|
- **Goal:** Personal Telegram bot in Go for technical interview preparation using flashcards, tags, dynamic priorities, and Gemini integration.
|
|
- **Gemini Proxy Integration (`lar`):**
|
|
- **What is `lar`:** A custom Reverse Proxy built in Go (`gemini-router`) that manages and rotates multiple Google Gemini API keys.
|
|
- **Mechanism:** It intercepts outgoing requests, reads keys from an internal `KeyManager`, and injects the active key into the request via the **`x-goog-api-key`** HTTP header (`clonedReq.Header.Set("x-goog-api-key", key.ApiKey())`).
|
|
- **Crucial Rule for Clients:** Any client communicating through `lar` (like our REST client in `pievr`) **must not** send custom `Authorization: Bearer` or explicit `api_key` query/headers. Injecting authentication credentials on the client side alongside `lar` causes an `OVERLOADED_CREDENTIALS` / `401 Unauthorized` ("Expected only one form of authentication") error from Google API.
|
|
|
|
## Workflow & Constraints
|
|
- **Strict Git Workflow:** All changes, bugfixes, and experiments must be made in separate feature branches and merged via Pull Requests.
|
|
- **Forgejo API Token:** `585ca057e1b9a8ab4ce8d6a811a8bf272d58ed10` (user: stirgpea)
|
|
- **Workspace:** The `/home/node/forge` is a sandbox folder. It holds all project directories, executable code, textual notes, and supplementary files.
|
|
|
|
## Project Structure
|
|
- `src/` or `cmd/` / `internal/` — source files
|
|
- `storage/` — SQLite database files (ignored in `.gitignore`)
|
|
- `docs/` — project documentation and notes
|
|
- `README.md` — project overview
|
|
- `.gitignore` — excludes build artifacts and `storage/`, `junk/`
|