How docesforg/portfolio-api works
Project Type & Purpose
• A Django (MTV) web application with Django REST Framework (“photo_portfolio”)
• Manages photos, categories, likes and user profiles via a REST API
• Uses SQLite locally; deployed on Heroku (Procfile, runtime.txt)
Main Components
• Clients: Browser or Mobile App (HTTP/HTTPS)
• Heroku Router / Load Balancer (optional)
• Web Process: Gunicorn → WSGI
• Django Project (“photo_portfolio”): URL dispatcher
• photos app:
– URLs & Views (API endpoints)
– Serializers (data transformation)
– Models (ORM, photos/models.py)
– Permissions, Signals (photos/permissions.py, photos/signals.py)
– Admin interface (photos/admin.py)
• Database: SQLite (db.sqlite3)
Data Flow & Relationships
Client → HTTP → Heroku Router → Gunicorn → WSGI →
URLconf → View → Serializer → ORM → SQLite
← ORM ← Serializer ← View ← HTTP Response
Architectural Patterns & Tech
• MTV (Django) with REST layer (DRF)
• ORM for persistence
• Signals for decoupled event handling
• Procfile/runtime.txt for Heroku deployment