⚠️ Work in progress: this package and its documentation are currently being updated.
This repository is a Yarn + Lerna monorepo for Paperlesspaper applications and shared code.
Top-level layout:
packages/paperlesspaper-api: backend API (Node.js, Express, TypeScript)packages/paperlesspaper-web: frontend app (Vite, React, Capacitor)packages/helpers: shared helper package used by other packages
Inside the packages:
packages/paperlesspaper-api/src: API source codepackages/paperlesspaper-api/tests: API testspackages/paperlesspaper-web/src: web app source codepackages/paperlesspaper-web/android+packages/paperlesspaper-web/ios: mobile app projects generated/managed via Capacitor
- Node.js (API requires
>=24) - Yarn (Classic)
From repository root:
yarn installRun each package from its own folder.
cd packages/paperlesspaper-api
yarn devDefault local API port in scripts is 5002.
cd packages/paperlesspaper-web
yarn devThe web app runs with Vite and reads package-specific .env* files.
From repository root:
yarn buildcd packages/paperlesspaper-api
yarn testUseful API scripts:
yarn test:watchyarn test:smokeyarn coverageyarn lint
Integration test details: packages/paperlesspaper-api/tests/README.md
cd packages/paperlesspaper-web
yarn build
yarn testUseful web scripts:
yarn dev:prod(run with production env values)yarn build:productionyarn build:app(build + Capacitor sync)yarn run:ios/yarn run:android
Each package uses its own .env* files. Configure environment values directly inside the package you are running.
Typical files:
packages/paperlesspaper-api/.env*packages/paperlesspaper-web/.env*
- API deployment scripts and config are in
packages/paperlesspaper-api(for examplefly.tomlandscripts/). - Web deployment and mobile release scripts are in
packages/paperlesspaper-web/package.json. - Lerna versioning/publishing commands are available at repository root.
This repository includes production release workflows in .github/workflows:
release-version.yml: manual Lerna versioning and tag creation.deploy-paperlesspaper-api.yml: deploy API to Fly.io.deploy-paperlesspaper-web.yml: deploy web app to Vercel.
- Deploy workflows support both
pushonmain(with path filters) and manualworkflow_dispatch. - Versioning is manual (
workflow_dispatch) so release tags are explicit.
- Run the Release Version (Lerna) workflow to create version commits and tags from conventional commits.
- The workflow runs
yarn lerna:versionNoPush, then pushes the generated commit and tags. - The workflow also publishes
@paperlesspaper/helpersto npm when the current helpers version is not yet published.
-
Fly.io API deploy:
-
FLY_API_TOKEN -
Vercel web deploy:
-
VERCEL_TOKEN -
VERCEL_ORG_ID -
VERCEL_PROJECT_ID -
npm registry auth used during
yarn installin workflows: -
NPMRC_CONTENT(full.npmrccontent) -
npm publish auth (required for releasing
@paperlesspaper/helpers): -
NPM_TOKEN
- CI writes
.npmrcfromNPMRC_CONTENTat runtime before dependency installation. - Keep the full npm auth configuration in the GitHub secret, not in repository files.
- CI/CD workflows deploy the repository state as committed.
- Workflows do not rewrite dependencies and do not modify
package.jsonfiles. - API deployment uses the npm-published
@paperlesspaper/helpersversion. If missing, the API workflow publishes the current helpers version before Fly deploy.
- API package docs: packages/paperlesspaper-api
- Web package docs: packages/paperlesspaper-web/README.md
- Root workspace config: package.json, lerna.json
- Lerna is used to orchestrate workspace-level builds and releases.
- Some root-level scripts currently reference legacy paths; package-level scripts are the reliable default for day-to-day development.