Local development
Use this setup to work on Imprime itself. To simply run it, prefer Docker.
Prerequisites
Section titled “Prerequisites”-
Node.js 18 or later, npm
-
A MongoDB — the quickest is Docker:
Terminal window docker run -d --name imprime-mongo -p 27017:27017 mongo:7
-
Clone and install
Terminal window git clone https://github.com/RemiDufeu/imprime.io.gitcd imprime.ionpm install -
Configure — create
.envat the repository root (it’s read by both the backend and Vite):.env MONGODB_URI=mongodb://localhost:27017/imprimeBETTER_AUTH_SECRET=dev-secret-change-mePORT=3023PUBLIC_APP_URL=http://localhost:3023CORS_ORIGIN=http://localhost:5173VITE_API_URL=http://localhost:3023 -
Build the shared packages (needed once, and after changing them):
Terminal window npm run build:common && npm run build:sdk -
Start backend and frontend with hot reload:
Terminal window npm run dev- Editor: http://localhost:5173
- API: http://localhost:3023/api
Useful scripts
Section titled “Useful scripts”| Script | What it does |
|---|---|
npm run dev |
Backend (tsx watch) + frontend (Vite) together |
npm run dev:backend |
Backend only |
npm run dev:frontend |
Frontend only |
npm run build |
Build all packages |
npm run lint |
Lint all packages |
npm run docker:build |
Build the Docker image |
Project layout
Section titled “Project layout”| Path | Contents |
|---|---|
packages/backend/src/routes |
REST endpoints |
packages/backend/src/mcp |
MCP server and tools |
packages/backend/src/services |
Business logic, PDF rendering (ExportService), auth |
packages/frontend/src/pages |
Editor, home, login, API keys pages |
packages/frontend/src/store/editor |
Editor state (Zustand slices) |
packages/common/src |
Shared types, fonts, rendering helpers |
Contributing
Section titled “Contributing”Issues and pull requests are welcome on GitHub. Check the roadmap for planned features, and open an issue to discuss larger changes before starting.