A demonstration app that utilizes the SMS Gateway for Android to create an SMS management web interface
Explore the source Β»
Report Bug
Β·
Request Feature
- π About The Project
- π Getting Started
- π» Usage
- βοΈ Technical Implementation
- π€ Contributing
- π License
This web client serves as the frontend component of the SMS Gateway for Android ecosystem, providing a user-friendly interface for managing SMS communications through the SMS Gateway for Android app. It connects to both cloud and private server deployments, enabling real-time SMS management capabilities.
- π Connect to any account registered on Cloud/Private server
- π© Real-time receipt of SMS messages
- π€ Capability to send SMS messages
- π Session-based authentication with no persistent credential storage
The application follows strict privacy practices - credentials are stored only in session memory (cleared upon logout) and SMS messages are not stored persistently.
- π© Node.js
- π¦ npm/yarn
- β‘ Socket.IO
- π TypeScript
- Node.js (v18+)
- npm or yarn package manager
- Clone the repository:
git clone https://github.com/android-sms-gateway/web-client-ts.git
- Navigate to the web client directory:
cd web-client-ts - Install dependencies:
or with yarn:
npm install
yarn install
Create a .env file in the project root with the following environment variables (see .env.example for a ready-to-copy template):
| Variable | Description | Default Value |
|---|---|---|
HTTP__PORT or PORT |
Server listening port | 3000 |
HTTP__SESSION_SECRET |
Session encryption secret | random bytes (32 bytes) |
GATEWAY__URL |
SMS Gateway API URL | https://api.sms-gate.app/3rdparty/v1 |
GATEWAY__WEBHOOK_URL |
External address for webhooks (<your-url>/api/webhooks) |
http://localhost:<your-configured-port>/api/webhooks |
NODE_ENV |
Application environment (development or production) | production |
For complete configuration options, see src/config.ts.
Notes:
- Do not commit your
.envfile to version control. - Always set a strong, unique
HTTP__SESSION_SECRETin production (rotate it periodically). If not provided, the app may auto-generate one for development only.
After starting the server, navigate to http://localhost:<your-configured-port> to access the web interface.
npm run devnpm run buildnpm startThe application uses Socket.IO for real-time communication between client and server. All communication follows a strict event-based protocol.
- Client sends
loginwith credentials - Server responds with
login:successorlogin:fail - Client sends
sms:sendto send a message to a single recipient - Client sends
sms:send:bulkto send a message to multiple recipients (CSV bulk send) - Server sends
sms:receivedfor incoming messages - Client sends
logoutto terminate session - Server responds with
logout:success
login- Authentication attemptsms:send- Send SMS message to single recipientsms:send:bulk- Send SMS message to multiple recipientslogout- Terminate session
sms:received- Incoming SMS notificationlogin:success- Successful authenticationlogin:fail- Authentication failurelogout:success- Successful logout
The application supports sending messages to multiple recipients via CSV upload:
- Upload a CSV file with columns:
phoneNumber(required) andmessage(optional) - If the
messagecolumn is not present, a default message is used for all recipients - Messages are sent individually if per-recipient messages are provided
- All phone numbers receive the same default message if no message column is present
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the Apache-2.0 License. See LICENSE for more information.