TISC Editor is a Dockerized monorepo providing a professional environment for cloud-based Typst editing:
- Web Editor: VSCode-like interface, live preview, template gallery, collaboration.
- Compilation API: Stateless Typst to PDF/SVG rendering, Base64 asset handling.
- Database Layer: PostgreSQL managed with Prisma ORM.
- Testing & CI/CD: Full E2E coverage with Cypress, integrated in Docker lifecycle.
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, TailwindCSS, Lucide Icons |
| Backend | Node.js API with Typst binary integration |
| Database | PostgreSQL, Prisma ORM |
| DevOps | Docker Compose, GitHub Actions |
| Testing | Cypress E2E |
| Component | Highlights |
|---|---|
| Web Editor | Real-time preview, VSCode-like editor, template gallery, multi-user project sharing |
| Compilation API | Typst to PDF/SVG rendering, isolated environments, Base64 image processing |
| Architecture | Dockerized monorepo, Prisma ORM, Next.js Server Actions |
| Testing | Automated End-to-End testing with Cypress integrated into Docker |
The editor fetches Typst templates from public GitHub repositories to enable template-based project creation.
This requires calling the GitHub REST API for:
- Searching repositories
- Reading repository metadata
- Fetching template files
By default, GitHub limits unauthenticated requests to 60 requests per hour per IP. This limit is quickly exceeded during normal usage (template browsing, searches, multiple users), which may result in:
- Missing templates
- Failed searches
- GitHub API rate-limit errors (403)
To avoid this, you must configure a Personal Access Token.
-
Create a Token: Go to https://github.com/settings/tokens and generate a Personal Access Token (classic).
No special scopes are required for public repositories. -
Update your
.env: Add the token to the app environment file (or directly indocker-compose.yml):
GITHUB_TOKEN=your_github_token_hereNote: Using a token increases the rate limit to 5,000 requests per hour. If you plan to use the API concurrently with multiple users, you may need to request a higher-tier token. See the details here.
- Docker & Docker Compose (Required)
- Node.js / Bun (Optional, for local development outside Docker)
To launch the entire stack (App, API, Database) and see the tests run automatically:
Make sure you completed the Configuration before.
git clone https://github.com/ISC-HEI/tisc-editor.git
cd tisc-editor
docker compose up -d --buildNote: The test container will launch, execute the suite, and exit. The App, API, and Database will remain running in the background for you to work on.
- Editor UI: http://localhost:3000
- Compilation API: http://localhost:3001
Option A - Docker Compose (recommended)
For active development, we recommend using the following command to see live logs while you code:
docker compose up --buildOption B - Manual start (advanced)
First you need to start a PostgreSQL instance, with docker or on your device.
Then to start the API, see here
To start the App, see here.
The project includes a robust End-to-End (E2E) testing suite powered by Cypress. These tests ensure that critical user flows remain stable and functional.
Tested Scenarios:
- Authentication: Sign-up, Login, and Logout flows.
- Project Lifecycle: Creating projects using various templates (Blank, Thesis, Report).
- Collaboration: Sharing projects, handling non-existent users, self-sharing prevention, and managing permissions.
To run the full suite and shut down the environment automatically (ideal for CI):
docker compose up --build --exit-code-from testTo run tests while the application is already running in development mode:
docker compose run testThis project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.
This project is an independent work and is not affiliated with, endorsed by, or supported by the official Typst organization.
