How cg8-5712/bj35-bot works
Project Type and Purpose
• The project is a full-stack web application designed to provide a visual management interface for the Bj35 robot.
• Its purpose is to offer users capabilities such as robot status monitoring, message sending management, system configuration, and token access management.
• The technology stack includes a Vue3-based frontend built with Vite and a Python Flask backend, using SQLite as the database.
Key Architectural Components
a. Frontend Layer:
• The Frontend directory includes config files (e.g., Vite config, .env illustration) and source code under “src”.
• Components are structured into common elements (like LoadingSpinner and MessageInfo), dashboard components, and profile management.
• Entry points include main.js and index.html.
• This layer communicates with the backend via API services (as seen in Frontend/src/services).
b. Backend Layer:
• The Backend folder contains multiple Python modules and subdirectories.
• Main backend components include:
• API layer: The “api” directory (with app.py) sets up the Flask API endpoints.
• Worker/Task components: e.g., “send_message” which includes modules for receiving/sending messages and retrieving user information.
• Access token management: Multiple files indicate specific handling logic under both “accessToken.py” and its handler directories.
• Configuration and data access: Files like config.py and SqliteData.py indicate settings and database interaction using SQLite.
• The backend directory further subdivides components into ‘handler’ folders and submodules that help in logically separating API routing, configuration, and access token management.
c. Database Layer:
• Even though there is no explicit “db” folder, SQLite is the chosen database. The module SqliteData.py encapsulates interactions with the SQLite database.
d. External Libraries and Utilities:
• Within the “send_message” folder, there are modules for interfacing with WeWork APIs (e.g., WXBizMsgCrypt variations and weworkapi_python integration) which serve as external services for message encryption and integration.