Engineering
Local development setup
Run the docs site and sibling E-FACTS projects locally
Local development setup
Internal docs (efacts-dev)
cp .env.example .env.local # set DOCS_AUTH_*
npm install
npm run devOpen http://localhost:3000. Docs live at /docs. Unauthenticated requests redirect to /login.
| Variable | Purpose |
|---|---|
DOCS_AUTH_EMAIL | Allowed email (case-insensitive) |
DOCS_AUTH_PASSWORD | Password (exact match) |
DOCS_AUTH_SECRET | Optional HMAC secret for session cookie |
Session cookie: efacts_docs_session — httpOnly, SameSite=Lax, Secure in production, 7-day expiry.
Do not commit secrets
.env.local stays local. .env.example is the contract only.
Sibling repos (high level)
| Repo | Typical local entry |
|---|---|
efacts-backend | Follow that repo’s README (Fastify + DB + Redis) |
efacts-iosapp | Xcode · iOS 17+ simulator / device |
efacts-website | npm install · npm run dev (Next.js) |
Point clients at local or staging API bases via each repo’s env docs — never hardcode production secrets.
Useful checks (docs site)
npm run build # must pass before merge
npm run lint # if configured in package scriptsRelated
- Environments & domains
- Auth & security
- Repo root
README.md