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
.env
file to version control. - Always set a strong, unique
HTTP__SESSION_SECRET
in 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 dev
npm run build
npm start
The application uses Socket.IO for real-time communication between client and server. All communication follows a strict event-based protocol.
- Client sends
login
with credentials - Server responds with
login:success
orlogin:fail
- Client sends
sms:send
to send messages - Server sends
sms:received
for incoming messages - Client sends
logout
to terminate session
login
- Authentication attemptsms:send
- Send SMS messagelogout
- Terminate session
sms:received
- Incoming SMS notificationlogin:success
- Successful authenticationlogin:fail
- Authentication failure
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.