How faisalsayed10/firefiles works
1. The Landing App (apps/landing): This is the marketing/documentation side of the project, complete with components for features display, pricing, hero section, and documentation pages. It’s focused on showcasing the product, guidance, and support information.
2. The Web App (apps/web): This contains the core file-management functionality (for browsing, uploading, and managing files/folders) as well as API routes for handling authentication, file operations, bucket management, and integration with various storage providers. The presence of a Prisma schema (database migrations and schema.prisma) indicates a relational database backend used for storage and state management. Additionally, there are utility modules for file sorting, uploading, session management, and email sending.
Major components
• Frontend – Landing App (for public marketing, documentation, and static content)
• Frontend – Web App (for the main file management interface and user interactions)
• API Server – Next.js API endpoints handling authentication (login, logout, verify token), file operations (list files, upload, download, file metadata), bucket management, and drive mapping.
• Database – Managed via Prisma with migrations to set up tables for users, files, drives, etc.
• File Storage Providers – Integration layers for AWS S3, Firebase, Backblaze, Cloudflare, Scaleway, Wasabi, etc. (as seen from the pages and components handling these providers)
• Utility Services – Helper functions for email sending, file uploads (chunking, buffering), session handling, and rate limiting.
• External Services – Third‑party services for Email (SendGrid, Resend), Cloud Storage APIs, and possibly Discord and Twitter integrations shown in the README.
Out relationships and interactions
• The Landing App serves static pages and documentation and can route users to login or to the main dashboard.
• The Web App is the client side for authenticated users. It interacts with API endpoints for operations like login (auth APIs) and file management.
• The API layer communicates with the database (via Prisma) for storing user data, file metadata, and with various cloud provider APIs for file operations.
• Utility modules (e.g., for file uploads and email handling) are used across the system and form supporting services that plug into both the API and backend workflows.
• Third‑party integrations (e.g., AWS S3) are abstracted behind hooks and helper modules, ensuring that the Web App’s components (like drives, files, buckets) follow a modular design.
Architectural patterns/design principles
• Full‑stack separation into presentation (React components, landing pages) and logic (API endpoints, utilities).
• Modular organization: Different apps (landing and web) reflect separation of concerns between marketing/documentation and core application functionality.
• API-driven architecture where pages in Next.js function as endpoints for various operations.
• Use of hooks and shared utilities to maintain code modularity and reusability.
• Layered integration with external cloud storage providers allowing extensibility.
Incorporate relevant technologies
• Next.js for both frontend and API layer.
• React and TypeScript for UI development.
• Tailwind CSS (as seen with tailwind.config.js) for styling.
• Prisma for database modeling and migrations.
• Various provider-specific integration (e.g., AWS S3 support) and third‑party email services.