Documentation
Getting Started
Learn the basics of PaperCast and how to build your first document.
Welcome to the PaperCast API documentation. PaperCast is a Schema-First Document Builder. You design your layout using a JSON schema, and our engine renders it dynamically.
Installation
PaperCast packages are published on NPM and can be installed via your preferred package manager:
npm install @papercast/core @papercast/engine @papercast/react
Using Widgets
You can easily embed our widgets into your own document schemas. Below is a full-scale interactive example of an Invoice widget.
Invoice Example
This widget demonstrates how an invoice template renders in the engine.
Mastering Modern Web Architecture
Building fast, scalable web applications requires a deep understanding of frontend optimization, state management, and semantic markup structures.
Key Development Pillars
When engineering enterprise-grade user interfaces, teams must balance performance with maintainability. Focus heavily on these three core segments:
- Component Isolation: Write modular CSS and scoped logic to prevent global style pollution.
- State Hydration: Optimize server-side rendering boundaries to lower Time to Interactive (TTI).
- Accessibility (a11y): Utilize ARIA attributes and native interactive elements cleanly.
"Simplicity is a great virtue but it requires hard work to achieve it and education to appreciate it. And to make things worse: complexity sells better." — Edsger W. Dijkstra
Performance Metrics Comparison
The table below outlines the core web vitals that engineering teams track to evaluate application responsiveness and visual stability.
| Metric Name | Acronym | Target Score | Impact Level |
|---|---|---|---|
| Largest Contentful Paint | LCP |
< 2.5 seconds | High |
| Interaction to Next Paint | INP |
< 200 milliseconds | Critical |
| Cumulative Layout Shift | CLS |
< 0.1 | Medium |
Next Steps for Implementation
Review your application bundle sizes using a visualizer tool. Next, remove unused dependencies. Finally, test your interface under simulated mobile throttling networks.
For more details, consult the internal architecture documentation or reach out via the engineering Slack channel.
API Overview
To programmatically generate PDFs, send a POST request with your JSON schema to https://paper-cast-web.vercel.app/api/pdf.
fetch("https://paper-cast-web.vercel.app/api/pdf", {
method: "POST",
body: JSON.stringify(mySchema),
});