Pii.link is a freelancer-focused business OS: clients, projects, time tracking, invoicing, expenses, and analytics in one static web app backed by Firebase.
Live demo: https://pii.link
| Area | Choice |
|---|---|
| Framework | Next.js 15 (Pages Router), static export (output: 'export') |
| UI | React 19, Material UI v7, Emotion |
| Data | Firebase Auth, Firestore, Storage (client SDK) |
| Serverless | Optional; this repo targets static hosting + rules deploys |
| State / data fetching | TanStack Query |
| Charts | Recharts |
| PWA | next-pwa |
| Language | TypeScript |
| Tests | Jest, Playwright, Firestore rules unit tests |
- Static export: The app ships as static HTML/JS in
out/and is served from Firebase Hosting (or any static host). - Client-side Firebase: Configuration comes only from
process.envinfirebase/config.ts(see.env.local.example). No API keys are committed in source. - Multi-tenant data: Business data lives under
tenants/{firebaseAuthUid}/.... Firestore security rules are the primary authorization boundary. - Roles:
userRolesdocuments and optional custom claims gate admin vs tenant vs client-viewer experiences.
- Copy env template:
cp .env.local.example .env.local - Fill in Firebase web app values from Firebase Console → Project settings → Your apps.
npm installnpm run dev
npm run buildalso generates.env.build.local(gitignored) containing the Git commit SHA and build timestamp for the footer. Your Firebase keys in.env.localare never touched by the build script.
npm run type-check
npm test
npm run test:rules
npm run test:e2e
npm run buildEnd-to-end tests expect a running build and test user credentials in env (see playwright.config.ts).
Configure .firebaserc for your Firebase project, then build (npm run build) and deploy hosting/rules from your machine or any pipeline you control (for example firebase deploy).
MIT — see LICENSE.