How damnko/angular2-django-movies works
Project type and purpose
• This is a full-stack two-tier web application.
• Front-end: An Angular2 single-page application (SPA) that handles user registration, authentication, form validation, protected routes, and movie browsing/comments/ratings.
• Back-end: A Django-based REST API that exposes endpoints for auth, user data, movies, comments, and ratings, persisting data in MySQL, and using JWT for stateless authentication.
File structure
• Top-level folders:
• angular2-client – contains all Angular2 code (modules, components, services, assets, build configs)
• django-server – contains Django project (“server”) and a Django app (“movies”) with models, views, middleware, migrations, utils.
• Front-end uses modular structure (Core, Movies, User, Shared modules), Webpack for build, Karma for tests.
• Back-end uses standard Django MVC pattern, custom JWT middleware, URL routing, models→migrations, and a Procfile for Heroku, requirements.txt for dependencies.
Additional insights from README
• Angular client served via webpack-dev-server or Firebase hosting.
• Django server run locally in a Python virtualenv, configured via .env and settings.py to connect to MySQL.
• Communication between client and server is over HTTP/HTTPS with JSON + JWT tokens.