Advertisement
dudehost

TYCS Project

Mar 23rd, 2025
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.50 KB | None | 0 0
  1. ### INTRODUCTION
  2.  
  3. #### 1. Introduction to System
  4. The Temporary/Disposable Email System is a sophisticated web application developed to address the growing need for privacy and spam protection in digital communication. Designed as a final-year college project, it leverages PHP with the Laravel framework to create a robust platform where users can generate disposable email addresses—either random or personalized—for short-term use. These email addresses serve as a shield against unwanted spam, phishing attempts, and privacy intrusions that often accompany online registrations or downloads. Unlike traditional email services, this system ensures that email addresses self-destruct after a predefined period, leaving no permanent trace.
  5.  
  6. The project was deployed on Hetzner Cloud, utilizing cPanel virtualization to simulate a production environment. This deployment enabled real-time email functionality, a critical feature unavailable in localhost testing. The system comprises two primary interfaces: the user side, where individuals access temporary email services, and the admin side, which provides comprehensive tools for system management, including traffic analytics, domain administration, and spam oversight. The use of modern web technologies like PHP, CSS (with modern techniques), Bootstrap, HTML, JavaScript, and XML ensures a seamless and responsive experience.
  7.  
  8. This system stands out by offering multi-domain email support, IP tracking, and customizable pages, making it versatile for both individual users and administrators. It reflects a practical application of web development principles while addressing real-world challenges like privacy and spam management.
  9.  
  10. #### 2. Scope of the System
  11. The scope of the Temporary/Disposable Email System is multifaceted, catering to both end-users and administrators with distinct functionalities. For users, the system provides the ability to generate random email addresses (e.g., `[email protected]`) or personalized ones (e.g., `[email protected]`), which can receive emails for a limited duration—typically 10 minutes to 24 hours, depending on configuration. These emails can be used for tasks like signing up for websites, downloading files, or verifying accounts without exposing personal email addresses.
  12.  
  13. On the admin side, the scope extends to system oversight and enhancement. Administrators can access a dashboard with graphical statistics on traffic (e.g., number of emails generated, active inboxes), manage an email server by adding new domains (e.g., `tempdomain2.com`), and monitor email logs to track user activity and detect spam. Additional features include fetching user IPs via server hostname, blocking/unblocking IPs to prevent abuse, and creating custom pages (e.g., "About Us," "Contact Us") for informational purposes.
  14.  
  15. The system is scoped to operate efficiently in a production environment like Hetzner Cloud, ensuring scalability for increased user demand. However, it excludes long-term email storage, advanced encryption, or integration with third-party APIs due to its focus on disposability and simplicity. Future iterations could expand this scope, but the current version balances functionality with academic constraints.
  16.  
  17. ---
  18.  
  19. ### TOOL INFORMATION
  20.  
  21. #### 1. Front End Tool
  22. The front-end of the system is built using a combination of modern web technologies to ensure usability, responsiveness, and aesthetic appeal:
  23. - **HTML**: Forms the structural backbone, defining elements like email generation forms, inbox displays, and admin dashboards. For example, `<form action="/generate-email" method="POST">` handles user requests.
  24. - **CSS (Modern CSS)**: Enhances visual design with techniques like Flexbox (`display: flex`) for layout alignment and CSS Grid (`display: grid`) for responsive tables. Custom styles ensure the interface adapts to various screen sizes.
  25. - **Bootstrap**: Provides pre-designed components (e.g., navigation bars, modals) via classes like `btn-primary` or `navbar-expand-lg`. This accelerates development and ensures consistency across devices.
  26. - **JavaScript (JS)**: Adds interactivity, such as fetching inbox updates via AJAX calls (`fetch('/inbox')`) or validating user inputs in real time. For instance, a script might refresh the inbox every 5 seconds.
  27. - **XML**: Used to create a sitemap (`sitemap.xml`) listing key pages (e.g., `/`, `/generate-email`, `/admin`), aiding search engine indexing and navigation.
  28.  
  29. These tools collectively deliver a polished, user-centric interface optimized for both desktop and mobile users.
  30.  
  31. #### 2. Back End Tool
  32. The back-end powers the system’s core logic and data management, relying on the following:
  33. - **PHP with Laravel Framework**: PHP 8.x drives server-side operations, while Laravel 10.x provides a structured MVC (Model-View-Controller) architecture. Features like routing (`Route::get('/generate-email', [EmailController::class, 'generate'])`), Eloquent ORM for database queries (`Email::create([...])`), and Blade templating (`@yield('content')`) streamline development. Laravel’s artisan commands (`php artisan make:model`) also simplify scaffolding.
  34. - **Hetzner Cloud (cPanel)**: The hosting platform offers a Linux-based virtualized environment with cPanel for managing domains, email servers, and deployments. It supports SMTP/POP3 configurations critical for email functionality, unlike localhost’s limitations.
  35. - **MySQL**: The assumed database (common with Laravel) stores email logs (`email_logs` table: `id`, `email_id`, `user_ip`, `timestamp`), domain configurations (`domains` table: `id`, `name`, `status`), and admin settings. Queries like `SELECT * FROM email_logs WHERE timestamp > NOW() - INTERVAL 1 DAY` enable log analysis.
  36.  
  37. This back-end stack ensures robust performance, scalability, and maintainability, aligning with the project’s production goals.
  38.  
  39. ---
  40.  
  41. ### ANALYSIS
  42.  
  43. #### 1. Feasibility Study
  44. A thorough feasibility study was conducted to validate the project’s viability across multiple dimensions:
  45. - **Technical Feasibility**: The system uses well-documented, open-source tools (PHP, Laravel, MySQL) supported by a vast developer community. Deployment on Hetzner Cloud with cPanel confirms compatibility with live email servers. Challenges like SMTP setup were resolved using Laravel’s `Mail` facade (`Mail::to($email)->send()`).
  46. - **Economic Feasibility**: Costs were minimized by leveraging free tools (Laravel, Bootstrap) and affordable hosting (Hetzner Cloud’s basic plan: ~$5/month). No premium software licenses were required, making it budget-friendly for a student project.
  47. - **Operational Feasibility**: The intuitive user interface (e.g., “Generate Email” button) and admin controls (e.g., graphical dashboard) ensure ease of use. Training needs are minimal, as features mimic familiar email services.
  48. - **Schedule Feasibility**: Development spanned 4 months, with milestones like front-end design (1 month), back-end logic (1.5 months), and deployment/testing (1.5 months). The timeline aligned with academic deadlines.
  49.  
  50. The study confirmed the project’s practicality within available resources and constraints.
  51.  
  52. #### 2. Fact Finding Technique
  53. Gathering requirements involved multiple techniques:
  54. - **Research**: Analyzed competitors like Temp-Mail and Guerrilla Mail, noting features (random emails, short lifespan) and gaps (limited admin tools). Documentation from Laravel and Hetzner Cloud guided implementation.
  55. - **Observation**: Monitored user behavior on forums like Reddit, identifying privacy concerns (e.g., “I hate spam from sign-ups”) as a key driver.
  56. - **Prototyping**: Built a localhost prototype to test email generation and inbox display, then shifted to Hetzner Cloud to validate email reception (e.g., sending test emails from Gmail).
  57. - **Interviews**: Consulted peers for feedback on usability (“Make the inbox refresh faster”) and mentors for technical advice (“Use Laravel’s queuing for email tasks”).
  58.  
  59. These methods shaped a system tailored to user needs and technical feasibility.
  60.  
  61. ---
  62.  
  63. ### SOFTWARE AND HARDWARE REQUIREMENT
  64.  
  65. #### Software Requirements
  66. - **Operating System**: Linux (Hetzner Cloud default) with cPanel for server management.
  67. - **Web Server**: Apache 2.4 with mod_rewrite enabled for Laravel routing.
  68. - **Programming Languages**: PHP 8.1 (with extensions like `mbstring`, `openssl`), JavaScript (ES6+).
  69. - **Framework**: Laravel 10.x with Composer for dependency management (`composer install`).
  70. - **Database**: MySQL 8.0 for structured data storage.
  71. - **Browser**: Chrome 110+, Firefox 108+ for optimal rendering.
  72. - **Development Tools**: VS Code (with PHP Intelephense), Git (for version control: `git commit -m "Add email logs"`), Postman (for API testing).
  73.  
  74. #### Hardware Requirements
  75. - **Server**: Hetzner Cloud CX11 instance (1 vCPU, 2GB RAM, 20GB SSD) for initial deployment; scalable to CX21 (2 vCPUs, 4GB RAM) for higher traffic.
  76. - **Client**: Any device (e.g., laptop with 4GB RAM, 1GHz CPU) with internet access.
  77. - **Network**: Minimum 10Mbps connection for email server latency; Hetzner’s 1Gbps uplink ensures performance.
  78.  
  79. These specifications support a functional, scalable deployment.
  80.  
  81. ---
  82.  
  83. ### SYSTEM DESIGN
  84.  
  85. #### 1. Use Case Diagram
  86. - **Actors**: User, Admin.
  87. - **Use Cases**:
  88. - **User**:
  89. - Generate Random Email: User clicks “Generate” to get `[email protected]`.
  90. - Create Personalized Email: User inputs “john” for `[email protected]`.
  91. - View Inbox: User sees emails in a table format.
  92. - **Admin**:
  93. - View Dashboard Stats: Displays graphs (e.g., emails/hour).
  94. - Manage Domains: Adds `newdomain.com` to the pool.
  95. - Monitor Email Logs: Views logs with filters (e.g., by IP).
  96. - Block/Unblock IPs: Toggles access for `192.168.1.1`.
  97. - Create Custom Pages: Adds “FAQ” page with content.
  98.  
  99. #### 2. Sequence Diagram
  100. - **User Generating Email**:
  101. 1. User clicks “Generate Email.”
  102. 2. Browser sends POST request to `/generate-email`.
  103. 3. Laravel controller (`EmailController`) generates `[email protected]`.
  104. 4. Server assigns temporary inbox via database.
  105. 5. Response returns email ID to browser.
  106. 6. User views inbox with AJAX (`/[email protected]`).
  107. - **Admin Blocking IP**:
  108. 1. Admin logs in, navigates to “Logs.”
  109. 2. System fetches logs (`SELECT * FROM email_logs`).
  110. 3. Admin selects IP `192.168.1.1` and clicks “Block.”
  111. 4. Controller updates `blocked_ips` table.
  112. 5. System restricts future requests from IP.
  113.  
  114. #### 3. Activity Diagram
  115. - **User Flow**:
  116. 1. Start → Visit `/` → Select “Random” or “Personalized” → Input name (if personalized) → Click “Generate” → Email created → View inbox → Use email → Email expires → End.
  117. - **Admin Flow**:
  118. 1. Login → Dashboard → Choose action (Stats/Domains/Logs/Pages) → Add domain OR Block IP OR Create page → Confirm changes → Logout.
  119.  
  120. #### 4. Class Diagram
  121. - **Classes**:
  122. - `UserEmail`:
  123. - Attributes: `emailID (string)`, `type (random/personalized)`, `creationTime (datetime)`, `expiryTime (datetime)`.
  124. - Methods: `generateEmail()`, `fetchInbox()`.
  125. - `Admin`:
  126. - Attributes: `adminID (int)`, `password (string)`.
  127. - Methods: `viewStats()`, `manageDomains()`, `blockIP()`.
  128. - `Domain`:
  129. - Attributes: `domainName (string)`, `status (active/inactive)`.
  130. - Methods: `addDomain()`, `removeDomain()`.
  131. - `Log`:
  132. - Attributes: `emailID (string)`, `userIP (string)`, `timestamp (datetime)`.
  133. - Methods: `recordLog()`, `fetchLogs()`.
  134.  
  135. ---
  136.  
  137. ### ADVANTAGES AND LIMITATIONS
  138.  
  139. #### Advantages
  140. - **Privacy Protection**: Shields users from spam and tracking with disposable emails.
  141. - **Customization**: Offers random and personalized email options.
  142. - **Admin Oversight**: Detailed logs and IP controls enhance security.
  143. - **Scalability**: Hetzner Cloud deployment supports growth.
  144. - **Real-Time Functionality**: Live email server ensures practical use.
  145.  
  146. #### Limitations
  147. - **No Persistence**: Emails vanish after expiry, unsuitable for long-term needs.
  148. - **Server Dependency**: Requires hosting for email functionality.
  149. - **Privacy Trade-Off**: Admin access to logs could be misused.
  150. - **Resource Constraints**: Limited hosting may bottleneck under heavy load.
  151.  
  152. ---
  153.  
  154. ### FUTURE ENHANCEMENT
  155. - **Encryption**: Implement TLS for secure email transmission.
  156. - **Mobile App**: Build an Android/iOS app using Flutter.
  157. - **AI Integration**: Use ML to auto-filter spam emails.
  158. - **Localization**: Add multi-language support (e.g., Spanish, French).
  159. - **Extended Features**: Allow users to extend email lifespan via credits.
  160.  
  161. ---
  162.  
  163.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement