ESP32-S3 Bench Guide
ESP32-S3 N16R8 bench guide: live pinout, lessons, simulators and the bench log.
翻訳待ち
No updates detected yet. GitHub releases will appear here.
Loading the full README. The saved excerpt is shown below.
Sistem Retrieval-Augmented Generation (RAG) untuk dokumen akademik PMPSTI, dibangun dengan Rust (Actix-web) + SvelteKit + PostgreSQL + pgvector. • Podman — untuk menjalankan PostgreSQL • Rust + Cargo — untuk backend • Node.js 18+ — untuk frontend • Python 3.10+ — untuk ingest dokumen (opsional) Salin .env.example menjadi .env di root project, lalu sesuaikan: Dokumen yang sudah diingest akan muncul di halaman ARead the full README ↗
A Retrieval-Augmented Generation (RAG) assistant for PMPSTI academic documents at Universitas Gadjah Mada, built with Rust (Actix-web), SvelteKit, PostgreSQL and pgvector.
Frontend (SvelteKit :5173)
↕ /api/* proxy
Rust backend (Actix-web :8080)
↕ SQLx
PostgreSQL + pgvector (:5432 locally, Neon in the cloud) ← Python ingest pipeline
Skip this section if your DATABASE_URL points to Neon.
podman run -d \
--name pmpsti-db \
-e POSTGRES_USER=admin \
-e POSTGRES_PASSWORD=admin \
-e POSTGRES_DB=pmpsti_rag \
-p 5432:5432 \
docker.io/pgvector/pgvector:pg16
podman start pmpsti-db
podman ps
podman exec -it pmpsti-db psql -U admin -d pmpsti_rag -c "CREATE EXTENSION IF NOT EXISTS vector;"
Create a .env file in the project root. It is git-ignored and must never be committed.
# Database: local Podman, or a Neon branch (see "Code and database workflow")
DATABASE_URL=postgres://admin:admin@localhost:5432/pmpsti_rag
# Server (the frontend dev proxy expects 8080; the default is 7860)
HOST=0.0.0.0
PORT=8080
# Auth: required, at least 32 characters (the server refuses to start without it).
# Generate with: openssl rand -hex 32
JWT_SECRET=replace-with-a-long-random-secret
# Production only: shared with the Vercel proxy so the backend can trust the visitor IP
# (login and question limits are per visitor). Set the same value on Vercel and Render.
# PROXY_SECRET=...
# Guests together: questions per day (default 150)
# GUEST_DAILY_LIMIT=150
# Optional: create or update an admin account on startup
# [email protected]
# ADMIN_PASSWORD=...
# Gemini: required for embeddings (gemini-embedding-001), also used as the LLM
GEMINI_API_KEY=...
LLM_BACKEND=gemini
GEMINI_MODEL=gemini-3.5-flash-lite
# Used in order when the model above hits its quota (429); default gemini-3.1-flash-lite
# LLM_FALLBACK_MODELS=gemini-3.1-flash-lite
# Alternative LLMs:
# Ollama (local)
# LLM_BACKEND=ollama
# LLM_API_URL=http://localhost:11434/api/chat
# LLM_MODEL=llama3.2
# Groq or any OpenAI-compatible API
# LLM_BACKEND=openai
# LLM_API_URL=https://api.groq.com/openai/v1/chat/completions
# LLM_API_KEY=gsk_...
# LLM_MODEL=llama-3.3-70b-versatile
# Email (verification and password reset)
# RESEND_API_KEY=...
# APP_BASE_URL=http://localhost:5173
cargo run
Wait for the startup banner (PMPSTI API, database, LLM, listen address) followed by Server siap di http://0.0.0.0:8080.
The backend needs
GEMINI_API_KEYto embed questions with Geminigemini-embedding-001.
In a new terminal (keep the backend running):
cd frontend
npm install # first time only
npm run dev
Open http://localhost:5173.
The frontend always calls the backend through its own /api route (the Vite dev proxy locally, src/routes/api/[...path]/+server.ts on Vercel), so no API URL needs to be configured.
Option A (automatic): set ADMIN_EMAIL and ADMIN_PASSWORD in .env and restart the backend.
Option B (manual):
Register at http://localhost:5173/register.
Promote the account in psql:
podman exec -it pmpsti-db psql -U admin -d pmpsti_rag
UPDATE users SET role = 'admin' WHERE email = '[email protected]';
SELECT id, email, role FROM users;
\q
Sign in again so the session picks up the new role.
cd scripts
python -m venv .venv && source .venv/bin/activate # first time only
pip install -r requirements.txt # first time only
# Put PDF/DOCX files in docs/, then:
python ingest.py
Ingested documents appear under Admin → Documents. You can also add web pages there with Add from URL.
ingest.pyneedsGEMINI_API_KEY(read from the root.env). Choose the target database with theDATABASE_URLenv var or--db.
Document embeddings must use the same model as the backend (Gemini gemini-embedding-001).
cd scripts
python regen_embeddings.py --all --dry-run # count rows only
python regen_embeddings.py --all # overwrite every embedding
python regen_embeddings.py # fill only rows whose embedding is NULL
If embeddings were already generated on another Neon branch (e.g. test-embedding), copy them to production instead of regenerating:
# Root .env: DATABASE_URL = source, PROD_DATABASE_URL = destination
cd scripts
python copy_embeddings.py --dry-run # report only, writes nothing
python copy_embeddings.py # copy (asks you to type 'ya' to confirm)
Rows are matched by id and content (title + content). Rows that differ, or exist on only one side, are skipped and reported. Create a production backup branch in Neon first, and remove PROD_DATABASE_URL from .env when you are done.
This is the beginning of the README. Read the rest at the original. Read the full README ↗