| π― Focus | ποΈ Architecture | π€ AI Integration | π§ͺ Testing |
|---|---|---|---|
| Full-Stack Development | Multi-Tenant Systems | OpenAI GPT-4 | 100% Test Coverage |
| Enterprise Solutions | Real-time Features | Realtime API | E2E Testing |
| Polish Language Learning | Secure API Gateway | Stream Chat | TypeScript |
I am a Full-Stack Developer specializing in enterprise AI solutions and multi-tenant applications.
π― My Expertise:
- Modern Web Technologies - Next.js 16, React 19, TypeScript 5.9
- AI Integration - OpenAI GPT-4, Realtime API, Whisper, TTS, custom prompts
- Enterprise Architecture - Multi-tenant systems, secure APIs, payment processing
- Polish Language Learning - Combined technical & linguistic expertise with 20+ interactive learning modules
π Current Project: PoliLex - A sophisticated AI-powered language learning platform demonstrating enterprise-level architecture, multi-tenancy, real-time AI integration, and production-ready DevOps practices.
| Category | Technology / Tools | Purpose |
|---|---|---|
| Frontend | Next.js 16, React 19 | Core application shell and interactive UI |
| TypeScript 5.9 | Type-safe client-side development | |
| Tailwind CSS 4, ShadCN | Design system, layout, and reusable UI components | |
| Lexical Editor, Framer Motion | Rich authoring experience and high-quality motion | |
| Backend & Infrastructure | Prisma 7, PostgreSQL, Supabase | Type-safe data access and relational persistence |
| Clerk Auth, Polar, Stream Chat, Redis | Authentication, payments, real-time messaging, cache | |
| Testing & Quality | Jest, React Testing Library | Unit and integration coverage for components & logic |
| Playwright | End-to-end browser regression on critical journeys | |
| k6, Artillery | Load and performance validation for APIs and flows | |
| TypeScript (strict), Prisma, Zod, @t3-oss/env-nextjs | Static typing and schema validation across the stack | |
| ESLint, Prettier, import-sorting plugins | Automated linting, formatting, and code consistency | |
| AI & Integrations | OpenAI GPT-4, DALL-E 3 | Language processing and image generation |
| OpenAI Realtime API, Whisper API, OpenAI TTS | Real-time voice, speech-to-text, and text-to-speech | |
| Tambo AI | Conversational AI with persistent threads | |
| Stream Chat | Real-time chat and collaboration |
- Authentication & Database Integration - Sophisticated user management with role-based access control
- Company portals with isolated data and secure tenant boundaries
- Multi-Organization Support - Seamless switching between different company portals
- Permission Management - Granular access control for teachers, students, and admins
- Data Isolation - Company-specific data segregation with secure tenant boundaries
- Zuplo API Gateway - Secure API management, rate limiting, and enterprise-grade security
- Enterprise Security - Role-based access control & secure authentication
- Performance Optimized - SSR, edge caching, optimized database queries
- Comprehensive Testing - Unit, integration, and E2E test coverage
- GPT-4 Integration - Personalized instruction and content generation
- OpenAI Realtime API - Voice conversations with real-time streaming responses
- Whisper API - Audio transcription for podcasts and video content
- Text-to-Speech (TTS) - AI-generated audio pronunciation
- Stream Chat - Real-time messaging with Firebase push notifications (see dedicated section below)
- Tambo AI Chat Integration - Advanced conversational AI with thread-based persistence, custom interactive components, and integrated token-based costing system (see dedicated section below)
- Custom AI Prompts - Specialized language learning prompts and instructions
Grammar Labs:
- Aspect Master - Verb aspect practice with quizzes, challenges, and timeline visualization
- Reflexive Lab - Reflexive verb journeys with categories and templates
- Preposition Lab - Interactive preposition challenges with case governance
- Motion Lab - Verbs of motion (unidirectional/multidirectional pairs)
- Verb Prefixes - Perfective prefix forms and transformations
- Conjugator - Interactive Kanban board for verb conjugation practice
Vocabulary & Practice:
- Counting - Grammatical cases through counting 1-21 with contextual examples
- Adjectives - Comparative forms and interactive exercises
- Adverbs - Comparative and superlative forms practice
- Nouns - Auto-generated flashcards with translations
- Occupations - 5 interactive games (Flashcards, Quiz, Memory, Drag & Drop, Sentence Builder)
- Word Wizard - AI-assisted vocabulary building with audio pronunciation
- Flashcards - Customizable flashcards with example sentences
- Cases - Grammatical case mastery through fill-in-the-blank exercises
- Days & Months - Temporal vocabulary practice
- Genealogy - Interactive family tree drag-and-drop game
Interactive Content:
- Lexical Editor - Rich text editing with collaborative features
- PDF Processing - Document processing and annotation
- Portable Documents - PDF viewer with highlighting capabilities
- Podcasts - Audio content with transcription
- Videos - Video learning with interactive features
- Audio Transcript - Speech-to-text processing
Community & Social:
- Real-time Chat - Stream Chat with FCM push notifications (see dedicated section)
- Memory Games - Polish language memory recall activities
- Jira Integration - Project management and task tracking
- Company Portals - Multi-tenant learning environments with blogs, videos, and PDFs
Source of Truth:
- Database-Driven Pricing - Centralized database table serves as the single source of truth for all OpenAI model costs
- Manual Admin Management - Pricing is manually updated by administrators through a secure admin interface (no automated scraping or external API dependencies)
- Performance Optimization - Server-side pricing cached with configurable TTL for optimal performance, with immediate cache invalidation after updates
- Resilience - Fallback pricing values available if database is temporarily unavailable (with appropriate logging and warnings)
Security Practices:
- Defense in Depth - Multi-layer security approach combining application-level authorization checks with database-level access controls
- Row-Level Security - Database policies enforce role-based access control, ensuring only authorized administrators can modify pricing data
- Read Access - Authenticated users can read active pricing information required for cost calculations
- Write Access - Strictly limited to authorized administrators through verified authentication mechanisms
- Secure Initialization - Seed scripts use secure service-level connections for initial data population
- Token-Based Authorization - Admin privileges verified through secure token claims validated at both application and database layers
- Rich Text Editing - Full-featured Lexical editor with markdown support, tables, lists, and formatting
- YouTube Integration - Embed YouTube videos directly in editor content with resizable player controls
- Audio/Podcast Integration - Seamless audio embedding with Supabase storage integration
- Audio playback controls with custom player interface
- Podcast image support with signed URL generation
- Audio transcription workflow integration
- Video Content Creation - Link videos to editor content for bilingual text generation
- Speech-to-Text - Built-in speech recognition plugin for voice input
- Auto-Embed Plugin - Automatic detection and embedding of YouTube URLs
- Collaborative Features - Real-time editing capabilities with history tracking
- Export Capabilities - Export editor content to blog posts and learning materials
- Dedicated Company Portals - Isolated multi-tenant environments for each teaching organization
- Blog Management System - Full-featured blog with Lexical editor integration
- Rich text blog posts with embedded media
- Tag-based categorization and filtering
- Comments and reactions system
- Nested comment threads with real-time updates
- Author profiles and post attribution
- Draft and published post status management
- Video Library Management - Comprehensive video content system
- YouTube video integration with metadata
- Difficulty level categorization (A1-C2)
- Category organization (Grammar, Vocabulary, Pronunciation, etc.)
- Bilingual text support (Polish/English)
- Video transcription and summaries
- Thumbnail and duration tracking
- Publishing workflow
- Resource Management - Centralized content hub
- PDF document management
- Resource organization by company
- Access control and permissions
- Dashboard Analytics - Company-specific insights and user management
- Multi-User Support - Role-based access for teachers, admins, and students
- Tenant Isolation - Secure data segregation between different companies
Migrated from Stripe to Polar for international tax compliance and simplified global operations. Polar acts as Merchant of Record, handling VAT, GST, and sales tax obligations across 100+ countriesβeliminating the operational burden and legal exposure that Stripe leaves to merchants when selling internationally.
Business Value:
- β Automatic Tax Compliance β Polar calculates, collects, and remits taxes globally
- β Merchant of Record β Polar assumes tax liability as the legal seller
- β Zero Tax Registration β Sell worldwide without jurisdiction-specific registrations
- β Simplified Operations β Single integration, worldwide coverage, reduced overhead
Design Principles:
- Financial Software Standards β Zero tolerance for bugs where money is involved; 87% test coverage with 140 comprehensive tests
- Idempotency Guarantees β All operations use deterministic keys (SHA-256); safe retries without duplicate charges
- Fail-Open Design β System continues processing during transient failures; no legitimate transactions blocked
- Event-Driven Processing β Asynchronous webhook handlers with in-memory deduplication (O(1) lookup)
| Component | Implementation |
|---|---|
| API Integration | Singleton client with exponential backoff retry (3 attempts, jitter) |
| Security Layer | Multi-layer validation (Zod schemas + business logic allowlists) |
| Webhook Processing | HMAC signature verification with idempotent event handling |
| Error Handling | Sanitized user messages; internal details never exposed |
| State Synchronization | Real-time sync between database, Clerk metadata, and Zustand store |
Architecture:
- Subscription Tokens (
tokenBalance) β Monthly allocation, resets on renewal (e.g., 1,000 for Pro, 2,500 for Premium) - Top-up Tokens (
topupTokenBalance) β Purchased tokens, persist indefinitely - Spending Priority β Subscription tokens consumed first (monthly reset), then top-up tokens (never expire)
- Balance Preservation β Subscription changes preserve purchased tokens via pure calculation:
newBalance = newCredits + max(0, currentTotal - oldCredits)
Example: User with 1,500 tokens (1,000 subscription + 500 purchased) upgrades to 2,500-credit plan β Final balance: 3,000 tokens (2,500 new subscription + 500 preserved top-up)
- Multi-Layer Validation β Zod UUID format check β Business logic allowlist β Runtime authorization
- Webhook Security β HMAC signature verification on all payloads before processing
- Authentication Enforcement β Clerk authentication required for all server actions; automatic sign-in redirects
- Error Sanitization β User-facing messages sanitized through
getUserErrorMessage(); no internal details exposed - Audit Trail β All balance mutations recorded with transaction IDs for reconciliation and compliance
8 Event Types Processed:
| Event | Action |
|---|---|
subscription.active |
Allocate tier credits, update plan ID, sync Clerk metadata |
subscription.updated |
Recalculate balance preserving top-ups, handle plan changes |
subscription.canceled |
Downgrade to free tier at period end |
subscription.revoked |
Immediate downgrade, clear subscription fields |
order.paid |
Process one-time purchases, increment purchased balance |
order.refunded |
Deduct refunded tokens, create audit record |
subscription.past_due |
Payment failed flag, UI warning banner with update link |
subscription.uncanceled |
Restore subscription, clear payment warnings |
- 140 Comprehensive Tests β 87% code coverage across all payment logic
- Financial Standards β Zero tolerance for test failures; all edge cases and error paths verified
- Idempotency Testing β Duplicate webhook delivery, race conditions, concurrent updates
- Security Testing β Product ID manipulation, authentication bypass, signature tampering
- Integration Testing β Full payment flows from checkout to token allocation
Modern form architecture leveraging React 19 hooks and Next.js 16 server actions for optimal DX and performance.
| Component | Responsibility | Pattern |
|---|---|---|
| Client-Side State | Form validation & user interaction | React Hook Form with Zod resolver |
| Server Actions | Data mutations & persistence | Next.js 16 action prop with FormData API |
| State Management | Server response handling | useActionState for declarative state |
| Event Handlers | Stable callbacks without deps | useEffectEvent for effect event handlers |
| Field Watching | Reactive form updates | useWatch for optimized re-renders |
| Context Architecture | Complex form state sharing | Provider pattern with memoized context values |
- Progressive Enhancement β Forms work without JavaScript using native
FormDatasubmission, enhanced with client-side validation when available - Type-Safe Validation β Dual-layer Zod schema validation (client-side React Hook Form + server-side
safeParse) ensures data integrity at every boundary - Optimized Re-renders β
useWatchreplacesform.watch()for granular field subscriptions, eliminating unnecessary component updates - Stable Event Handlers β React 19's
useEffectEventprovides dependency-free callbacks for effect handlers, removing dependency array confusion - Data-Driven Rendering β Configuration objects with
map()eliminate JSX repetition while maintaining type safety and readability
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 1. User submits form β <form action={formAction}> β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 2. Client-side validation β React Hook Form + Zod β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 3. FormData serialization β Native browser behavior β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 4. Server action invoked β useActionState manages pending β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 5. Server-side validation β Zod safeParse with structured β
β error responses β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 6. Database mutation β Prisma with RLS policies β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 7. Response handling β useEffectEvent for success/error β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Context-Based Complex Forms β
VerbAttributesFormuses provider pattern to share state across nested components without prop drilling - Field-Level Subscriptions β Single
useWatchcall for multiple fields, maintaining React Hook Form's optimization benefits - Structured Error Handling β Server actions return typed
ActionState<T>with success/error/data discriminated unions - Test Coverage β Forms tested with
data-testidattributes (never text content), ensuring reliable test stability across i18n and content changes
// Server Action with safeParse validation
export async function submitFormAction(
prevState: ActionState<DataType>,
formData: FormData,
): Promise<ActionState<DataType>> {
const result = schema.safeParse(Object.fromEntries(formData));
if (!result.success) {
return { success: false, errors: result.error.flatten().fieldErrors };
}
// ... database mutation
return { success: true, data: createdRecord };
}
// Client Component
const [actionState, formAction, isPending] = useActionState(
submitFormAction,
initialState,
);
const watched = useWatch({ control: form.control }); // Single subscription
const handleSuccess = useEffectEvent(() => {
toast({ title: 'Success!' });
onSuccess?.();
}); // No dependency array needed!
useEffect(() => {
if (actionState.success) handleSuccess();
}, [actionState.success]);A sophisticated AI tutoring system powered by Tambo SDK, providing personalized Polish language instruction with full conversation persistence and custom interactive learning components.
| Component | Responsibility | Pattern |
|---|---|---|
| TamboProvider | SDK initialization & thread context | React Context with auth token injection |
| Thread Persistence | Conversation state management | localStorage + PostgreSQL hybrid storage |
| Message Streaming | Real-time AI response delivery | Server-Sent Events with generation stages |
| Component Registry | Dynamic UI rendering from AI | Zod-validated props with component mapping |
| Tool Registry | AI function calling capabilities | Type-safe tool definitions with input schemas |
| Token Charging | Usage-based billing integration | Pre-charge with actual usage reconciliation |
- Thread-Based Conversations β Full conversation history preserved across sessions with automatic restoration on page load
- Lab-Specific Context β AI tutor adapts to current learning module (Aspect Master, Reflexive Lab, Preposition Lab, etc.)
- Custom Interactive Components β AI can render learning-specific UI:
LearningHintCardβ Contextual tips with difficulty levels and examplesExerciseGeneratorβ Interactive quizzes with real Polish contentProgressVisualizationβ Learning analytics with charts and statistics
- Thread Management β Archive conversations with titles/subtitles, restore previous threads, delete old conversations
- Message Limits β Configurable per-thread message caps with graceful degradation
- Token-Based Costing β Integrated with platform credit system, pre-authorization with actual usage tracking
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AITutorAssistant β
β βββ TamboProvider (SDK Context) β
β β βββ useTamboThread (conversation state) β
β β βββ useTamboThreadInput (message handling) β
β βββ ChatHeader β
β β βββ ThreadSelector (dropdown with archived threads) β
β β βββ ThreadArchiveForm (save with title/subtitle) β
β βββ MessageList β
β β βββ MessageItem (user/assistant messages) β
β β βββ MarkdownRenderer (formatted responses) β
β β βββ LoadingIndicator (streaming state) β
β βββ ChatInput (textarea with send button) β
β βββ QuickSuggestions (one-click prompts) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Thread Creation & Persistence Flow β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 1. User opens lab β Check localStorage for saved threadId β
β 2. If found β Restore thread with retry logic (3 attempts) β
β 3. If not β Create new thread on first message β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 4. Messages sent β Real-time streaming response β
β 5. Thread auto-saved β localStorage + database sync β
β 6. Message count tracked β Update database periodically β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 7. User archives β Save title/subtitle, mark as archived β
β 8. New thread created β localStorage cleared, fresh start β
β 9. User can restore β Select from dropdown, switch thread β
β 10. User can delete β Permanent removal from database β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Hook | Purpose |
|---|---|
useThreadPersistence |
localStorage management, thread ID tracking, restore |
useThreadDatabase |
Background sync of thread metadata to PostgreSQL |
useActualUsageLogging |
Token usage tracking after AI response completion |
The AI can dynamically render interactive learning components by returning structured JSON:
// AI returns component specification
{
"component": "ExerciseGenerator",
"props": {
"title": "Verb Aspect Practice",
"exercises": [
{
"question": "Wczoraj _____ (czytaΔ/przeczytaΔ) ksiΔ
ΕΌkΔ przez caΕy dzieΕ.",
"options": ["czytaΕem", "przeczytaΕem", "czytam"],
"correctAnswer": "czytaΕem",
"explanation": "Use imperfective 'czytaΕem' for duration"
}
]
}
}
// Component registry maps to React component with Zod validation
const tamboComponents = [
{ name: 'ExerciseGenerator', component: ExerciseGenerator, propsSchema: exerciseGeneratorSchema },
{ name: 'LearningHintCard', component: LearningHintCard, propsSchema: learningHintCardSchema },
{ name: 'ProgressVisualization', component: ProgressVisualization, propsSchema: progressVisualizationSchema }
];model TamboThread {
id String @id @default(cuid())
userId String
labContext String -- "aspect-master", "reflexive-lab", etc.
threadId String -- Tambo SDK thread identifier
title String? -- User-provided archive title
subtitle String? -- Optional description
isCurrent Boolean @default(true)
isArchived Boolean @default(false)
messageCount Int @default(0)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
archivedAt DateTime?
@@unique([userId, labContext, threadId])
}- 122+ tests covering Tambo components and integration
- Component isolation β Each UI component tested independently with mocked Tambo hooks
- Integration tests β Full AITutorAssistant flow with mocked SDK responses
- Server action tests β Thread CRUD operations with Prisma mocking
A production-grade real-time chat system built on Stream Chat SDK with Firebase Cloud Messaging (FCM) integration for reliable push notifications across web, Android, and iOS.
| Component | Responsibility | Pattern |
|---|---|---|
| Stream Chat Client | Real-time messaging & channel management | Singleton with Clerk authentication |
| Firebase Messaging | Push notification delivery | FCM with service worker background handling |
| Push Template API | Server-side notification configuration | Stream Chat Push v3 with Handlebars templates |
| Device Registration | FCM token management with Stream | addDevice()/removeDevice() with localStorage |
| Service Worker | Background notification handling | Firebase Messaging SW with message listener |
| Company Isolation | Multi-tenant user filtering | Clerk ID validation with company-scoped queries |
- Multi-Tenant Messaging β Users can only chat with members of their organization through Clerk ID validation and company-scoped user queries
- Real-Time Updates β Instant message delivery with typing indicators, read receipts, and presence status via Stream Chat WebSocket
- Channel Management β Create, archive, and restore conversation channels with persistent state across sessions
- Per-Channel Muting β Users can mute specific channels while maintaining global notification settings
- Responsive Design β Adaptive sidebar/channel layout with mobile-first breakpoint management
- Internationalization β Polish language support with custom translations via Streami18n
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Push Notification Flow (Stream Chat Push v3 + Firebase) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 1. User enables notifications β Browser permission request β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 2. Permission granted β Firebase SDK requests FCM token β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 3. FCM token obtained β Register with Stream Chat β
β via client.addDevice(token, 'firebase', userId) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 4. Push template configured β Stream API receives template β
β with platform-specific notification payloads β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 5. New message event β Stream sends to Firebase servers β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 6. Firebase delivers β Service worker receives & displays β
β notification even when app is backgrounded/closed β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Stream Chat Push v3 uses Handlebars-style templates for customizable notifications:
{
"data": {
"version": "v2",
"sender": "stream.chat",
"type": "{{ event_type }}",
"channel_id": "{{ channel.id }}",
"message_id": "{{ message.id }}"
},
"android": {
"priority": "high",
"notification": {
"title": "{{ sender.name }}",
"body": "{{ truncate message.text 150 }}",
"sound": "default"
}
},
"webpush": {
"notification": {
"title": "{{ sender.name }}",
"body": "{{ truncate message.text 150 }}",
"icon": "{{ sender.image }}"
},
"fcm_options": { "link": "/chat" }
},
"apns": {
"payload": {
"aps": {
"alert": {
"title": "New message from {{ sender.name }}",
"body": "{{ truncate message.text 150 }}"
},
"badge": "{{ unread_count }}",
"sound": "default"
}
}
}
}βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ChatPage β
β βββ Chat (Stream Chat Provider) β
β β βββ ChannelIdHandler (deep-link support) β
β β βββ ChannelRestorer (session persistence) β
β β βββ ChatSidebar β
β β β βββ ChannelList (filterable channel list) β
β β β βββ UserSearch (company-scoped user discovery) β
β β βββ ChatChannel β
β β βββ Menubar β
β β β βββ ThemeToggle β
β β β βββ PushSubscriptionToggleButton β
β β βββ CustomChannelHeader β
β β β βββ ChannelNotificationToggle (per-channel) β
β β βββ MessageList β
β β βββ MessageInput β
β βββ usePushNotifications (FCM hook) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Security Layer | Implementation |
|---|---|
| User Authentication | Clerk-issued tokens validated on both client and server |
| Company Isolation | Clerk ID format validation (user_[a-zA-Z0-9_]+) |
| Device Token Management | FCM tokens stored locally, registered server-side only |
| Push Template Auth | Server action with auth() guard before Stream API calls |
| Channel Access Control | Stream Chat channel membership enforced at SDK level |
The usePushNotifications hook manages the complete FCM lifecycle:
interface UsePushNotificationsReturn {
isSupported: boolean; // Browser supports notifications & Firebase configured
isEnabled: boolean; // User granted permission
isLoading: boolean; // Operation in progress
error: string | null; // Last error message
enablePushNotifications: () => Promise<boolean>;
disablePushNotifications: () => Promise<boolean>;
}
// Key responsibilities:
// 1. Check browser support & Firebase configuration
// 2. Register Firebase service worker
// 3. Request notification permission
// 4. Obtain and cache FCM token
// 5. Register/unregister device with Stream Chat
// 6. Auto-register on client reconnectionThe Firebase Messaging service worker handles background notifications:
// firebase-messaging-sw.js
importScripts('firebase/firebase-app-compat.js');
importScripts('firebase/firebase-messaging-compat.js');
// Receive config from main app via postMessage
self.addEventListener('message', (event) => {
if (event.data?.type === 'FIREBASE_CONFIG') {
firebase.initializeApp(event.data.config);
const messaging = firebase.messaging();
messaging.onBackgroundMessage((payload) => {
const { title, body, icon } = payload.notification;
self.registration.showNotification(title, { body, icon });
});
}
});PoliLex is validated with a full testing pipeline that combines automated tests, static analysis, and load testing.
Every change is validated through:
- Automated unit and integration suites using Jest and React Testing Library for components and business logic
- End-to-end regression tests with Playwright for critical user journeys in the browser
- Load and performance exercises with k6 and Artillery focused on core APIs, server-side operations, and caching behavior
- Strict static typing and schema validation with TypeScript (strict mode), Prisma, Zod, and @t3-oss/env-nextjs for data, inputs, and configuration
- Automated linting and formatting with ESLint, Prettier, and import-sorting to enforce consistent, production-grade code quality
| Education | Training | Specialization |
| Boolean UK Graduate Full-stack development fundamentals |
JS Mastery Graduate (Feb 2024) - Advanced React & Next.js Masterclass |
Polish Language Enthusiast Combined technical expertise with language learning |

