The Rappi Simulator runs as a Bun HTTP server on an Oracle Cloud Infrastructure VM. It simulates two external interactions:
POST /send-order) — acts as the Rappi app, generating mock food orders and forwarding them to the AWS API GatewayPOST /status-update) — receives order progress updates from AWS EventBridge (via notifyRappi Lambda) when a Rappi-sourced order changes stateGET /healthReturns server uptime.
curl http://150.136.150.51:3000/health
{ "status": "ok", "uptime": 123.45 }
POST /send-orderGenerates a mock Rappi order and forwards it to AWS. Accepts optional body overrides.
curl -X POST http://150.136.150.51:3000/send-order \
-H "Content-Type: application/json" \
-d '{}'
curl -X POST http://150.136.150.51:3000/send-order \
-H "Content-Type: application/json" \
-d '{"tenant_id": "sucursal_lima_centro"}'
Request body (all fields optional — random defaults are used):
| Field | Type | Description |
|---|---|---|
tenant_id |
sucursal_{string} |
Branch identifier |
customer.name |
String | Customer name |
customer.phone? |
String | Customer phone |
items |
[{name, quantity, price}] |
Order items |
Response:
{
"sent": {
"tenant_id": "sucursal_lima_centro",
"source": "RAPPI",
"customer": { "name": "Pedro Sanchez", "phone": "987654323" },
"items": [{ "name": "Whopper", "quantity": 1, "price": 18.9 }]
},
"response": { "status": 201, "body": { "order_id": "uuid" } }
}
POST /status-updateReceives status updates from AWS when a Rappi order progresses through the kitchen workflow.
curl -X POST http://150.136.150.51:3000/status-update \
-H "Content-Type: application/json" \
-d '{
"order_id": "test-001",
"tenant_id": "sucursal_lima_centro",
"status": "PENDIENTE_COCINA",
"step": "COCINA",
"timestamp": "2026-06-26T18:00:00Z"
}'
Response: { "received": true }
GET /logLists all received status updates (in-memory, resets on restart).
curl http://150.136.150.51:3000/log
{
"count": 3,
"updates": [
{ "order_id": "test-001", "status": "PENDIENTE_COCINA", ... }
]
}
| Property | Value |
|---|---|
| Name | vm-desa |
| OCID | ocid1.instance.oc1.iad.anuwcljs... |
| Shape | VM.Standard.A2.Flex |
| OS | Oracle Linux 9.7 (ARM64) |
| Public IP | 150.136.150.51 |
| Private IP | 10.0.0.16 |
| SSH Key | ssh-key-2026-05-08.key |
| SSH User | opc |
| Region | us-ashburn-1 |
| AD | fYyR:US-ASHBURN-AD-1 |
| Property | Value |
|---|---|
| VCN | vcn-lab |
| Subnet | public subnet-vcn-lab (10.0.0.0/24) |
| Security List | Default Security List for vcn-lab |
OS Firewall (firewalld):
| Port | Protocol | Purpose |
|---|---|---|
| 3000 | TCP | Rappi Simulator HTTP |
| 8000 | TCP | Other services |
| Component | Version |
|---|---|
| Bun | 1.1.43 (ARM64) |
| Runtime | systemd service |
ssh -i ssh-key-2026-05-08.key opc@150.136.150.51
/home/opc/rappi-simulator/
├── src/
│ ├── server.ts # Bun HTTP server with 4 routes
│ ├── types.ts # Shared TypeScript types
│ └── lib/
│ └── simulator.ts # Order generator + status logger
├── package.json
└── tsconfig.json
/etc/systemd/system/rappi-simulator.service
[Unit]
Description=Rappi Simulator
After=network.target
[Service]
Type=simple
User=opc
WorkingDirectory=/home/opc/rappi-simulator
Environment=PORT=3000
Environment=AWS_API_URL=http://placeholder-aws-api
ExecStart=/usr/local/bin/bun run src/server.ts
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
systemctl status rappi-simulator
sudo systemctl restart rappi-simulator
sudo journalctl -u rappi-simulator -f
| Variable | Current Value | Description |
|---|---|---|
PORT |
3000 |
HTTP server port |
AWS_API_URL |
http://placeholder-aws-api |
AWS API Gateway base URL (update when deployed) |
When AWS is deployed, two URLs need to be connected:
| Direction | Config Location | Variable | Value |
|---|---|---|---|
| OCI → AWS | /etc/systemd/system/rappi-simulator.service |
AWS_API_URL |
AWS API Gateway base URL |
| AWS → OCI | serverless.yml in backend-serverless-aws |
RAPPI_WEBHOOK_URL |
http://150.136.150.51:3000/status-update |
Repository: Proyecto-BurgerKing/integracion-rappi-gcp