Skip to content

Installation

This is the full setup guide. For a minimal 5-minute setup, see Quickstart.

RequirementVersionNotes
Node.js20+LTS recommended. Verify: node -v
npm10+Ships with Node 20
Git2.x+With Git LFS for large data files
C++ build toolsRequired for better-sqlite3 native compilation
DockerOptional, only for local Neo4j
Terminal window
git clone https://github.com/sensdiego/juca.git
cd juca

If the repository uses Git LFS for data files, also run:

Terminal window
git lfs install
git lfs pull
Terminal window
npm install

This installs ~670 packages including the better-sqlite3 native module. If compilation fails:

  • macOS: xcode-select --install
  • Linux (Debian/Ubuntu): sudo apt-get install build-essential python3
  • Linux (RHEL/Fedora): sudo dnf groupinstall "Development Tools"

Copy the example file and fill in your values:

Terminal window
cp .env.example .env.local

Required variables (minimum):

Terminal window
# LLM Providers — at least Anthropic + Groq
ANTHROPIC_API_KEY=sk-ant-...
GROQ_API_KEY=gsk_...
# Dev auth bypass
ENABLE_DEV_AUTH=true

Optional but recommended:

Terminal window
# Valter integration (the primary backend)
VALTER_API_URL=https://valter-api-production.up.railway.app
VALTER_API_KEY=your-key
# Additional LLM providers
OPENAI_API_KEY=sk-...
GEMINI_API_KEY=...
DEEPSEEK_API_KEY=sk-...
# Knowledge Graph (local mode by default)
KG_PROVIDER=json

See Environment Variables for the complete reference of 30+ variables.

If you want to use the Neo4j knowledge graph locally instead of JSON files:

Terminal window
docker compose up -d

This starts a Neo4j Community 5 instance. Then configure:

Terminal window
KG_PROVIDER=neo4j
NEO4J_URI=bolt://localhost:7687
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=password

The project uses custom git hooks in .githooks/:

HookAction
pre-commitRuns ESLint on staged files
pre-pushRuns the full test suite
post-checkoutHousekeeping tasks
post-commitHousekeeping tasks
post-mergeHousekeeping tasks

Hooks are configured automatically via the prepare script in package.json:

Terminal window
npm run prepare # Runs: git config core.hooksPath .githooks
Terminal window
# Start the dev server
npm run dev
# In another terminal, run tests
npm test

Expected outcomes:

  • Dev server starts at http://localhost:3000 with no errors
  • Tests execute (some may fail due to known issue #270)

Juca uses a multi-stage Docker build for production deployment:

Terminal window
# Build the image (NOTE: for CI/Railway only — do NOT run locally)
docker build -t juca .

The Dockerfile:

  1. deps stage — Installs npm dependencies
  2. build stage — Runs next build with standalone output
  3. runtime stage — Minimal Node.js image with only production artifacts

Deployment to Railway happens automatically on push to main.

ProblemSolution
better-sqlite3 compilation failsInstall C++ build tools (see step 2)
Git LFS files are pointer filesRun git lfs pull
Auth errors on every pageSet ENABLE_DEV_AUTH=true in .env.local
”No API key configured”Add at minimum ANTHROPIC_API_KEY and GROQ_API_KEY

For more issues, see Troubleshooting.