How realfascinated/paste works
Main Components
a. Frontend Layer:
• Next.js Application (Client-side)
• Pages/Routes structure (/app directory)
• Components hierarchy
• UI Components
• Providers (QueryProvider, PasteExpiryProvider)
b. Backend Layer:
• API Routes (/api directory)
• Authentication System
• Rate Limiting Service
• Filter System
• Database Layer (Prisma ORM)
Key Architectural Elements
Client Layer
• Public Routes
• Authentication Pages
• Paste View
• Dashboard
Middleware Layer
• Rate Limiting
• Authentication
• Request Filtering
API Layer
• Auth Routes
• Paste Management
• User Management
• Upload Handling
Data Layer
• Prisma ORM
• Database
Component Relationships
• Client-to-API communication
• Authentication flow
• Data flow between components
• Integration points with external services
Technical Details to Highlight
• Next.js App Router architecture
• API route structure
• Database migrations
• Authentication implementation
• Rate limiting mechanism
• Content filtering system
Implementation Notes
• The separation between public and authenticated routes
• The role of middleware in request processing
• How the paste service handles different types of requests
• Integration of syntax highlighting and paste expiration
• User dashboard functionality
• Security measures (rate limiting, filtering)
Additional Elements
Annotations for:
• Environment configuration
• Docker deployment structure
• Database migration flow
• API endpoints and their purposes
This system design should reflect the modern web application architecture while highlighting the specific features of the paste service, such as syntax highlighting, paste expiration, and content filtering.