How sameer-ssr99/web-steganography works
Project type and purpose
• This is a full-stack web application for performing steganography (hiding and extracting messages in image, audio, video, and text files).
• The frontend is a React single-page app; the backend is a Flask API that processes steganography operations.
File structure
• Top-level:
• frontend/ – React application with public assets and source pages (Index, Form, Result)
• backend/ – Flask application (app.py) plus a libs/ package for steganography implementations
• global .gitignore and root package-lock.json
• backend/libs/ contains four modules (image_steganography.py, audio_steganography.py, video_steganography.py, text_steganography.py) implementing each media-type algorithm
• backend/templates/ holds HTML templates, but the actual UI is served by React (these may be legacy or for fallback)
• backend/uploads/ and backend/processed/ are local file-system stores for incoming media and output stego files
• frontend/src/pages/ provides componentized pages for user input, status display, and results
Key insights from README
• No dedicated database; file system is used for persistence.
• Frontend talks to backend via REST endpoints (hosted on Render).
• Deployment uses Vercel (frontend) and Render.com (backend).
• Major dependencies: Flask-CORS for cross-origin, OpenCV/Pillow/Stegano in Python, React Router in frontend.
Main components and their relationships
a. Client (Browser)
• React app (hosted on Vercel) presenting form → upload media + secret message → API calls
b. API Gateway / Backend
• Flask app endpoints: /encode, /decode
• Receives HTTP multipart/form-data → stores input in uploads/
• Dispatches to appropriate steganography module in libs/ based on media type
• Modules use OpenCV, PIL, Stegano to process and generate stego file → placed in processed/
• Returns result URL or file download stream to frontend
c. File Storage
• uploads/: raw user files
• processed/: encoded/decoded results
d. External Services
• Vercel for static hosting of React
• Render for Flask backend runtime
e. (Optional) Browser local storage or caching for small interim data
Architectural patterns & design principles
• Separation of concerns: UI (React) vs Processing (Flask + libs)
• RESTful HTTP between frontend and backend
• Modular code: one steganography module per media type
• File-system as simple persistence layer (no DB)
• CORS to allow cross-origin calls
• Deployment as two independent services (micro-frontend + micro-backend)