# EasyAttend – Classroom Attendance Checklist Application Author: Somangsu Mukherjee ## 1. Description of the Application EasyAttend is a web-based classroom attendance management application designed for teachers, lecturers, or classroom administrators. The application allows users to record student attendance quickly and efficiently through a clean web interface. Main features: - Add student names - Record student arrival times - Display attendance records in a structured table - Delete incorrect attendance entries - Store attendance records permanently in a database The application is publicly accessible over the Internet and secured with HTTPS encryption. --- ## 2. Public Cloud, Cloud Services, Docker Objects, Persistent Volumes and Database Used ### Public Cloud Platform The application is deployed on Microsoft Azure public cloud infrastructure. Cloud service used: - Microsoft Azure Virtual Machine - Ubuntu Server 24.04 LTS - Azure B2ats v2 virtual machine instance - Public IP address - Azure for Students subscription The Azure virtual machine serves as the hosting environment for the complete Docker deployment. --- ### Docker Architecture The application uses Docker Compose to manage multiple containers. Docker objects used: #### Frontend Container Container name: attendance-frontend Technology: - Nginx - HTML - CSS - JavaScript Purpose: Serves the user interface and allows interaction with the attendance application. --- #### Backend Container Container name: attendance-backend Technology: - Node.js - Express.js Purpose: Handles application logic, API requests, and communication with the database. --- #### Database Container Container name: attendance-db Technology: - PostgreSQL 16 Purpose: Stores attendance records persistently. --- #### Reverse Proxy Container Container name: attendance-proxy Technology: - Nginx Purpose: - Routes traffic to frontend and backend services - Handles HTTPS encryption - Redirects HTTP traffic to HTTPS - Handles SSL certificate integration --- #### Database Administration Container Container name: attendance-adminer Technology: - Adminer Purpose: Provides optional web-based database management. --- ### Persistent Volumes Persistent Docker volumes used: #### PostgreSQL Persistent Volume Volume name: postgres_data Purpose: Stores PostgreSQL data files permanently so records remain available after container restart or redeployment. --- #### Nginx Log Volume Volume name: nginx_logs Purpose: Stores web access logs for monitoring incoming Internet traffic. --- ## 3. Cost Analysis for One Year Operation Estimated usage assumptions: - 1000 users per day - 50GB total database/storage usage - lightweight application workload ### Azure Virtual Machine Resource: Microsoft Azure Virtual Machine Configuration: - B2ats v2 - 2 vCPU - 1 GB RAM price: USD 7.74 per month Annual cost: USD 92.88 per year Billing interval: Monthly --- ### Storage Resource: Azure Managed Disk Storage Estimated requirement: 50GB Estimated monthly price: USD 3–5 per month Estimated annual price: USD 36–60 per year Billing interval: Monthly --- ### Domain Name Resource: DuckDNS Price: Free Billing interval: None --- ### SSL Certificate Resource: Let's Encrypt Price: Free Billing interval: None --- ### Estimated Total Annual Cost Virtual machine: USD 92.88/year Storage: USD 36–60/year Domain: USD 0/year SSL certificate: USD 0/year Estimated total: USD 128.88–152.88 per year --- ## 4. Description of Uploaded Files ### docker-compose.yml Defines all application containers, networks, persistent volumes, restart policies, and inter-container communication. --- ### prepare-app.sh Deployment automation script. Functions: - starts Docker services - builds backend container - initializes containers - prepares networking - prepares application deployment --- ### remove-app.sh Application removal script. Functions: - stops Docker containers - removes application services - removes associated Docker networks --- ### frontend/index.html Main user interface for the application. --- ### frontend/styles.css Visual styling and layout for the web application. --- ### frontend/app.js Frontend JavaScript functionality for communicating with backend API and updating attendance records dynamically. --- ### backend/Dockerfile Defines backend container image configuration. --- ### backend/package.json Node.js dependency configuration. --- ### backend/server.js Main backend API implementation. Handles: - student attendance insertion - attendance retrieval - attendance deletion - database communication --- ### db/init.sql Initial PostgreSQL database schema definition. Creates attendance table structure. --- ### nginx/app.conf Nginx reverse proxy configuration. Handles: - HTTP traffic - HTTPS traffic - SSL certificate integration - reverse proxy routing - frontend routing - backend API routing - Adminer routing --- ### .gitignore Prevents sensitive or unnecessary files from being uploaded to Git. Excluded examples: - .env - SSL certificates - SQL backup files - SSH private keys --- ## 5. Brief Description of Configuration Application configuration is managed through Docker Compose and environment variables. Configured components include: - PostgreSQL credentials - database name - domain name - SSL certificate settings - Docker networking - persistent volume mappings - reverse proxy rules - restart policies Sensitive values are stored in: .env This file is intentionally excluded from Git for security reasons. --- ## 6. Instructions to View and Use the Application Application URL: https://easyattend.duckdns.org Instructions: 1. Open a web browser 2. Navigate to the application URL 3. Enter a student name 4. Select arrival time 5. Click "Add student" 6. Attendance record will appear in the attendance table 7. Use the delete button to remove incorrect records --- ## 7. Instructions to Perform Data Backup Database backup command: ```bash docker exec attendance-db pg_dump -U attendance_user attendance_db > attendance_backup.sql ``` This creates: attendance_backup.sql This file contains a full backup of the PostgreSQL database. --- ## 8. Instructions to View Access Records from the Internet Access logs are available through the Nginx reverse proxy container. Command: ```bash docker logs attendance-proxy ``` Displayed information includes: client IP addresses timestamps requested URLs HTTP response codes browser user agents --- ## 9. Conditions Required to Run prepare-app.sh and remove-app.sh Required conditions: Ubuntu Linux environment Docker installed Docker Compose installed Internet connection properly configured .env file valid domain name configuration Docker permissions for executing user complete project file structure present Deployment command: ```bash ./prepare-app.sh ``` Removal command: ```bash ./remove-app.sh ``` --- ## 10. External Resources and Generative Model Usage External Resources : Microsoft Azure documentation, Let's Encrypt documentation, DuckDNS documentation: Generative Model Usage: Claude, OpenAI ChatGPT Method of usage: Debugging, architecture planning, troubleshooting, researching All implementation, deployment, testing, debugging, and validation actions were manually performed by me.