Contribuing to Screenly Playground: A Comprehensive Guide for Developers

Screenly Playground is an open-source project that provides a platform for developers to build, test, and deploy Edge Apps on Screenly displays. If you’re already familiar with the project and want to contribute, this guide will walk you through the process.

Prerequisites

Before you start contributing, make sure you have the following tools installed:

  1. Git: Screenly Playground is a Git-managed project. You can download Git from git-scm.com.
  2. Node.js and npm: Screenly Playground uses Node.js and npm for dependency management. You can download Node.js and npm from nodejs.org.
  3. Docker: Screenly Playground uses Docker for CI/CD. You can download Docker from docker.com.

Cloning the Repository

To contribute to Screenly Playground, you’ll first need to clone the repository. Use the following command to clone the repository:

git clone https://github.com/screenly/playground.git

Navigate to the cloned repository:

cd playground

Building an Edge App

To build an Edge App, navigate to the edge-apps directory and use the following command:

cd edge-apps/[app-name]
make

Replace [app-name] with the name of the Edge App you want to build. This command assumes you have already installed the dependencies for the Edge App using npm install.

Running an Edge App

To run an Edge App locally for testing, use the following command:

screenly run

This command starts the Screenly server and runs the Edge App.

Testing an Edge App

To run tests for an Edge App, use the following command:

make test

This command runs the tests defined in the package.json file for the Edge App.

Deploying an Edge App

To deploy an Edge App to Screenly, use the following command:

make deploy

This command builds the Edge App and deploys it to Screenly using the make deploy command.

CI/CD Configuration

Screenly Playground uses a Dockerfile for CI/CD configuration. To contribute, you should be familiar with Docker and Dockerfiles. The Dockerfile in the Screenly Playground repository sets up the environment for building and testing Edge Apps.

Contributing Guidelines

Although Screenly Playground does not have an official contributing guide, there are a few best practices to follow when contributing:

  1. Fork the repository: Fork the Screenly Playground repository on GitHub and create a new branch for your changes.
  2. Make changes: Make your changes in the new branch.
  3. Test your changes: Make sure your changes work correctly and pass all tests.
  4. Create a pull request: Create a pull request on GitHub to submit your changes for review.

Conclusion

Contributing to Screenly Playground can be a rewarding experience. By following the guidelines above and using the available commands, you can build, test, and deploy Edge Apps on Screenly displays. Happy contributing!

Sources:

  1. Screenly Playground GitHub repository: https://github.com/screenly/playground
  2. Screenly documentation: https://docs.screenlyapp.com/
  3. Node.js documentation: https://nodejs.org/
  4. Git documentation: https://git-scm.com/
  5. Docker documentation: https://docs.docker.com/