updated documentation folder
This commit is contained in:
148
documentation/README.md
Normal file
148
documentation/README.md
Normal file
@@ -0,0 +1,148 @@
|
||||
# Quality Recticel Application - Documentation
|
||||
|
||||
This folder contains all development and deployment documentation for the Quality Recticel application.
|
||||
|
||||
## Documentation Index
|
||||
|
||||
### Setup & Deployment
|
||||
|
||||
- **[DATABASE_DOCKER_SETUP.md](./DATABASE_DOCKER_SETUP.md)** - Complete guide for database configuration and Docker setup
|
||||
- **[DOCKER_IMPROVEMENTS.md](./DOCKER_IMPROVEMENTS.md)** - Detailed changelog of Docker-related improvements and optimizations
|
||||
- **[DOCKER_QUICK_REFERENCE.md](./DOCKER_QUICK_REFERENCE.md)** - Quick reference guide for common Docker commands and operations
|
||||
|
||||
### Features & Systems
|
||||
|
||||
- **[BACKUP_SYSTEM.md](./BACKUP_SYSTEM.md)** - Database backup management system documentation
|
||||
- Manual and scheduled backups
|
||||
- Backup configuration and management
|
||||
- Restore procedures
|
||||
|
||||
## Quick Links
|
||||
|
||||
### Application Structure
|
||||
|
||||
```
|
||||
quality_app/
|
||||
├── py_app/ # Python application code
|
||||
│ ├── app/ # Flask application modules
|
||||
│ │ ├── __init__.py # App factory
|
||||
│ │ ├── routes.py # Main routes
|
||||
│ │ ├── daily_mirror.py # Daily Mirror module
|
||||
│ │ ├── database_backup.py # Backup system
|
||||
│ │ ├── templates/ # HTML templates
|
||||
│ │ └── static/ # CSS, JS, images
|
||||
│ ├── instance/ # Configuration files
|
||||
│ └── requirements.txt # Python dependencies
|
||||
├── backups/ # Database backups
|
||||
├── logs/ # Application logs
|
||||
├── documentation/ # This folder
|
||||
└── docker-compose.yml # Docker configuration
|
||||
```
|
||||
|
||||
### Key Configuration Files
|
||||
|
||||
- `py_app/instance/external_server.conf` - Database connection settings
|
||||
- `docker-compose.yml` - Docker services configuration
|
||||
- `.env` - Environment variables (create from .env.example)
|
||||
- `py_app/gunicorn.conf.py` - Gunicorn WSGI server settings
|
||||
|
||||
### Access Levels
|
||||
|
||||
The application uses a 4-tier role system:
|
||||
|
||||
1. **Superadmin** (Level 100) - Full system access
|
||||
2. **Admin** (Level 90) - Administrative access
|
||||
3. **Manager** (Level 70) - Module management
|
||||
4. **Worker** (Level 50) - Basic operations
|
||||
|
||||
### Modules
|
||||
|
||||
- **Quality** - Production scanning and quality reports
|
||||
- **Warehouse** - Warehouse management
|
||||
- **Labels** - Label printing and management
|
||||
- **Daily Mirror** - Business intelligence and reporting
|
||||
|
||||
## Development Notes
|
||||
|
||||
### Recent Changes (November 2025)
|
||||
|
||||
1. **SQLAlchemy Removal** - Simplified to direct MariaDB connections
|
||||
2. **Daily Mirror Module** - Fully integrated with access control
|
||||
3. **Backup System** - Complete database backup management
|
||||
4. **Access Control** - Superadmin gets automatic full access
|
||||
5. **Docker Optimization** - Production-ready configuration
|
||||
|
||||
### Common Tasks
|
||||
|
||||
**Start Application:**
|
||||
```bash
|
||||
cd /srv/quality_app/py_app
|
||||
bash start_production.sh
|
||||
```
|
||||
|
||||
**Stop Application:**
|
||||
```bash
|
||||
cd /srv/quality_app/py_app
|
||||
bash stop_production.sh
|
||||
```
|
||||
|
||||
**View Logs:**
|
||||
```bash
|
||||
tail -f /srv/quality_app/logs/error.log
|
||||
tail -f /srv/quality_app/logs/access.log
|
||||
```
|
||||
|
||||
**Create Backup:**
|
||||
- Login as superadmin/admin
|
||||
- Go to Settings page
|
||||
- Click "Backup Now" button
|
||||
|
||||
**Check Application Status:**
|
||||
```bash
|
||||
ps aux | grep gunicorn | grep trasabilitate
|
||||
```
|
||||
|
||||
## Support & Maintenance
|
||||
|
||||
### Log Locations
|
||||
|
||||
- **Access Log**: `/srv/quality_app/logs/access.log`
|
||||
- **Error Log**: `/srv/quality_app/logs/error.log`
|
||||
- **Backup Location**: `/srv/quality_app/backups/`
|
||||
|
||||
### Database
|
||||
|
||||
- **Host**: localhost (or as configured)
|
||||
- **Port**: 3306
|
||||
- **Database**: trasabilitate
|
||||
- **User**: trasabilitate
|
||||
|
||||
### Default Login
|
||||
|
||||
- **Username**: superadmin
|
||||
- **Password**: superadmin123
|
||||
|
||||
⚠️ **Change default credentials in production!**
|
||||
|
||||
## Contributing
|
||||
|
||||
When adding new documentation:
|
||||
|
||||
1. Place markdown files in this folder
|
||||
2. Update this README with links
|
||||
3. Use clear, descriptive filenames
|
||||
4. Include date and version when applicable
|
||||
|
||||
## Version History
|
||||
|
||||
- **v1.0.0** (November 2025) - Initial production release
|
||||
- Docker deployment ready
|
||||
- Backup system implemented
|
||||
- Daily Mirror module integrated
|
||||
- SQLAlchemy removed
|
||||
|
||||
---
|
||||
|
||||
**Last Updated**: November 3, 2025
|
||||
**Application**: Quality Recticel Traceability System
|
||||
**Technology Stack**: Flask, MariaDB, Gunicorn, Docker
|
||||
Reference in New Issue
Block a user