Skip to content

Latest commit

 

History

History
154 lines (103 loc) · 6.78 KB

CONTRIBUTING.md

File metadata and controls

154 lines (103 loc) · 6.78 KB

Contributing to Presenter

Thank you for your interest in participating!

There are many ways to contribute, beyond writing code or programming, by: logging bugs, reporting issues, and creating suggestions. To do so, please create a ticket in our issue tracker. (See other ways to Contribute or give Feedback.

This document is for developers or programmers contributing to the source code of Presenter.

Table of Contents

Getting Started

If you wish to better understand how Presenter works or want to debug an issue: get the source, build it, and run it locally.

Prerequisites

In order to download necessary tools, clone the repository, and install dependencies, you'll need network access.

You'll need the following:

Get the source code of presenter repo:

gh repo fork shabados/presenter --clone=true

PROTIP: Use the gh cli tool from GitHub to fork the repo to your GitHub account (if not already), clone it to your local machine, and set the appropriate remotes for origin and upstream with the above command.

Build

Run npm i in the root directory.

Start

npm start

Use the above command to spin up development servers. It will launch a frontend server on port 3000 and a backend server on port 42425. Any changes to the backend will result in the server restarting. A manual restart can be triggered by entering rs into the terminal.

Run

Usage:

npm run <command>

The commands are:

lint                   # ESLint all files
lint:backend           # ESLint files in app/
lint:frontend          # ESLint files in app/frontend/
start:backend          # Start app/
start:frontend         # Start app/frontend/
start:electron         # Start electron in app/
build                  # Use react-app-rewired to build in app/frontend
install-deps           # Run npm install for entire project
install-deps:backend   # Run npm install in app/
install-deps:frontend  # Run npm install in app/frontend/
pack                   # Create a binary
dist                   # Create an installer
release                # Create an installer (duplicate)

Run npm run or open the package.json file(s) for a full list of commands.

To produce a tree-map of the bundle and look for potential bloat, run npm run build at least once, and then npm run analyze.

Package

Electron-builder is used to generate binaries. Run npm run pack for the binaries to test on your platform, and npm run dist to build an installer. The production builds launch a frontend server on port 1699 and backend server port 42424.

Codebase Overview

The app folder contains the Electron wrapper, the backend Node application, and the frontend React application.

The frontend is using create-react-app, websockets for synchronizing clients, and API for search.

The backend is using proposed ES+ modules with the esm shim module.

Workflow

The workflow of development (or Git Flow) is to choose/create an issue to work on, create a feature branch, and submit a pull request.

PROTIP: Read more about our workflow (issue tracking, branching, and pull requests) in the How To Contribute wiki article.

Coding Guidelines

Please see the wiki for Coding Guidelines (Names, Comments, Style, Linting, and Commit Messages).

Scope

To be used in commit messages.

Usage:

<type>(<scope>): <subject>

The scopes are:

backend
frontend/controller
frontend/overlay
frontend/presenter
frontend/settings

Thank you

Your contributions to open source, large or small, make great projects like this possible. Thank you for taking the time to participate in this project.