Getting Started with RMP v2.0
Get up and running with Resource Manager Pro in 15 minutes
1Prerequisites
System Requirements:
- Fedora 40+ or Ubuntu 22.04+
- Node.js 18+ and npm
- PostgreSQL 15+
- Redis 6+
- Nginx
- CommuniGate Pro server (6.3+)
- 8GB RAM minimum (16GB recommended)
- 20GB free disk space
Check Prerequisites
# Check Node.js version
node --version # Should be v18 or higher
# Check PostgreSQL
psql --version # Should be 15 or higher
# Check Redis
redis-cli --version # Should be 6 or higher
# Check Nginx
nginx -v # Any recent version
2Installation
Clone Repository
# Clone the repository
git clone https://juergenp@dev.core.at/juergenp/rmp.git
cd rmp
# Checkout v2.0 branch
git checkout v2.0-dev
# Install dependencies
cd server
npm install
# Build TypeScript
npm run build
Database Setup
# Create database
sudo -u postgres createdb rmp_saas
# Load schemas
sudo -u postgres psql -d rmp_saas -f src/db/schema.sql
sudo -u postgres psql -d rmp_saas -f src/db/schema-saas.sql
# Create database user
sudo -u postgres psql -d rmp_saas -c "
CREATE USER rmp_saas WITH PASSWORD 'secure_password_here';
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO rmp_saas;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO rmp_saas;
"
PM2 Setup
# Install PM2 globally
npm install -g pm2
# Start the API server
pm2 start ecosystem.config.js
# Save PM2 configuration
pm2 save
# Setup PM2 to start on boot
pm2 startup
3Configuration
Environment Variables
Create a .env file in the server directory:
# Database
DATABASE_URL=postgresql://rmp_saas:password@localhost:5432/rmp_saas
# Redis
REDIS_URL=redis://localhost:6379
# JWT Secret (generate a secure random string)
JWT_SECRET=your-very-secure-secret-key-min-64-chars
# CommuniGate Pro
CGPRO_SERVER=[your-domain]
CGPRO_ADMIN=xadm@[your-domain]
CGPRO_ADMIN_PASSWORD=[password]
CGPRO_HTTP_PORT=8100
CGPRO_CLI_PORT=106
# Server Configuration
NODE_ENV=production
PORT=3001
API_BASE_URL=https://[your-server]
Nginx Configuration
server {
listen 80;
server_name [your-server];
# API Proxy
location /api/ {
proxy_pass http://localhost:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
# WebSocket Support
location /socket.io/ {
proxy_pass http://localhost:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
# Static Files
location / {
root /var/www/html/rmp-saas-gatekeeper;
try_files $uri $uri/ /index.html;
}
}
4First Login
Master Admin Accounts:
Two master admin accounts are preconfigured:
Two master admin accounts are preconfigured:
- user@example.com / [password]
- admin@example.com / [password]
Login via API
# Gatekeeper login (two-layer auth)
curl -X POST https://[your-server]/api/v2/auth/gatekeeper-login \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "[password]"
}'
# Direct CommuniGate Pro login
curl -X POST https://[your-server]/api/v2/auth/simple-login \
-H "Content-Type: application/json" \
-d '{
"email": "user@[your-domain]",
"password": "userpassword"
}'
Response
{
"success": true,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"email": "user@example.com",
"role": "super_admin",
"domain": "[your-domain]"
},
"cgpro_session": "1-abc123-xyz789",
"expires_in": 3600
}
5Create Resources
Resource Types
RMP supports various resource types, each in its own subdomain:
- Conference Rooms: confroom.resources.domain
- Parking Spaces: parking.resources.domain
- Company Vehicles: vehicles.resources.domain
- Equipment: equipment.resources.domain
- Catering: catering.resources.domain
Create a Conference Room
// POST /api/v2/resources
{
"id": "room-01",
"name": "Conference Room 01",
"type": "conference-room",
"capacity": 10,
"features": ["projector", "whiteboard", "video-conferencing"],
"location": "Building A, Floor 2",
"booking_rules": {
"min_duration": 30,
"max_duration": 480,
"advance_booking_days": 90,
"auto_accept": true
}
}
6Book Your First Meeting
Check Availability
# Check resource availability
curl -X GET "https://[your-server]/api/v2/resources/room-01/freebusy?\
from=2025-08-22T09:00:00Z&to=2025-08-22T18:00:00Z" \
-H "Authorization: Bearer YOUR_TOKEN"
Create Booking
// POST /api/v2/bookings
{
"title": "Team Meeting",
"description": "Weekly team sync",
"start_time": "2025-08-22T14:00:00Z",
"end_time": "2025-08-22T15:00:00Z",
"resources": ["room-01@confroom.resources.[your-domain]"],
"attendees": [
"john@[your-domain]",
"jane@[your-domain]"
],
"send_invitations": true
}
Response
{
"success": true,
"booking": {
"id": "RMP-1755185014489-5c56vwz1m",
"status": "confirmed",
"calendar_uid": "RMP-1755185014489-5c56vwz1m",
"resources": [
{
"id": "room-01@confroom.resources.[your-domain]",
"name": "Conference Room 01",
"status": "accepted"
}
],
"attendees": [
{
"email": "john@[your-domain]",
"status": "pending"
},
{
"email": "jane@[your-domain]",
"status": "pending"
}
]
}
}
7API Integration
JavaScript/TypeScript Example
import axios from 'axios';
class RMPClient {
constructor(baseURL = 'https://[your-server]/api/v2') {
this.client = axios.create({
baseURL,
headers: {
'Content-Type': 'application/json'
}
});
this.token = null;
}
async login(email, password) {
const response = await this.client.post('/auth/gatekeeper-login', {
email,
password
});
this.token = response.data.token;
this.client.defaults.headers['Authorization'] = `Bearer ${this.token}`;
return response.data;
}
async getResources(type = null) {
const params = type ? { type } : {};
const response = await this.client.get('/resources', { params });
return response.data;
}
async createBooking(bookingData) {
const response = await this.client.post('/bookings', bookingData);
return response.data;
}
async checkAvailability(resourceId, from, to) {
const response = await this.client.get(
`/resources/${resourceId}/freebusy`,
{ params: { from, to } }
);
return response.data;
}
}
// Usage
const rmp = new RMPClient();
await rmp.login('user@domain.com', 'password');
const resources = await rmp.getResources('conference-room');
console.log('Available rooms:', resources);
const availability = await rmp.checkAvailability(
'room-01',
'2025-08-22T09:00:00Z',
'2025-08-22T18:00:00Z'
);
console.log('Busy periods:', availability.busy);
Python Example
import requests
from datetime import datetime, timedelta
class RMPClient:
def __init__(self, base_url='https://[your-server]/api/v2'):
self.base_url = base_url
self.session = requests.Session()
self.token = None
def login(self, email, password):
response = self.session.post(
f'{self.base_url}/auth/gatekeeper-login',
json={'email': email, 'password': password}
)
response.raise_for_status()
data = response.json()
self.token = data['token']
self.session.headers['Authorization'] = f'Bearer {self.token}'
return data
def get_resources(self, resource_type=None):
params = {'type': resource_type} if resource_type else {}
response = self.session.get(
f'{self.base_url}/resources',
params=params
)
response.raise_for_status()
return response.json()
def create_booking(self, title, start_time, end_time, resources, attendees=None):
booking_data = {
'title': title,
'start_time': start_time.isoformat() + 'Z',
'end_time': end_time.isoformat() + 'Z',
'resources': resources,
'attendees': attendees or []
}
response = self.session.post(
f'{self.base_url}/bookings',
json=booking_data
)
response.raise_for_status()
return response.json()
# Usage
rmp = RMPClient()
rmp.login('user@domain.com', 'password')
# Get conference rooms
rooms = rmp.get_resources('conference-room')
print(f'Found {len(rooms)} conference rooms')
# Book a room
start = datetime.now() + timedelta(days=1)
end = start + timedelta(hours=1)
booking = rmp.create_booking(
title='Planning Meeting',
start_time=start,
end_time=end,
resources=['room-01@confroom.resources.[your-domain]'],
attendees=['team@[your-domain]']
)
print(f'Booking created: {booking["booking"]["id"]}')
8Next Steps
Explore More Features
- Set up recurring meetings
- Configure resource approval workflows
- Integrate with your calendar system
- Set up WebSocket for real-time updates
- Configure SaaS billing for customers
- Customize resource types and fields
- Set up multi-tenant deployments
Useful Resources
API Reference - Complete endpoint documentation
CommuniGate Pro Integration - Deep dive into XIMSS and CLI
SaaS & Billing - Set up subscriptions and billing
GitHub Repository - Source code and issues
Get Help
Support Channels:
- Email: support@[your-company].com
- Documentation: https://docs.[your-server]
- GitHub Issues: https://github.com/core-it/rmp/issues
© 2025 [core] Information Technologies - RMP v2.0