Commit Graph

30 Commits

Author SHA1 Message Date
6f6a8f0c4a fix docker compose 2025-11-15 23:23:49 +01:00
b6de9d93f1 Merge pull request #3 from BluLupo/claude/migrate-quart-flask-mariadb-011CV5dCApJ51x9myS4yDNme
Migrate portfolio to Flask with MariaDB database
2025-11-13 17:20:34 +01:00
Claude
6845308a34 Add password change functionality and profile image upload
- Add profile_image field to Profile model with default value
- Update profile edit route to handle profile image file uploads
- Add password change route with validation in auth module
- Create change password template with form
- Update profile template to include image upload with preview
- Add password change link to admin sidebar
- Update homepage to use dynamic profile image from database
2025-11-13 15:58:51 +00:00
Claude
425e66a473 Add edit modals and image upload for admin dashboard
User Interface Improvements:
- Added edit modal for skills with activate/deactivate checkbox
- Added edit modal for social links with activate/deactivate checkbox
- Skills and social links now default to "active" when created
- Better UX with inline editing instead of separate pages

Image Upload Feature:
- Implemented file upload for project images
- Support for png, jpg, jpeg, gif, webp (max 16 MB)
- Automatic filename sanitization and timestamp prefixing
- Preview of current image in edit mode
- Option to upload file OR enter manual URL
- Files saved to static/img/ directory

Modified Files:
- app.py: Added upload configuration (MAX_CONTENT_LENGTH, UPLOAD_FOLDER, ALLOWED_EXTENSIONS)
- routes/admin.py: Added save_uploaded_file() helper and file handling in project routes
- templates/admin/skills.html: Added edit modal with is_active checkbox
- templates/admin/social_links.html: Added edit modal with is_active checkbox
- templates/admin/project_form.html: Added file upload input with preview

Benefits:
- No more "inactive" items when creating new entries
- Easy toggle of active/inactive state
- Professional image upload with validation
- Better user experience overall
2025-11-13 15:29:10 +00:00
Claude
aa2c704bfb Add authentication system and admin dashboard
Security Features:
- Added User model with bcrypt password hashing
- Implemented Flask-Login for session management
- Protected all API write operations with @login_required decorator
- Added authentication routes (login/logout)

Admin Dashboard:
- Created comprehensive admin dashboard with statistics
- Profile management interface
- Skills management (add/edit/delete)
- Projects management with full CRUD operations
- Social links management
- Modern responsive UI with Bootstrap 5

New Files:
- models.py: Added User model with bcrypt
- routes/auth.py: Login/logout functionality
- routes/admin.py: Complete admin dashboard with CRUD operations
- templates/auth/login.html: Login page
- templates/admin/base.html: Admin base template
- templates/admin/dashboard.html: Main dashboard
- templates/admin/profile.html: Profile editor
- templates/admin/skills.html: Skills manager
- templates/admin/projects.html: Projects list
- templates/admin/project_form.html: Project editor
- templates/admin/social_links.html: Social links manager

Modified Files:
- app.py: Integrated Flask-Login and bcrypt, registered new blueprints
- requirements.txt: Added Flask-Login, Flask-Bcrypt, bcrypt
- init_db.py: Creates default admin user (admin/admin123)
- routes/api.py: Protected all write operations with authentication

Default Credentials:
- Username: admin
- Password: admin123
- ⚠️ MUST be changed after first login!

Benefits:
- Secure API access with session-based authentication
- User-friendly admin interface for content management
- No need to edit code or database directly
- Bcrypt password hashing for security
- Protected against unauthorized access
2025-11-13 13:49:36 +00:00
Claude
c6425235a2 Migrate from Quart to Flask and add MariaDB dynamic database
Major Changes:
- Migrated web framework from Quart (async) to Flask (sync)
- Added MariaDB database integration with SQLAlchemy ORM
- Implemented dynamic content management for portfolio

New Features:
- Database models for Profile, Skills, Projects, ProjectTags, and SocialLinks
- RESTful API endpoints for CRUD operations on all entities
- Database initialization script (init_db.py) with sample data
- Docker Compose configuration with MariaDB service

Modified Files:
- app.py: Replaced Quart with Flask, added database initialization
- config.py: Added database configuration with environment variables
- routes/home.py: Converted async to sync, added database queries
- requirements.txt: Replaced Quart/Hypercorn with Flask/Gunicorn, added Flask-SQLAlchemy and PyMySQL
- docker-compose.yml: Added MariaDB service with health checks
- templates/: Updated all templates to use dynamic data from database with Jinja2
- .env.example: Added database configuration variables
- README.md: Complete rewrite with new setup instructions and API documentation

New Files:
- models.py: SQLAlchemy models for all database entities
- init_db.py: Database initialization script
- routes/api.py: REST API endpoints for content management

Benefits:
- Simplified architecture (sync vs async)
- Better ecosystem compatibility
- Dynamic content management via database
- Easy content updates through REST API
- Improved deployment with standard WSGI server (Gunicorn)
2025-11-13 09:16:24 +00:00
058f6205d7 Merge pull request #2 from BluLupo/codex/crea-documentazione-con-sphinx
Add basic Sphinx documentation
2025-06-03 23:09:01 +02:00
8004eb49d0 Add Sphinx documentation 2025-06-03 22:59:48 +02:00
dbffc157d8 Merge pull request #1 from BluLupo/codex/trova-e-correggi-un-bug
Fix tests dependency
2025-06-03 22:50:35 +02:00
db8f867e6f Add missing httpx dependency 2025-06-03 22:44:26 +02:00
b8c6f36484 resize image pt2 2025-05-06 23:33:23 +02:00
813c20c53a resize image 2025-05-06 23:16:18 +02:00
420eae1388 add SEO in head 2025-04-30 09:01:41 +02:00
a8ef43f222 add robots.txt / sitemap.xml / favicon.ico 2025-04-30 08:54:36 +02:00
da9bde12da fix testing and project page 2025-04-28 10:42:28 +02:00
9fa02fe15b Fix Javascript 2025-04-27 21:42:14 +02:00
3a68af1f68 Rebuild Themes and More 2025-04-27 21:35:00 +02:00
6bc664bbe3 Update README.md 2025-04-27 18:32:25 +02:00
a31e4d7954 Update docker-compose.yml
Add [ -d /app/.git ] || git clone ...  Control
2025-04-14 08:47:39 +02:00
39e0a76feb Update README.md
Add Docker Start
2025-04-01 23:07:55 +02:00
6b0e4e2703 Update hypercorn_config.toml 2025-04-01 22:40:46 +02:00
1e6aae3931 Create docker-compose.yml
Add docker-compose.yml
2025-04-01 22:31:14 +02:00
dedhersel
66ed841373 add Dockerfile 2025-02-20 15:12:09 +01:00
4d85658a64 update WorkFlow 2025-01-04 17:30:10 +01:00
bf4673bf43 update base url in WorkFlow 2025-01-04 17:12:46 +01:00
436d012475 update GitHub WorkFlow 2025-01-04 17:11:47 +01:00
94b25b2807 Update python-package.yml 2025-01-04 17:04:47 +01:00
e5e91f729e Create python-package.yml 2025-01-04 14:53:24 +01:00
0aaebfe532 add README.MD 2025-01-04 14:51:53 +01:00
053272b71a new site 2025-01-04 14:40:52 +01:00