Skip to content

Parse Server

Parse Server is a critical component of Appgain's backend infrastructure, serving as a Backend-as-a-Service (BaaS) for mobile applications and web services.

Overview

Parse Server is an open-source backend that can be deployed to any infrastructure that can run Node.js. It provides a complete backend solution for your mobile app, web app, or IoT device.

Documentation & Resources

Official Documentation

Appgain-Specific Resources

Parse Server Videos

Parse Cloud Functions Videos

Appboost CFs Handover

Loyalty CF Training

Architecture in Appgain

Aspect App Boost App Marketing
Platform Appgain only Appgain & Shrinkit
User Creation Support/Sales team Support/Sales (Appgain) / Partner integrations (Shrinkit)
Parse Server Dedicated per suit Shared across all suits
Database Dedicated per suit Shared with namespacing
Cloud Functions Unique per suit Shared across all suits

Server Instances

Production Servers

  • ovh-parse-server - Parse server and production APIs
  • Core Parse Server - For Appgain app marketing suits
  • Shrnkt Parse Server - For Shrinkit app marketing suits

Development Servers

  • Development Parse Server - For testing and development
  • Staging Parse Server - For pre-production testing

Common Operations

Checking Parse Server Status

# Check specific suit's Parse Server
curl -X GET "https://parse-{suitId}.appgain.io/parse/health" \
  -H "X-Parse-Application-Id: app_{suitId}"

# Check shared Parse Server
curl -X GET "https://parse-core.appgain.io/parse/health" \
  -H "X-Parse-Application-Id: shared_app_marketing"

Cloud Functions

// Example cloud function
Parse.Cloud.define("hello", function(request, response) {
  response.success("Hello world!");
});

// Example beforeSave hook
Parse.Cloud.beforeSave("User", function(request, response) {
  // Custom logic before saving user
  response.success();
});

REST API Examples

# Create an object
curl -X POST "https://parse-{suitId}.appgain.io/parse/classes/GameScore" \
  -H "X-Parse-Application-Id: app_{suitId}" \
  -H "X-Parse-REST-API-Key: {restApiKey}" \
  -H "Content-Type: application/json" \
  -d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}'

# Query objects
curl -X GET "https://parse-{suitId}.appgain.io/parse/classes/GameScore?where={\"playerName\":\"Sean Plott\"}" \
  -H "X-Parse-Application-Id: app_{suitId}" \
  -H "X-Parse-REST-API-Key: {restApiKey}"

Best Practices

Security

  • Always use HTTPS in production
  • Keep master keys secure and never expose them in client code
  • Use ACLs (Access Control Lists) for data security
  • Validate all user inputs

Performance

  • Use indexes on frequently queried fields
  • Implement proper caching strategies
  • Use Cloud Functions for complex operations
  • Monitor query performance

Development

  • Use environment variables for configuration
  • Implement proper error handling
  • Write comprehensive tests
  • Use version control for Cloud Functions

Troubleshooting

Common Issues

  1. Connection Timeouts: Check network connectivity and server status
  2. Authentication Errors: Verify application ID and master key
  3. Cloud Function Failures: Check logs and function syntax
  4. Database Issues: Verify MongoDB connection and permissions

Debugging

# Enable verbose logging
export PARSE_SERVER_VERBOSE=1

# Check Parse Server logs
docker logs parse-server-container

# Monitor real-time logs
docker logs -f parse-server-container

This page is maintained by the Appgain Development Team. For questions or suggestions, please contact the team lead.

Ask Chehab GPT