A microservices-based IP address management system with audit logging capabilities.
- Docker & Docker Compose
- Git
git clone https://github.com/SayefEshan/ip-management-system.git
cd ip-management-systemCopy the main .env.example file to .env:
cp .env.example .envThe main .env file contains database configuration:
Configure db credentials in .env:
# Database Configuration
DB_DATABASE_AUTH=ip_auth_service
DB_DATABASE_APP=ip_app_service
DB_USERNAME=db_user
DB_PASSWORD=change_this_password
DB_ROOT_PASSWORD=change_this_root_passworddocker compose up -d --buildThis will start:
- Gateway service (port 8000)
- Auth service (internal)
- App service (internal)
- Frontend (port 3000)
- Auth Database (MySQL)
- App Database (MySQL)
Generate JWT Secret Key (CRITICAL for security):
openssl rand -base64 64Copy the generated key to the JWT_SECRET_KEY variable in the auth-service/.env file.
Generate Laravel APP_KEY for each service:
docker compose exec auth-service php artisan key:generatedocker compose exec app-service php artisan key:generatedocker compose exec gateway php artisan key:generatedocker compose exec auth-service php artisan migrate --seeddocker compose exec app-service php artisan migrate --seedOpen your browser and navigate to:
http://localhost:3000The API can be accessed at:
http://localhost:8000/apiYou can use the following test accounts to log in:
- Admin User
- Email:
admin@ad-group.com.au - Password:
admin123
- Email:
- Regular User
- Email:
sayef@ad-group.com.au - Password:
password123
- Email:
The system is built using a microservices architecture with the following components:
- Gateway Service: Acts as the entry point for all requests, routing them to the appropriate service.
- Auth Service: Handles user authentication and authorization.
- App Service: Manages IP address allocations and related operations.
- Frontend: A React-based user interface for interacting with the system.
- Databases: Two MySQL databases for the auth and app services.
The system includes a comprehensive Postman collection for testing all API endpoints.
- Download and install Postman if you haven't already
- Open Postman and click on "Import" in the top left corner
- Choose "File" and select the
ip-management-API.postman_collection.jsonfile from the project root - Click "Import" to add the collection to your Postman workspace