A specialized React application for managing Cisco CUBE E164 pattern mappings with dynamic pattern generation and configuration file serving. Built with TypeScript, Express.js backend, and SQLite database for enterprise voice routing management.
🌐 Live Demo - Try the application now!
See the application in action! Check out the screenshots folder for visual examples of:
The simplest way to deploy this application is using the Docker setup from the docker/
folder:
# Download the Docker Compose file wget https://raw.githubusercontent.com/sieteunoseis/cisco-cube-e164-pattern-map/master/docker/docker-compose.yml # Set your environment variables (optional) export VITE_BRANDING_NAME="Your Company E164 Manager" export VITE_BRANDING_URL="https://yourcompany.com" # Start the application (that's it!) docker compose up -d
Why this is the easiest:
docker compose up -d
See the docker/README.md
for detailed deployment instructions and configuration options.
git clone <this-repository> cd cisco-cube-e164-pattern-map npm run install-all
Copy .env.example
to .env
and customize:
cp .env.example .env
Key configuration options:
# Backend Configuration PORT=5001 # Backend server port NODE_ENV=development # Environment mode # Application Branding VITE_BRANDING_NAME="Your Company Name" VITE_BRANDING_URL="https://yourcompany.com" VITE_BACKGROUND_LOGO_TEXT="AB" # Background logo: text or Lucide icon (prefix with "lucide-") VITE_TABLE_COLUMNS=label,pattern,description
Background Logo Options:
lucide-
prefix with any icon name from Lucide Icons
lucide-frown
, lucide-settings
, lucide-phone
, lucide-network
npm run dev # Starts both frontend and backend in development mode
The application will be available at:
The application automatically serves .cfg
files for each label at:
http://your-server:3000/config-files/{label}.cfg
Use in Cisco configuration:
voice class e164-pattern-map 101
url https://your-frontend.domain.com/config-files/us-local.cfg
Production Example:
voice class e164-pattern-map 101
url http://your-server:3000/config-files/portland-npa-503.cfg
💡 For production, see the Recommended Deployment section above using the
docker/
folder setup.
# Build and run with Docker Compose (builds locally) npm run build # or docker-compose up --build # Individual commands docker-compose up --build # Build and start containers docker-compose up # Start existing containers docker-compose down # Stop containers
For production with custom domains and environment variables:
# Set environment variables for production export FRONTEND_URL=http://your-server:3000 export VITE_BRANDING_NAME="Your Company E164 Manager" export VITE_BRANDING_URL="https://yourcompany.com" export VITE_BACKGROUND_LOGO_TEXT="E164" # Download and run with pre-built images wget https://raw.githubusercontent.com/sieteunoseis/cisco-cube-e164-pattern-map/master/docker/docker-compose.yml docker compose up -d
Variable | Required | Description | Example |
---|---|---|---|
FRONTEND_URL |
Yes | Frontend URL for CORS | http://your-server:3000 |
VITE_BRANDING_NAME |
No | Application title | "My E164 Manager" |
VITE_BRANDING_URL |
No | Company/project URL | "https://company.com" |
VITE_BACKGROUND_LOGO_TEXT |
No | Background logo text/icon | "E164" or "lucide-phone" |
PORT |
No | Backend port | 3001 |
Important:
FRONTEND_URL
must match your frontend domain for CORS to work properly/config-files/
for better securityFor testing with images from GitHub Container Registry:
cd docker ./test.sh # Test with pre-built images ./test.sh --dev # Test with local builds # Manual Docker Compose docker-compose up -d # Use pre-built images docker-compose -f docker-compose.dev.yml up -d # Use local builds
cd frontend && npm run build # Frontend build only cd backend && npm run build # Backend TypeScript compilation
# Backend tests (Jest + TypeScript) cd backend && npm test # Frontend tests (Vitest + React Testing Library) cd frontend && npm test
cd backend && npm run type-check # TypeScript type checking cd frontend && npm run build # Includes type checking
npm run sync-remote # Pulls latest template updates
├── frontend/ # React + TypeScript + Vite
│ ├── src/components/ # Reusable UI components
│ ├── src/pages/ # Application pages
│ └── public/dbSetup.json # Database schema configuration
├── backend/ # Express.js + TypeScript
│ ├── src/ # TypeScript source files
│ ├── dist/ # Compiled JavaScript
│ ├── tests/ # Jest test files
│ └── db/ # SQLite database files
└── scripts/ # Utility scripts
The Pattern Generator converts number ranges into Cisco CUBE-compatible E164 patterns with intelligent optimization.
Simple Range:
Input: 5551000-5551999
Output: 5551...
Complex Range:
Input: 100-199
Output: 1..
Bulk Numbers:
Input: 1000, 1001, 1002, 2008, 2009
Output:
- 100[0-2] (covers 1000-1002)
- 200[8-9] (covers 2008-2009)
The application includes a comprehensive wildcard guide for Cisco dial-peer patterns:
.
- Matches any single digitT
- Variable length match (up to 32 digits)[1-5]
- Range of characters+
- E164 number indicator?
- Optional preceding digitREST API endpoint for programmatic access:
POST /api/generate-patterns Content-Type: application/json { "startNumber": 5551000, "endNumber": 5551999 }
chmod +x git-template-remote.sh
git config pull.rebase false # merge (recommended) git config pull.rebase true # rebase git config pull.ff only # fast-forward only
mkdir backend/db # Create database directory
cd backend && npm run build # Check for TypeScript errors cd frontend && npm run build # Frontend type checking
# Clean install and rebuild
rm -rf node_modules frontend/node_modules backend/node_modules
npm run install-all
npm run build
# Check what's using your backend port lsof -i :5000 # Kill processes using common ports lsof -ti:3000 | xargs kill -9 # Frontend (production) lsof -ti:5173 | xargs kill -9 # Frontend (dev) lsof -ti:5000 | xargs kill -9 # Backend (default) # Or change the backend port in .env echo "PORT=8000" >> .env # Use port 8000 instead
To use a different backend port:
Update .env
file:
PORT=8000 # Your preferred port
Restart the application:
npm run dev
The frontend will automatically proxy to the new port via Vite configuration.
This project is licensed under the MIT License - see the LICENSE file for details.
Template Reference: Script based on Propagating Git Template Changes
Owner
Contributors
Categories
Products
Catalyst RoutersProgramming Languages
JavaScriptLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community