Collaborative Markdown + LaTeX writing platform
If you find Previo useful and want to support its development:
👉 https://buymeacoffee.com/r4m0
Your support helps maintain and improve the platform ❤️
- Authentication: Email/password + Google/GitHub OAuth
- Projects: Markdown/LaTeX editing, import
.md/.tex, search, delete - Collaboration: Invite by email, accept/deny workflow, shared access
- Versioning: Snapshot history, diff view, save comments, revert
- Rendering: Markdown preview/export + LaTeX preview/export (PDF)
- Workspace: Per-project file/image uploads accessible from LaTeX
- Workspace References: use
/projectId/path/to/file.extinside Markdown/LaTeX (resolved in preview/export) - AI Co-Writer: local Ollama-powered draft generation + in-editor assistant
- AI Conversations: create/switch/delete conversations with persisted history
- CLI: Cross-platform
previo start <port>/previo stop
previo/
├── backend/
│ ├── db/postgres_service.py
│ ├── latex/
│ ├── markdown/
│ └── requirements.txt
├── ui/
│ ├── app/
│ ├── components/
│ ├── lib/
│ ├── types/
│ └── package.json
├── screenshots/
├── bin/previo.js
└── package.json
- Node.js 18+
- npm
- Python 3.10+
- PostgreSQL 14+ (or Docker Compose)
- LaTeX compiler (
pdflatex) - Docker + Docker Compose (recommended for full stack)
- Ollama (required for AI features)
- Clone and enter project:
git clone https://github.com/R4M-0/previo.git
cd previo- Configure
.envat repo root (copy from.env.example):
POSTGRES_DB=previo
POSTGRES_USER=previo
POSTGRES_PASSWORD=previo
PREVIO_DATABASE_URL=postgresql://previo:previo@postgres:5432/previo
NEXT_PUBLIC_APP_URL=http://localhost:3000
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
PREVIO_OLLAMA_BASE_URL=http://host.docker.internal:11434
PREVIO_OLLAMA_MODEL=llama3.1:8b
PREVIO_OLLAMA_TIMEOUT_MS=300000- Install and start Ollama on your host machine:
# install (Linux/macOS)
curl -fsSL https://ollama.com/install.sh | sh
# pull a model used by Previo (example default)
ollama pull llama3.1:8bOn Linux, make Ollama reachable from Docker containers:
sudo systemctl edit ollamaAdd:
[Service]
Environment="OLLAMA_HOST=0.0.0.0:11434"Then restart:
sudo systemctl daemon-reload
sudo systemctl restart ollamaQuick check:
curl http://localhost:11434/api/tags- Install the CLI once:
npm link- Start app:
previo start 3000- Stop app:
previo stopOpen http://localhost:3000.
cd ui
npm installpython3 -m venv .venv
source .venv/bin/activate
pip install -r backend/requirements.txtcd ui
npm run devOpen http://localhost:3000.
Previo uses Ollama via environment variables only:
PREVIO_OLLAMA_BASE_URL: Ollama endpoint reachable by the UI containerPREVIO_OLLAMA_MODEL: model name to use for generate/chatPREVIO_OLLAMA_TIMEOUT_MS: timeout per request in milliseconds
Optional tuning variables:
PREVIO_OLLAMA_DRAFT_MAX_TOKENSPREVIO_OLLAMA_CHAT_MAX_TOKENSPREVIO_OLLAMA_NUM_CTXPREVIO_OLLAMA_TEMPERATUREPREVIO_OLLAMA_CHAT_MAX_HISTORY
By default, Previo does not hard-cap generation/context for chat and draft quality (unless you set the optional vars above).
Common values:
- Dockerized app + Ollama on host:
PREVIO_OLLAMA_BASE_URL=http://host.docker.internal:11434
- Non-dockerized local app + Ollama on same machine:
PREVIO_OLLAMA_BASE_URL=http://localhost:11434
If AI requests time out often:
- keep your model warmed up (
ollama run <model>once), - increase
PREVIO_OLLAMA_TIMEOUT_MS(e.g.420000), - use a smaller/faster model.
docker compose upusesdocker-compose.override.yml(dev mode with bind mounts)docker compose -f docker-compose.yml up --builduses production image- Workspace files are persisted in
workspaces_dataand available underPREVIO_WORKSPACES_DIR - For AI features, Ollama must run on host and be reachable from container (
PREVIO_OLLAMA_BASE_URL)
- Google:
http://localhost:3000/api/auth/oauth/google/callback - GitHub:
http://localhost:3000/api/auth/oauth/github/callback
Use a consistent host (localhost recommended).
- Signup/login with email/password
- Google OAuth
- GitHub OAuth
- Session cookie auth
- Create Markdown or LaTeX projects
- Import existing
.md/.tex - Search by title/content/format
- Delete owned projects
- Invite collaborators by email
- Accept or deny invitations
- Shared editing access for accepted members
- Remote save sync in open editors
- Auto snapshot on save
- Optional save comments
- Diff viewer for each version
- Revert to any previous snapshot
- Markdown preview + HTML export
- LaTeX preview + PDF export
- Per-project file storage
- Upload/list/open/delete files
- Copy and use shorthand references like
/projectId/assets/diagram.png - Shorthand references are auto-resolved in Markdown/LaTeX preview and export
- AI draft generation during project creation (description-based)
- In-editor chat assistant for Markdown and LaTeX
- Replace suggestions with Approve/Modify workflow
- Multi-conversation management (new/switch/delete)
- Conversation history persisted in PostgreSQL
This project is licensed under the MIT License.
See the LICENSE file for details.
- UI:
ui/README.md - Backend:
backend/README.md










