How phuuquiii/tttn_ecommerce works
A React-Native mobile app (for mobile users)
4. A NodeJS backend server that exposes REST APIs (with a rich “server” directory for controllers, routes, models, middleware, and database backups)
A live-stream module (with its own Docker setup, RTMP configuration and web interface)
6. A chatbot deployment (using Python with components like app.py, model.py, and NLTK utilities)
The purpose of this project appears to be to support a commerce or content delivery system (possibly with e-commerce or interactive features), where different platforms (web client, CRM/admin, mobile) interact with a centralized NodeJS backend. Additional services (such as live-streaming and chatbot functionality) augment the core offerings by providing real-time interaction and automated responses.
Main Components
• Frontend Clients:
• Client (NextJS website): Handles public-facing web pages and user interactions.
• CRM (React Dashboard): Provides administrative functions, order management, product management, and analytics.
• Mobile App (React-Native): Targets mobile users with navigation, product display, and integrated commerce features.
• Backend:
• Server (NodeJS): Comprises multiple controllers, API routes, middleware, and models. It serves as the brain of the system, orchestrating data flow with the database and external services.
• Database (implicit based on DB_backup files in the server directory): Likely a NoSQL database (e.g., MongoDB) given the BSON backup files.
• Additional Services:
• Live-Stream Module: A dockerized live streaming service with RTMP and nginx configurations used for real-time video broadcasting.
• Chatbot Deployment: A Python-based service with natural language processing (NLP) components (using NLTK) to handle chatbot interactions.
Component Relationships and Data Flow
• Frontend clients (Client, CRM, Mobile App) should be shown as separate UI layers that all make API calls to the NodeJS backend.
• The NodeJS backend should be represented as a central service that:
• Processes requests coming from the different frontends.
• Manages business logic (illustrated via controllers, middleware, and routes).
• Interacts with the underlying database for CRUD operations.
• The database component should be clearly shown, possibly with a note indicating BSON backups hinting at a NoSQL store.
• Live-stream and chatbot services are additional microservices or external service modules:
• Similarly, represent the chatbot as a service that might be embedded within the client’s pages or used within the mobile app, with its own flow to deliver responses.
Architectural Patterns and Design Principles
• Separation of Concerns: Different UIs (web, CRM, mobile) are separated from backend business logic.
• Modular / Microservice Elements: The live-stream and chatbot modules are clearly separate and containerized (using Docker) from the main server.
• RESTful API Design: Focus on directional API calls between frontends and the backend.
• MVC-like structure in both the client-side (React components in CRM and mobile app’s structure) and the server-side (separation into models, controllers, and routes).
Relevant Technologies, Frameworks, and Libraries
• Frontend:
• NextJS for the Client.
• React for the CRM.
• React Native + Expo for the Mobile App.
• Backend:
• NodeJS with Express (inferred from controllers, routes, and middleware patterns)
• Database access libraries likely appropriate for MongoDB (or similar NoSQL).
• Additional Services:
• Live-stream: Docker, RTMP, nginx.
• Chatbot: Python, NLTK, and associated machine learning utilities.