A comprehensive web-based memo management system built with PHP and MySQL for educational institutions. This system allows students, staff, and administrators to create, manage, track, and approve various types of memos and requests.
- User Management: Role-based access control (Student, Staff, Admin)
- Memo Creation: Template-based memo creation with file attachments
- Workflow Management: Automated approval workflows based on memo type
- Real-time Tracking: Visual workflow progress tracking
- Notification System: Email and in-app notifications
- Export System: Export data in JSON, CSV, Excel, and PDF formats
- File Management: Secure file upload and download system
- Create and submit memos/requests
- Track memo status and progress
- View personal memo history
- Receive notifications on status updates
- Download approved memo documents
- Review and approve/reject assigned memos
- Add comments and feedback
- Manage department-specific requests
- View analytics and reports
- Create internal memos
- Full system access and management
- User account management
- System configuration
- Comprehensive reporting
- Data export capabilities
- Backend: PHP 7.4+
- Database: MySQL 5.7+
- Frontend: HTML5, CSS3 (Tailwind CSS), JavaScript (Alpine.js)
- Charts: Chart.js
- Server: Apache (XAMPP compatible)
- PHP 7.4 or higher
- MySQL 5.7 or higher
- Apache Web Server
- XAMPP (recommended for local development)
- Modern web browser
-
Download and Install XAMPP
- Download XAMPP from https://www.apachefriends.org/
- Install and start Apache and MySQL services
-
Clone/Download the Project ```bash git clone [repository-url]
```
-
Move to XAMPP Directory
- Copy the project folder to
C:\xampp\htdocs\smart-memo-system\(Windows) - Or
/opt/lampp/htdocs/smart-memo-system/(Linux)
- Copy the project folder to
-
Database Setup
- Open phpMyAdmin:
http://localhost/phpmyadmin - Create a new database named
memo_system - Import the SQL file:
database/schema.sql
- Open phpMyAdmin:
-
Configure Database Connection
- Edit
config/database.php - Update database credentials if needed: ```php define('DB_HOST', 'localhost'); define('DB_NAME', 'memo_system'); define('DB_USER', 'root'); define('DB_PASS', ''); ```
- Edit
-
Create Upload Directory
- Create
uploads/folder in the project root - Set appropriate permissions (755 or 777)
- Create
-
Access the System
- Open browser and go to:
http://localhost/smart-memo-system/
- Open browser and go to:
- Username:
admin - Password:
admin123
- Username:
dr.smith - Password:
admin123
- Username:
john.doe - Password:
admin123
``` smart-memo-system/ βββ config/ β βββ database.php # Database configuration βββ includes/ β βββ auth.php # Authentication functions β βββ memo.php # Memo management functions β βββ sidebar.php # Navigation sidebar β βββ header.php # Page header βββ database/ β βββ schema.sql # Database schema βββ uploads/ # File upload directory βββ components/ # Reusable PHP components β βββ dashboards/ β βββ memo/ β βββ ui/ βββ login.php # Login page βββ dashboard.php # Main dashboard βββ create-memo.php # Memo creation βββ inbox.php # Memo inbox βββ tracking.php # Progress tracking βββ view-memo.php # Memo details βββ users.php # User management (Admin) βββ settings.php # User settings βββ notifications.php # Notifications page βββ export.php # Data export βββ download.php # File download handler βββ logout.php # Logout handler βββ README.md # This file ```
- SQL Injection Protection: Prepared statements throughout
- XSS Prevention: Input sanitization and output encoding
- CSRF Protection: Form token validation
- Role-based Access Control: Granular permissions system
- Secure File Handling: File type validation and secure storage
- Session Management: Secure session handling
The system uses the following main tables:
users- User accounts and profilesmemos- Memo/request recordsmemo_workflow- Workflow trackingmemo_comments- Comments and feedbackmemo_attachments- File attachmentsnotifications- System notificationsuser_sessions- Session management
- Update the
typeenum in thememostable - Add workflow template in
includes/memo.php - Update form options in
create-memo.php
Edit the getWorkflowTemplate() method in includes/memo.php to customize approval workflows for different memo types.
The system uses Tailwind CSS. Modify the HTML classes or add custom CSS as needed.
-
Database Connection Error
- Check MySQL service is running
- Verify database credentials in
config/database.php - Ensure database exists and schema is imported
-
File Upload Issues
- Check
uploads/directory exists and has write permissions - Verify PHP
upload_max_filesizeandpost_max_sizesettings
- Check
-
Login Issues
- Ensure default users are created (check
database/schema.sql) - Clear browser cache and cookies
- Check session configuration
- Ensure default users are created (check
-
Permission Errors
- Verify file/folder permissions
- Check Apache configuration
- Ensure PHP has necessary extensions enabled
- Database indexes are included for optimal query performance
- File uploads are stored outside web root for security
- Session cleanup routines prevent session table bloat
- Pagination implemented for large data sets
- Database: Export via phpMyAdmin or mysqldump
- Files: Backup the entire project directory
- Uploads: Separately backup the uploads folder
- Clean old sessions periodically
- Archive old memos if needed
- Monitor disk space for uploads
- Update user passwords regularly
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Check the troubleshooting section
- Review the code documentation
- Email integration for notifications
- Mobile responsive improvements
- API endpoints for mobile app
- Advanced reporting and analytics
- Integration with external systems
- Multi-language support
Note: This system is designed for educational institutions but can be adapted for other organizations with similar memo/request management needs. ```
Now let me create a setup script to help with installation: