How refaelbenzvi24/cs-skins works
Main Components
a. Applications Layer:
• Next.js Web Application (apps/nextjs)
• Expo Mobile Application (apps/expo)
• Cronjobs Service (apps/cronjobs)
• Scraper Service (apps/scraper)
• Email Templates Preview (apps/email-templates-preview)
b. Shared Packages Layer:
• API Package (@trpc router definitions)
• Authentication Package (next-auth integration)
• Database Package (Prisma/PostgreSQL)
• UI Components Package
• Message Broker Package
• Validation Package
• Logger Package
c. Infrastructure Layer:
• Database (PostgreSQL)
• Message Queue System
• Elastic APM (for monitoring)
• Email Service
Relationships and Data Flow
• API calls between applications and the shared API package
• Database interactions through the db package
• Authentication flow through the auth package
• Message flow through the message broker
• UI component usage in applications
• Monitoring and logging paths
Specific Implementation Details
a. Next.js Application:
• TRPC router integration
• I18n implementation (locales)
• Authentication flow
• UI components usage
b. Expo Application:
• Mobile-specific features
• Shared API integration
• Native navigation flow
c. Background Services:
• Cronjob scheduling
• Scraper data flow
• Email template processing
Additional Elements
Specialized sections for:
• Development Tools (Turborepo, ESLint, Prettier)
• Deployment Paths (Vercel, EAS)
• Testing Infrastructure
• CI/CD Pipeline
Notes Section
Annotations for:
• Scale considerations
• Security implementations
• Performance optimizations
• Development workflows
Remember to emphasize the type-safety aspects across the stack and how the various tools (tRPC, Prisma, TypeScript) work together to ensure end-to-end type safety.