### Manual Installation and Database Setup for Jasmin Web Panel Source: https://context7.com/101t/jasmin-web-panel/llms.txt Manually installs and configures the Jasmin Web Panel on a system. This involves cloning the repository, setting up a Python virtual environment, installing dependencies using uv, configuring environment variables, initializing the database with migrations, collecting static files, creating a superuser, and running the application server. It supports both a development server and production deployment with Gunicorn. ```bash # Clone and create virtual environment git clone https://github.com/101t/jasmin-web-panel.git cd jasmin-web-panel python3 -m venv env source env/bin/activate # Install dependencies pip install --upgrade pip wheel uv uv pip install -r pyproject.toml --extra=prod # Configure environment cp sample.env .env nano .env # Edit configuration # Initialize database python manage.py migrate # Load sample data (optional) python manage.py samples # Collect static files python manage.py collectstatic --no-input # Create superuser python manage.py createsuperuser # Run development server python manage.py runserver 0.0.0.0:8000 # For production with Gunicorn gunicorn \ --bind 127.0.0.1:8000 \ --workers 4 \ --timeout 120 \ --log-level info \ --access-logfile logs/gunicorn.log \ --error-logfile logs/gunicorn_error.log \ config.wsgi:application ``` -------------------------------- ### Manual Installation of Jasmin Web Panel Dependencies Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md This section details the manual installation process for the Jasmin Web Panel. It includes cloning the repository, setting up a Python virtual environment, and installing project dependencies using pip. ```bash # Clone repository git clone https://github.com/101t/jasmin-web-panel.git cd jasmin-web-panel # Create virtual environment (recommended) python3 -m venv env source env/bin/activate # On Windows: env\Scripts\activate # Upgrade pip and install build tools pip install --upgrade pip wheel uv # Install dependencies uv pip install -r pyproject.toml --extra=prod ``` -------------------------------- ### Docker Compose Quick Start for Jasmin Web Panel Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md This snippet demonstrates how to quickly set up and run the Jasmin Web Panel using Docker Compose. It involves cloning the repository, configuring environment variables, and starting the services. Access is then provided via a local URL. ```bash # Clone the repository git clone https://github.com/101t/jasmin-web-panel.git cd jasmin-web-panel # Copy and configure environment file cp sample.env .env # Edit .env with your settings # Start all services docker compose up -d # Access the web interface open http://localhost:8999 ``` -------------------------------- ### Manage SMPP Connectors - Create, List, Get, Start, Stop, Update, Delete - Bash Source: https://context7.com/101t/jasmin-web-panel/llms.txt These commands are used to manage SMPP client connectors for interacting with SMSC providers. They allow for creating, listing, retrieving details of, starting, stopping, updating, and deleting SMPP connections. Connector creation involves a POST request with detailed configuration parameters in JSON format. ```bash # Create SMPP connector curl -u admin:password -X POST \ -H "Content-Type: application/json" \ -d '{ "cid": "vodafone_smpp", "host": "smpp.vodafone.com", "port": 2775, "username": "vf_username", "password": "vf_password", "submit_throughput": 10, "logfile": "/var/log/jasmin/vodafone.log", "loglevel": 20 }' \ http://localhost:8000/api/smppccm/ # Response {"cid": "vodafone_smpp"} # List all SMPP connectors curl -u admin:password http://localhost:8000/api/smppccm/ # Get connector details curl -u admin:password http://localhost:8000/api/smppccm/vodafone_smpp/ # Start connector (connect to SMSC) curl -u admin:password -X PUT http://localhost:8000/api/smppccm/vodafone_smpp/start/ # Stop connector (disconnect from SMSC) curl -u admin:password -X PUT http://localhost:8000/api/smppccm/vodafone_smpp/stop/ # Update connector configuration curl -u admin:password -X PATCH \ -H "Content-Type: application/json" \ -d '{"host": "smpp2.vodafone.com", "port": 2776}' \ http://localhost:8000/api/smppccm/vodafone_smpp/ # Delete connector curl -u admin:password -X DELETE http://localhost:8000/api/smppccm/vodafone_smpp/ ``` -------------------------------- ### Jasmin Web Panel Configuration Example Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md Provides an example of essential configurations for the Jasmin Web Panel, including Django settings like DEBUG, SECRET_KEY, ALLOWED_HOSTS, and database connection settings. ```ini # Django Settings DEBUG=False # Always False in production SECRET_KEY=your-very-long-random-secret-key-here ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com # Database PRODB_URL=postgres://username:password@localhost:5432/jasmin_web_db ``` -------------------------------- ### Docker Compose Deployment for Jasmin Web Panel Source: https://context7.com/101t/jasmin-web-panel/llms.txt Deploys the full Jasmin Web Panel stack, including the web application, database, Redis, RabbitMQ, and Jasmin SMS Gateway, using Docker Compose. This method simplifies the setup of all necessary dependencies for a complete environment. It requires cloning the repository, configuring environment variables, and then starting the services. ```bash # Clone repository git clone https://github.com/101t/jasmin-web-panel.git cd jasmin-web-panel # Configure environment cp sample.env .env nano .env # Edit with your settings # Start all services docker compose up -d # Services started: # - jasmin-web: Web application (port 8999) # - jasmin-celery: Background task processor # - db: PostgreSQL database # - redis: Redis cache # - rabbit-mq: RabbitMQ message broker # - jasmin: Jasmin SMS Gateway (ports 2775, 8990, 1401) # - sms_logger: SMS submit log collector # View logs docker compose logs -f jasmin-web # Check service status docker compose ps # Stop all services docker compose down # Access web interface # http://localhost:8999 # Default credentials: admin / secret (CHANGE IMMEDIATELY!) ``` -------------------------------- ### Install and Run Certbot for SSL Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md This command installs Certbot and its Nginx plugin, which is used to automatically obtain and renew SSL certificates for your domain. After installation, the subsequent command initiates the process of setting up SSL for the specified domain (sms.yourdomain.com) by interacting with Certbot and Nginx. ```bash sudo apt install certbot python3-certbot-nginx sudo certbot --nginx -d sms.yourdomain.com ``` -------------------------------- ### Docker Compose Up Jasmin Web Panel Full Stack Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md Starts all services defined in the Docker Compose file for a full-stack deployment, including the web application, database, Redis, RabbitMQ, Jasmin Gateway, and SMS logger. Assumes the '.env' file is configured. ```bash cp sample.env .env docker compose up -d ``` -------------------------------- ### Run Django Development Server Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md Starts the Django development server, making the application accessible at a specified address and port. This command is typically used for local development and testing. ```bash python manage.py runserver 0.0.0.0:8000 ``` -------------------------------- ### Manage HTTP Connectors - Create, List, Get, Delete - Bash Source: https://context7.com/101t/jasmin-web-panel/llms.txt These commands manage HTTP connectors, which are used for receiving mobile-originated (MO) messages via HTTP callbacks. They allow for creating new connectors with a specified URL and HTTP method, listing existing connectors, retrieving their details, and deleting them. Connector creation requires a POST request with JSON data. ```bash # Create HTTP connector for receiving MO messages curl -u admin:password -X POST \ -H "Content-Type: application/json" \ -d '{ "cid": "mo_webhook", "url": "https://myapp.com/api/sms/receive", "method": "POST" }' \ http://localhost:8000/api/httpccm/ # Response {"cid": "mo_webhook"} # List all HTTP connectors curl -u admin:password http://localhost:8000/api/httpccm/ # Get connector details curl -u admin:password http://localhost:8000/api/httpccm/mo_webhook/ # Delete HTTP connector curl -u admin:password -X DELETE http://localhost:8000/api/httpccm/mo_webhook/ ``` -------------------------------- ### Systemd Service Management Commands Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md Commands to reload the Systemd daemon, enable, start, and check the status of the Jasmin Web Panel service. These are essential for managing the application's lifecycle on a systemd-based server. ```bash sudo systemctl daemon-reload sudo systemctl enable jasmin-web.service sudo systemctl start jasmin-web.service sudo systemctl status jasmin-web.service ``` -------------------------------- ### Systemd Service Configuration for Jasmin Web Panel Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md Defines a Systemd service unit file for managing the Jasmin Web Panel application in a production environment. It specifies dependencies, user, working directory, environment variables, and the command to start the Gunicorn server. ```ini [Unit] Description=Jasmin Web Panel Requires=postgresql.service After=network.target postgresql.service [Service] Type=simple SyslogIdentifier=jasminwebpanel User=www-data Group=www-data WorkingDirectory=/opt/jasmin-web-panel Environment="DJANGO_SETTINGS_MODULE=config.settings.pro" ExecStart=/opt/jasmin-web-panel/env/bin/gunicorn \ --bind 127.0.0.1:8000 \ --workers 4 \ --timeout 120 \ --log-level info \ --access-logfile /opt/jasmin-web-panel/logs/gunicorn.log \ --error-logfile /opt/jasmin-web-panel/logs/gunicorn_error.log \ config.wsgi:application Restart=on-failure RestartSec=10 [Install] WantedBy=multi-user.target ``` -------------------------------- ### Python Django Migrations and Management Commands Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md This snippet demonstrates essential Django management commands for initializing the database, loading sample data, collecting static files, and creating a superuser. These commands are crucial for setting up a Django project. ```bash python manage.py migrate python manage.py samples python manage.py collectstatic --no-input python manage.py createsuperuser ``` -------------------------------- ### Docker Run Jasmin Web Panel Pre-built Image Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md Runs a container from the pre-built Jasmin Web Panel Docker image, mapping ports and mounting volumes for persistent data and configuration. It requires a pre-configured '.env' file. ```bash docker run -d \ --name jasmin-web \ -p 8999:8000 \ --env-file .env \ -v ./public:/app/public \ tarekaec/jasmin_web_panel:1.4 ``` -------------------------------- ### Configure Jasmin Web Panel Environment Variables (.env) Source: https://context7.com/101t/jasmin-web-panel/llms.txt Sets up the Jasmin Web Panel environment using key-value pairs in a `.env` file. Covers core Django settings, database (PostgreSQL), Redis, Jasmin Gateway, HTTP API, and SMPP configurations. ```bash # Core Django settings DEBUG=False SECRET_KEY=your-very-long-random-secret-key-here ALLOWED_HOSTS=sms.example.com,www.sms.example.com DJANGO_SETTINGS_MODULE=config.settings.pro TIME_ZONE=Etc/GMT-3 LANGUAGE_CODE=en # Database configuration (PostgreSQL recommended) PRODB_URL=postgres://jasmin:top_secret@db:5432/jasmin # Redis configuration (caching and Celery) REDIS_HOST=redis REDIS_PORT=6379 REDIS_DB=0 REDIS_PASSWORD= # Jasmin Gateway connection TELNET_HOST=127.0.0.1 TELNET_PORT=8990 TELNET_USERNAME=jcliadmin TELNET_PW=jclipwd TELNET_TIMEOUT=10 # HTTP API configuration HTTP_HOST=http://127.0.0.1 HTTP_PORT=1401 HTTP_USERNAME=foo HTTP_PASSWORD=bar # SMPP configuration SMPP_HOST=127.0.0.1 SMPP_PORT=2775 SMPP_SYSTEM_ID=foo SMPP_PASSWORD=bar # Enable submit log tracking SUBMIT_LOG=True ``` -------------------------------- ### Enable and Reload Nginx Configuration Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md These bash commands are used to enable the Nginx configuration file for the Jasmin Web Panel, test the Nginx configuration for syntax errors, and then reload the Nginx service to apply the changes. This process ensures that Nginx is correctly set up to serve the web panel. ```bash sudo ln -s /etc/nginx/sites-available/jasmin_web /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl reload nginx ``` -------------------------------- ### ARM64 Dockerfile Configuration Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md Instructions for modifying the Dockerfile to support ARM64/AArch64 architectures by commenting out a specific environment variable related to LD_PRELOAD. This is necessary for building or running images on ARM-based systems. ```dockerfile # ENV LD_PRELOAD /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 ``` -------------------------------- ### Docker Run Custom Jasmin Web Panel Image Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md Runs a container from a custom-built Jasmin Web Panel Docker image. Similar to running a pre-built image, it requires environment configuration. ```bash docker run -d \ --name jasmin-web \ -p 8999:8000 \ --env-file .env \ jasmin_web_panel:custom ``` -------------------------------- ### View Jasmin Web Application Logs (Systemd) Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md This command displays the logs for the 'jasmin-web' service when it's managed by systemd. The `-f` flag follows the logs in real-time, which is helpful for live troubleshooting. ```bash sudo journalctl -u jasmin-web.service -f ``` -------------------------------- ### Manage Jasmin Users - Create, Enable, Disable, Delete - Bash Source: https://context7.com/101t/jasmin-web-panel/llms.txt These commands manage Jasmin users. They allow for creating new users with specified credentials and group assignments, enabling or disabling existing users, and deleting users. Authentication is required, and new users are created via a POST request with JSON data. ```bash # Create a new user curl -u admin:password -X POST \ -H "Content-Type: application/json" \ -d '{ "uid": "smsuser1", "gid": "marketing_group", "username": "smsuser1", "password": "SecurePass123!" }' \ http://localhost:8000/api/users/ # Response {"uid": "smsuser1"} # Enable/disable user curl -u admin:password -X PUT http://localhost:8000/api/users/smsuser1/enable/ curl -u admin:password -X PUT http://localhost:8000/api/users/smsuser1/disable/ # Delete user curl -u admin:password -X DELETE http://localhost:8000/api/users/smsuser1/ ``` -------------------------------- ### Environment Configuration Source: https://context7.com/101t/jasmin-web-panel/llms.txt Details on configuring Jasmin Web Panel using environment variables in the `.env` file for various settings including core Django, database, Redis, and connector configurations. ```APIDOC ## Environment Variables ### Description Configure Jasmin Web Panel by setting environment variables in a `.env` file. These variables control core application settings, database connections, caching, and connector details. ### Parameters #### Core Django Settings - **DEBUG** (boolean) - Controls debug mode. - **SECRET_KEY** (string) - Django secret key for security. - **ALLOWED_HOSTS** (list of strings) - Hostnames allowed to serve requests. - **DJANGO_SETTINGS_MODULE** (string) - Specifies the Django settings module. - **TIME_ZONE** (string) - Sets the timezone for the application. - **LANGUAGE_CODE** (string) - Sets the default language code. #### Database Configuration - **PRODB_URL** (string) - URL for the production database (e.g., PostgreSQL). #### Redis Configuration - **REDIS_HOST** (string) - Hostname for the Redis server. - **REDIS_PORT** (integer) - Port for the Redis server. - **REDIS_DB** (integer) - Redis database number. - **REDIS_PASSWORD** (string) - Password for Redis authentication. #### Jasmin Gateway Connection - **TELNET_HOST** (string) - Hostname for the Jasmin Gateway Telnet interface. - **TELNET_PORT** (integer) - Port for the Jasmin Gateway Telnet interface. - **TELNET_USERNAME** (string) - Username for Telnet authentication. - **TELNET_PW** (string) - Password for Telnet authentication. - **TELNET_TIMEOUT** (integer) - Timeout in seconds for Telnet connections. #### HTTP API Configuration - **HTTP_HOST** (string) - Hostname for the HTTP API. - **HTTP_PORT** (integer) - Port for the HTTP API. - **HTTP_USERNAME** (string) - Username for HTTP API authentication. - **HTTP_PASSWORD** (string) - Password for HTTP API authentication. #### SMPP Configuration - **SMPP_HOST** (string) - Hostname for the SMPP service. - **SMPP_PORT** (integer) - Port for the SMPP service. - **SMPP_SYSTEM_ID** (string) - System ID for SMPP connection. - **SMPP_PASSWORD** (string) - Password for SMPP connection. #### Other Settings - **SUBMIT_LOG** (boolean) - Enable or disable submit log tracking. ### Example `.env` File: ``` DEBUG=False SECRET_KEY=your-very-long-random-secret-key-here ALLOWED_HOSTS=sms.example.com,www.sms.example.com DJANGO_SETTINGS_MODULE=config.settings.pro TIME_ZONE=Etc/GMT-3 LANGUAGE_CODE=en PRODB_URL=postgres://jasmin:top_secret@db:5432/jasmin REDIS_HOST=redis REDIS_PORT=6379 REDIS_DB=0 REDIS_PASSWORD= TELNET_HOST=127.0.0.1 TELNET_PORT=8990 TELNET_USERNAME=jcliadmin TELNET_PW=jclipwd TELNET_TIMEOUT=10 HTTP_HOST=http://127.0.0.1 HTTP_PORT=1401 HTTP_USERNAME=foo HTTP_PASSWORD=bar SMPP_HOST=127.0.0.1 SMPP_PORT=2775 SMPP_SYSTEM_ID=foo SMPP_PASSWORD=bar SUBMIT_LOG=True ``` ``` -------------------------------- ### View Jasmin Web Application Logs (Docker Compose) Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md This command streams the logs for the 'jasmin-web' application when running via Docker Compose. It's useful for real-time monitoring and debugging of the web panel itself. ```bash docker compose logs -f jasmin-web ``` -------------------------------- ### Docker Build Custom Jasmin Web Panel Image Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md Builds a custom Docker image for Jasmin Web Panel from a Dockerfile. This allows for customization of the image before deployment. ```bash docker build -f config/docker/slim/Dockerfile -t jasmin_web_panel:custom . ``` -------------------------------- ### List All Jasmin Users - Bash Source: https://context7.com/101t/jasmin-web-panel/llms.txt Retrieves a list of all users configured in Jasmin, including their current status (enabled or disabled). Authentication with valid admin credentials is required. ```bash # List all users curl -u admin:password http://localhost:8000/api/users/ # Response { "users": [ {"uid": "testuser1", "status": "enabled"}, {"uid": "testuser2", "status": "disabled"} ] } ``` -------------------------------- ### Manage Jasmin Groups - Create, List, Enable, Disable, Delete - Bash Source: https://context7.com/101t/jasmin-web-panel/llms.txt These commands facilitate the management of user groups within Jasmin. You can create new groups, list existing ones, enable or disable them, and delete them. Group creation requires a POST request with a JSON payload specifying the group ID. ```bash # Create a new group curl -u admin:password -X POST \ -H "Content-Type: application/json" \ -d '{"gid": "premium_users"}' \ http://localhost:8000/api/groups/ # Response {"name": "premium_users"} # List all groups curl -u admin:password http://localhost:8000/api/groups/ # Enable/disable group curl -u admin:password -X PUT http://localhost:8000/api/groups/premium_users/enable/ curl -u admin:password -X PUT http://localhost:8000/api/groups/premium_users/disable/ # Delete group curl -u admin:password -X DELETE http://localhost:8000/api/groups/premium_users/ ``` -------------------------------- ### Docker Compose Management Commands Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md Provides commands for managing Docker Compose services, including viewing logs, checking service status, and stopping all services. These are essential for operating the multi-container application. ```bash docker compose logs -f jasmin-web docker compose ps docker compose down ``` -------------------------------- ### Configure Jasmin MT Router Outbound Message Routing (Bash) Source: https://context7.com/101t/jasmin-web-panel/llms.txt Sets up rules for routing outbound (MT) messages to various SMPP connectors. Supports default routes, static routes with filters and pricing, and round-robin routes for load balancing. Uses cURL commands with JSON payloads for configuration. ```bash # Create default route (catch-all) curl -u admin:password -X POST \ -H "Content-Type: application/json" \ -d '{ "type": "DefaultRoute", "connector": "smppc(vodafone_smpp)", "rate": "0.00" }' \ http://localhost:8000/api/mtrouter/ # Create static route with filter and pricing curl -u admin:password -X POST \ -H "Content-Type: application/json" \ -d '{ "type": "StaticMTRoute", "order": "10", "connector": "smppc(premium_smpp)", "filters": "uk_numbers", "rate": "0.025" }' \ http://localhost:8000/api/mtrouter/ # Create round-robin route for load balancing curl -u admin:password -X POST \ -H "Content-Type: application/json" \ -d '{ "type": "RandomRoundrobinMTRoute", "order": "20", "connector": "smppc(smpp1);smppc(smpp2);smppc(smpp3)", "rate": "0.015" }' \ http://localhost:8000/api/mtrouter/ # List all MT routes curl -u admin:password http://localhost:8000/api/mtrouter/ # Response { "routers": [ {"order": "0", "type": "DefaultRoute", "connector": "smppc(vodafone_smpp)", "rate": "0.00"}, {"order": "10", "type": "StaticMTRoute", "connector": "smppc(premium_smpp)", "rate": "0.025"} ] } # Delete specific route curl -u admin:password -X DELETE http://localhost:8000/api/mtrouter/10/ # Flush all routes (WARNING: removes all routing rules) curl -u admin:password -X POST http://localhost:8000/api/mtrouter/flush/ ``` -------------------------------- ### Django Template: Base Layout and Styling Source: https://github.com/101t/jasmin-web-panel/blob/master/main/web/templates/web/welcome.html This snippet shows the base Django template structure, including extending a base HTML file, loading static assets, and defining title, CSS, and content blocks. It incorporates inline CSS for styling the page elements. ```django {% extends "web/base.html" %} {% load static i18n %} {% block title %}{% trans "Welcome to Django AIO" %}{% endblock title %} {% block extracss %} * {font-family: 'Raleway', sans-serif;} a {text-decoration: none; color: #0a3724;font-size: 13px;} h2 {color: #0a3724;} body {display: table;width: 100%;height:100vh;} body div {display: table-cell;text-align: center;vertical-align: middle;} ul {list-style-type: none;margin: 0;padding: 0;font-size:13px;} ul > li {display: inline-block;} ul > li > a {text-decoration: none;color:black;} ul > li > a:hover{text-decoration: none; color:#142038;} {% endblock extracss %} {% block content %}![Django AIO]({% static 'assets/img/django-aio.png' %})Welcome to Django-AIO---------------------* **Django:** {{ django_version }}* •* **Python:** {{ python_version }}* •* **Platform:** {{ platform|title }}* •* [**Github**](https://github.com/101t/django-aio){% endblock content %} {% block extrajs %}{% endblock extrajs %} ``` -------------------------------- ### Configure Jasmin MO Router Inbound Message Routing (Bash) Source: https://context7.com/101t/jasmin-web-panel/llms.txt Configures rules for routing inbound (MO) messages to HTTP connectors. Supports default, static with filters, and failover routes. Configuration is done via cURL commands with JSON payloads. ```bash # Create default MO route curl -u admin:password -X POST \ -H "Content-Type: application/json" \ -d '{ "type": "DefaultRoute", "connector": "http(mo_webhook)" }' \ http://localhost:8000/api/morouter/ # Create static MO route with filter curl -u admin:password -X POST \ -H "Content-Type: application/json" \ -d '{ "type": "StaticMORoute", "order": "10", "connector": "http(premium_webhook)", "filters": "premium_only" }' \ http://localhost:8000/api/morouter/ # Create failover MO route curl -u admin:password -X POST \ -H "Content-Type: application/json" \ -d '{ "type": "FailoverMORoute", "order": "15", "connector": "http(primary_webhook);http(backup_webhook)" }' \ http://localhost:8000/api/morouter/ # List all MO routes curl -u admin:password http://localhost:8000/api/morouter/ # Delete MO route curl -u admin:password -X DELETE http://localhost:8000/api/morouter/10/ # Flush all MO routes curl -u admin:password -X POST http://localhost:8000/api/morouter/flush/ ``` -------------------------------- ### Docker Pull Jasmin Web Panel Pre-built Image Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md Pulls the latest pre-built Docker image for Jasmin Web Panel. This is the first step in deploying the application using a pre-built image. ```bash docker pull tarekaec/jasmin_web_panel:1.4 ``` -------------------------------- ### Change Ownership of Public Directory Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md This command changes the owner and group of the `/opt/jasmin-web-panel/public/` directory to `www-data`. This is a common step in Linux environments to ensure that the web server (like Nginx) has the necessary permissions to read and serve files from this directory, particularly after static files have been collected. ```bash sudo chown -R www-data:www-data /opt/jasmin-web-panel/public/ ``` -------------------------------- ### Test Telnet Connectivity to Jasmin Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md This command attempts to establish a telnet connection to the Jasmin Gateway on its default port (8990). Successful connection indicates that the Jasmin service is listening on the specified port and that network connectivity is established. ```bash telnet localhost 8990 ``` -------------------------------- ### Collect Static Files Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md This command collects all static files from the various Django applications into a single location, specified by the STATIC_ROOT setting. The `--no-input` flag prevents prompts, and `--clear` removes existing files before collecting. This is often necessary when static files are not loading correctly. ```bash python manage.py collectstatic --no-input --clear ``` -------------------------------- ### Create Git Feature Branch Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md This Git command creates a new branch named 'feature/amazing-feature' and immediately switches to it. This is a standard practice for developing new features in isolation before merging them into the main codebase. ```git git checkout -b feature/amazing-feature ``` -------------------------------- ### MO Router API Source: https://context7.com/101t/jasmin-web-panel/llms.txt Configure inbound message routing (MO) to HTTP connectors. Supports default, static, and failover routing strategies. ```APIDOC ## POST /api/morouter/ ### Description Creates a new MO route. ### Method POST ### Endpoint /api/morouter/ ### Parameters #### Request Body - **type** (string) - Required - The type of route (e.g., "DefaultRoute", "StaticMORoute", "FailoverMORoute"). - **connector** (string) - Required - The HTTP connector to use (e.g., "http(mo_webhook)"). For failover, multiple connectors can be semicolon-separated. - **order** (string) - Optional - The order of the route, used for static routing. - **filters** (string) - Optional - A comma-separated list of filter IDs to apply to this route, used for "StaticMORoute". ### Request Example ```json { "type": "StaticMORoute", "order": "10", "connector": "http(premium_webhook)", "filters": "premium_only" } ``` ### Response #### Success Response (200) Returns the created MO route details. #### Response Example ```json { "type": "StaticMORoute", "order": "10", "connector": "http(premium_webhook)", "filters": "premium_only" } ``` ## GET /api/morouter/ ### Description Lists all configured MO routes. ### Method GET ### Endpoint /api/morouter/ ### Response #### Success Response (200) Returns a list of all MO routes. #### Response Example ```json [ {"order": "0", "type": "DefaultRoute", "connector": "http(mo_webhook)"}, {"order": "10", "type": "StaticMORoute", "connector": "http(premium_webhook)", "filters": "premium_only"} ] ``` ## DELETE /api/morouter/{route_order}/ ### Description Deletes a specific MO route based on its order. ### Method DELETE ### Endpoint /api/morouter/{route_order}/ ### Parameters #### Path Parameters - **route_order** (string) - Required - The order number of the MO route to delete. ### Response #### Success Response (204) No content, indicating successful deletion. ## POST /api/morouter/flush/ ### Description Flushes all MO routes. This action will remove all configured routing rules. Use with caution. ### Method POST ### Endpoint /api/morouter/flush/ ### Response #### Success Response (204) No content, indicating successful flushing. ``` -------------------------------- ### Group Management API Source: https://context7.com/101t/jasmin-web-panel/llms.txt Endpoints for managing user groups, including creating, listing, enabling, disabling, and deleting groups. ```APIDOC ## POST /api/groups/ ### Description Creates a new user group. ### Method POST ### Endpoint /api/groups/ ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **gid** (string) - Required - The unique identifier for the new group. ### Request Example ```json { "gid": "premium_users" } ``` ### Response #### Success Response (200) - **name** (string) - The name of the created group. #### Response Example ```json {"name": "premium_users"} ``` ## GET /api/groups/ ### Description Lists all existing user groups. ### Method GET ### Endpoint /api/groups/ ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u admin:password http://localhost:8000/api/groups/ ``` ### Response #### Success Response (200) (Response body not explicitly documented in the provided text, but would likely be a list of group objects) ## PUT /api/groups/{gid}/enable/ ### Description Enables an existing user group. ### Method PUT ### Endpoint /api/groups/{gid}/enable/ ### Parameters #### Path Parameters - **gid** (string) - Required - The unique identifier of the group to enable. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u admin:password -X PUT http://localhost:8000/api/groups/premium_users/enable/ ``` ### Response #### Success Response (200) (No specific response body documented, typically indicates success) ## PUT /api/groups/{gid}/disable/ ### Description Disables an existing user group. ### Method PUT ### Endpoint /api/groups/{gid}/disable/ ### Parameters #### Path Parameters - **gid** (string) - Required - The unique identifier of the group to disable. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u admin:password -X PUT http://localhost:8000/api/groups/premium_users/disable/ ``` ### Response #### Success Response (200) (No specific response body documented, typically indicates success) ## DELETE /api/groups/{gid}/ ### Description Deletes an existing user group. ### Method DELETE ### Endpoint /api/groups/{gid}/ ### Parameters #### Path Parameters - **gid** (string) - Required - The unique identifier of the group to delete. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u admin:password -X DELETE http://localhost:8000/api/groups/premium_users/ ``` ### Response #### Success Response (200) (No specific response body documented, typically indicates success) ``` -------------------------------- ### SMPP Connector Management API Source: https://context7.com/101t/jasmin-web-panel/llms.txt Endpoints for configuring and managing SMPP client connectors to SMSC providers. ```APIDOC ## POST /api/smppccm/ ### Description Creates a new SMPP client connector. ### Method POST ### Endpoint /api/smppccm/ ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **cid** (string) - Required - The unique identifier for the connector. - **host** (string) - Required - The hostname or IP address of the SMSC. - **port** (integer) - Required - The port number for the SMSC connection. - **username** (string) - Required - The username for authentication with the SMSC. - **password** (string) - Required - The password for authentication with the SMSC. - **submit_throughput** (integer) - Optional - The maximum number of messages per second the connector can submit. - **logfile** (string) - Optional - The path to the log file for this connector. - **loglevel** (integer) - Optional - The logging level for the connector. ### Request Example ```json { "cid": "vodafone_smpp", "host": "smpp.vodafone.com", "port": 2775, "username": "vf_username", "password": "vf_password", "submit_throughput": 10, "logfile": "/var/log/jasmin/vodafone.log", "loglevel": 20 } ``` ### Response #### Success Response (200) - **cid** (string) - The unique identifier of the created connector. #### Response Example ```json {"cid": "vodafone_smpp"} ``` ## GET /api/smppccm/ ### Description Lists all configured SMPP connectors. ### Method GET ### Endpoint /api/smppccm/ ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u admin:password http://localhost:8000/api/smppccm/ ``` ### Response #### Success Response (200) (Response body not explicitly documented in the provided text, but would likely be a list of SMPP connector objects) ## GET /api/smppccm/{cid}/ ### Description Retrieves the details of a specific SMPP connector. ### Method GET ### Endpoint /api/smppccm/{cid}/ ### Parameters #### Path Parameters - **cid** (string) - Required - The unique identifier of the SMPP connector. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u admin:password http://localhost:8000/api/smppccm/vodafone_smpp/ ``` ### Response #### Success Response (200) (Response body not explicitly documented in the provided text, but would likely contain the details of the specified SMPP connector) ## PUT /api/smppccm/{cid}/start/ ### Description Starts an SMPP connector, initiating a connection to the SMSC. ### Method PUT ### Endpoint /api/smppccm/{cid}/start/ ### Parameters #### Path Parameters - **cid** (string) - Required - The unique identifier of the SMPP connector to start. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u admin:password -X PUT http://localhost:8000/api/smppccm/vodafone_smpp/start/ ``` ### Response #### Success Response (200) (No specific response body documented, typically indicates success) ## PUT /api/smppccm/{cid}/stop/ ### Description Stops an SMPP connector, disconnecting from the SMSC. ### Method PUT ### Endpoint /api/smppccm/{cid}/stop/ ### Parameters #### Path Parameters - **cid** (string) - Required - The unique identifier of the SMPP connector to stop. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u admin:password -X PUT http://localhost:8000/api/smppccm/vodafone_smpp/stop/ ``` ### Response #### Success Response (200) (No specific response body documented, typically indicates success) ## PATCH /api/smppccm/{cid}/ ### Description Updates the configuration of an existing SMPP connector. ### Method PATCH ### Endpoint /api/smppccm/{cid}/ ### Parameters #### Path Parameters - **cid** (string) - Required - The unique identifier of the SMPP connector to update. #### Query Parameters None #### Request Body - **host** (string) - Optional - The new hostname or IP address of the SMSC. - **port** (integer) - Optional - The new port number for the SMSC connection. (Other fields like username, password, etc., may also be updatable, but are not explicitly listed in the example) ### Request Example ```json { "host": "smpp2.vodafone.com", "port": 2776 } ``` ### Response #### Success Response (200) (No specific response body documented, typically indicates success) ## DELETE /api/smppccm/{cid}/ ### Description Deletes an existing SMPP connector. ### Method DELETE ### Endpoint /api/smppccm/{cid}/ ### Parameters #### Path Parameters - **cid** (string) - Required - The unique identifier of the SMPP connector to delete. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u admin:password -X DELETE http://localhost:8000/api/smppccm/vodafone_smpp/ ``` ### Response #### Success Response (200) (No specific response body documented, typically indicates success) ``` -------------------------------- ### User Management API Source: https://context7.com/101t/jasmin-web-panel/llms.txt Endpoints for managing Jasmin users, including listing, creating, enabling, disabling, and deleting users. ```APIDOC ## GET /api/users/ ### Description Lists all Jasmin users with their enabled/disabled status. ### Method GET ### Endpoint /api/users/ ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u admin:password http://localhost:8000/api/users/ ``` ### Response #### Success Response (200) - **users** (array) - A list of user objects, each containing: - **uid** (string) - The unique identifier for the user. - **status** (string) - The status of the user (e.g., "enabled", "disabled"). #### Response Example ```json { "users": [ {"uid": "testuser1", "status": "enabled"}, {"uid": "testuser2", "status": "disabled"} ] } ``` ## POST /api/users/ ### Description Creates a new Jasmin user with authentication credentials and group assignment. ### Method POST ### Endpoint /api/users/ ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **uid** (string) - Required - The unique identifier for the new user. - **gid** (string) - Required - The group ID to which the user belongs. - **username** (string) - Required - The username for the user. - **password** (string) - Required - The password for the user. ### Request Example ```json { "uid": "smsuser1", "gid": "marketing_group", "username": "smsuser1", "password": "SecurePass123!" } ``` ### Response #### Success Response (200) - **uid** (string) - The unique identifier of the created user. #### Response Example ```json {"uid": "smsuser1"} ``` ## PUT /api/users/{uid}/enable/ ### Description Enables an existing Jasmin user. ### Method PUT ### Endpoint /api/users/{uid}/enable/ ### Parameters #### Path Parameters - **uid** (string) - Required - The unique identifier of the user to enable. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u admin:password -X PUT http://localhost:8000/api/users/smsuser1/enable/ ``` ### Response #### Success Response (200) (No specific response body documented, typically indicates success) ## PUT /api/users/{uid}/disable/ ### Description Disables an existing Jasmin user. ### Method PUT ### Endpoint /api/users/{uid}/disable/ ### Parameters #### Path Parameters - **uid** (string) - Required - The unique identifier of the user to disable. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u admin:password -X PUT http://localhost:8000/api/users/smsuser1/disable/ ``` ### Response #### Success Response (200) (No specific response body documented, typically indicates success) ## DELETE /api/users/{uid}/ ### Description Deletes an existing Jasmin user. ### Method DELETE ### Endpoint /api/users/{uid}/ ### Parameters #### Path Parameters - **uid** (string) - Required - The unique identifier of the user to delete. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u admin:password -X DELETE http://localhost:8000/api/users/smsuser1/ ``` ### Response #### Success Response (200) (No specific response body documented, typically indicates success) ``` -------------------------------- ### HTTP Connector Management API Source: https://context7.com/101t/jasmin-web-panel/llms.txt Endpoints for configuring HTTP connectors to receive mobile-originated messages via callbacks. ```APIDOC ## POST /api/httpccm/ ### Description Creates a new HTTP connector for receiving mobile-originated (MO) messages. ### Method POST ### Endpoint /api/httpccm/ ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **cid** (string) - Required - The unique identifier for the HTTP connector. - **url** (string) - Required - The URL to which MO messages will be sent (callback URL). - **method** (string) - Required - The HTTP method to use for the callback (e.g., "POST"). ### Request Example ```json { "cid": "mo_webhook", "url": "https://myapp.com/api/sms/receive", "method": "POST" } ``` ### Response #### Success Response (200) - **cid** (string) - The unique identifier of the created HTTP connector. #### Response Example ```json {"cid": "mo_webhook"} ``` ## GET /api/httpccm/ ### Description Lists all configured HTTP connectors. ### Method GET ### Endpoint /api/httpccm/ ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u admin:password http://localhost:8000/api/httpccm/ ``` ### Response #### Success Response (200) (Response body not explicitly documented in the provided text, but would likely be a list of HTTP connector objects) ## GET /api/httpccm/{cid}/ ### Description Retrieves the details of a specific HTTP connector. ### Method GET ### Endpoint /api/httpccm/{cid}/ ### Parameters #### Path Parameters - **cid** (string) - Required - The unique identifier of the HTTP connector. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u admin:password http://localhost:8000/api/httpccm/mo_webhook/ ``` ### Response #### Success Response (200) (Response body not explicitly documented in the provided text, but would likely contain the details of the specified HTTP connector) ## DELETE /api/httpccm/{cid}/ ### Description Deletes an existing HTTP connector. ### Method DELETE ### Endpoint /api/httpccm/{cid}/ ### Parameters #### Path Parameters - **cid** (string) - Required - The unique identifier of the HTTP connector to delete. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -u admin:password -X DELETE http://localhost:8000/api/httpccm/mo_webhook/ ``` ### Response #### Success Response (200) (No specific response body documented, typically indicates success) ``` -------------------------------- ### Push Git Branch to Remote Source: https://github.com/101t/jasmin-web-panel/blob/master/README.md This Git command pushes the local 'feature/amazing-feature' branch to the remote repository named 'origin'. This makes the new branch and its commits available on the remote server, typically for collaboration or to initiate a pull request. ```git git push origin feature/amazing-feature ```