How virgilio/crossingstreams works
Project type and purpose
• Crossing Streams is a full-stack, containerized web application.
• Backend: Django + Django REST Framework providing an API, sending emails, and persisting to PostgreSQL.
• Frontend: ReactJS single-page-app (SPA) using Axios, React Bootstrap, React-Youtube, served by Nginx.
• Workflow: user submits email + YouTube video ID → backend generates edit/embed/stats links → emails user → front-end handles Create/Edit/Stats views → external YouTube player in the embed.
File structure
• Top-level “compose/” folders define three Docker containers:
• compose/django – Dockerfile + entrypoint/start scripts for the API
• compose/react – Dockerfile + start script for the React app
• compose/nginx – Dockerfile + default.conf for serving the SPA + proxying API calls
• “cs_backend” directory: Django project (“crossingstreams”) + “video” app (models, serializers, views, URLs, migrations)
• “cs_frontend” directory: React app organized into “views” (Create, Edit, Embed, Stats) and “cyoa” components
• docker-compose.yaml orchestrates all services along with environment configs in “.envs/”
README insights
• Confirms stack: Django + PostgreSQL + DRF; ReactJS + Bootstrap + Axios + React-Youtube.
• Core entities: Video, Activities, Options, Actions.
• Future plans: CI/CD, deployment pipeline, tests.
Main components and interactions
a. Components
• Browser / React SPA (container: react)
• Nginx reverse proxy & static server (container: nginx)
• Django REST API (container: django)
• PostgreSQL database (container: postgres, env in .envs/.postgres)
• SMTP/email service (external or via Django config)
• External YouTube API/player (external service)
b. Relationships & Data flow
1. Browser → Nginx: GET / (serves index.html & static assets)
2. Browser ↔ Nginx → Django API: HTTP(S) REST calls (Axios)
3. Django API ↔ PostgreSQL: ORM SQL queries (models → migrations)
4. Django API → SMTP: sends email with edit/embed/stats links
5. Browser → YouTube: embed JS player requests
c. Architectural patterns
• MVC in Django with a REST layer.
• SPA on the frontend.
• Container-oriented microservice boundary via Docker Compose.
• Clear separation of concerns: UI / API / Data.
d. Key technologies
• Django, Django REST Framework, PostgreSQL
• ReactJS, React Bootstrap, Axios, React-Youtube
• Nginx as reverse proxy + static file server
• Docker Compose orchestrator