A Node.js backend application built with AdonisJS that provides API endpoints for web and mobile applications to manage temporary phone numbers for SMS verification. It includes user authentication, payment processing, and integration with Platfone Retail API.
- π Authentication with Firebase
- π± Temporary phone number management
- π³ Payment processing (Stripe, Apple Pay, Google Pay and more...)
- π Push notifications
- π RESTful API
- π Database migrations with Lucid ORM
- Framework: AdonisJS
- Language: TypeScript
- Database: MySQL (via Lucid ORM)
- Authentication: Firebase Auth
- Payment: Stripe API, In-App Purchase verification and more...
- Notifications: Firebase Cloud Messaging and SMTP
- Node.js >= 22.x
- MySQL >= 8.0
- npm or yarn
The easiest way to get started is using our temp-number-deploy repository, which provides automated deployment scripts for the complete stack (MySQL, Backend, Web UI):
- Production: Google Cloud deployment with automated setup
- Local Development: Docker Compose environment with one command
π Go to temp-number-deploy β
For manual setup or custom configurations:
# Clone the repository
git clone https://github.com/platfone-com/temp-number-backend.git
cd temp-number-backend
# Install dependencies
npm install
# Copy environment variables
cp .env.example .env
# Configure your .env file with required credentialsKey environment variables to configure:
NODE_ENV=development
PORT=3333
HOST=0.0.0.0
# Database
DB_HOST=localhost
DB_PORT=3306
DB_USER=temp_number_user
DB_PASSWORD=temp_number_password
DB_DATABASE=temp_number
# Firebase
GOOGLE_APPLICATION_CREDENTIALS=/path/to/firebase-service-account.json
# Platfone Retail API
PLATFONE_API_URL=https://get_url_from_platfone_dashboard.com
PLATFONE_API_KEY=your_api_key# Run migrations
node ace migration:run# Development mode
npm run dev
# Production mode
npm run build
npm startThe server will start at http://localhost:3333
βββ app/
β βββ controllers/ # Request handlers
β βββ models/ # Database models
β βββ services/ # Business logic
β βββ middleware/ # Custom middleware
β βββ helpers/ # Utility functions
βββ config/ # Configuration files
βββ database/
β βββ migrations/ # Database migrations
βββ start/ # Application bootstrap
β βββ routes.ts # Route definitions
β βββ kernel.ts # Middleware registration
βββ tests/ # Test files
Full API documentation available at platfone.com/docs
This project uses ESLint for code quality. Run linting:
npm run lint# Run all tests
npm test
# Run with coverage
npm run test:coverageThis application is designed to be containerized. A Dockerfile is included for easy deployment.
# Build Docker image
docker build -t temp-number-backend .
# Run container
docker run -p 3333:3333 --env-file .env temp-number-backendWe welcome contributions! Please see CONTRIBUTING.md for details.
For security concerns, please see SECURITY.md.
This project is licensed under the MIT License with API Restriction Clause - see the LICENSE file for details.
- π§ Email: support@platfone.com
- π Issues: GitHub Issues
Built with β€οΈ by the Platfone team