Installation
Get PrivacyStack up and running on your local machine in minutes.
Prerequisites
- • Node.js 18+ installed
- • Git for version control
- • A code editor
- • Basic knowledge of React and Next.js
Installation Steps
1. Clone the Repository
git clone https://github.com/yourusername/privacystack.git
cd privacystack2. Install Dependencies
npm install3. Set Up Environment Variables
cp .env.example .env.localEdit .env.local with your configuration values
4. Run Development Server
npm run devOpen http://localhost:3000 in your browser
Implement Your App Logic
Replace the generic template with your actual business logic:
1. Update Core Logic
Edit utils/appLogic.ts with your processing function:
// utils/appLogic.ts
export function processData(input: string): ProcessingResult {
// Your app's core logic here
const result = yourProcessingFunction(input);
return {
result,
metrics: { totalTime: 0, exceedsThreshold: false }
};
}2. Build Your UI
Update app/home-client.tsx:
- • Replace placeholder input/output UI
- • Add your app-specific state management
- • Customize features section
- • Update hero section with your messaging
3. Customize Legal Pages
Update placeholder text in:
- •
app/privacy/page.tsx - •
app/tos/page.tsx
Replace [Your App Name] and [your-support-email] placeholders
4. Update Branding
Replace placeholder files:
- •
public/logo.svg- Your logo (150x150px) - •
public/og-image.png- Social image (1200x630px) - •
public/favicon.ico- Browser favicon
Web Worker & Performance Patterns
For heavy processing (large files, complex calculations), use Web Workers to keep UI responsive.
When to Use Web Workers
The boilerplate includes a Web Worker pattern in utils/appLogic.worker.ts:
// Small inputs: synchronous (fast, no UI blocking)
if (input.length < 1000) {
return processData(input);
}
// Large inputs: Web Worker (non-blocking)
return processAsync(input);Performance Best Practices
- • Use Web Workers to avoid blocking the UI
- • Add progress indicators for long operations
- • Set timeouts to prevent infinite loops
- • Validate input size before processing
What to Replace
utils/appLogic.ts- Replace with your core logicutils/appLogic.worker.ts- Replace or delete if not neededutils/licenseStorage.ts- Keep as-is (monetization system)