How to work on Owncast
Owncast is a straightforward web application and compared to many projects is very easy to get running locally and contributing to.
If you’re interested in contributing to Owncast, here’s how you can get started.
How to start with Frontend development
The web frontend of Owncast is written in React with TypeScript built using Next.js.
You can browse the React components in the project using our Storybook page to get an idea of how the frontend is structured.
- Fork the Owncast repository on Github located at https://github.com/owncast/owncast.
- Check out your fork locally with
git clone https://github.com/yourusername/owncast
. - Create a new branch for your new changes with
git checkout -b my-new-feature
.
Run the web project
- Change to the
web
directory and install dependencies withnpm install
. - Start the development server with
npm run dev
. - Open
http://localhost:3000
in your browser.
You must have an instance of Owncast running locally to connect to. You can run one with go run main.go
from the root of the repository. Read more details about running development Owncast under the backend section.
Learn about how to write React Components with Owncast
We have a short document outlining the specifics of the hows and whys of our specific component approach.
Use Storybook to update and create components
Storybook is a tool that allows you to create and test components in isolation. It’s a great way to develop new components and test them out without running a copy of the Owncast server.
- Run
npm run storybook
to start the Storybook server. - Open
http://localhost:6006
in your browser. - Navigate the Storybook interface to browse and test components.
How to start with Backend development
The backend of Owncast is written in Go. It operates as a web and API server, inbound RTMP ingestion server, outbound HLS distribution server, and chat server.
- Ensure you have the Go programming language tools installed for your system.
- Clone the Owncast repository with
git clone https://github.com/owncast/owncast
. - A c compiler and tooling must be available on your system. Generally this means installing
gcc
and its development libraries. - Run
go run main.go
from the root of the repository.
Go Linting
We use golangci-lint to lint our Go code. While optional, it is a useful tool to assist you in writing better Go code. You can install it from the golangci-lint website.
Run a development stream
Many features are only enabled when a stream is live. You can run a local stream using any video file you have around by running:
./test/ocTestStream.sh somevideofile.mp4
If you haven’t yet, find an issue to work on
Visit our Good First Issues list to find something that might be a good fit for you to start on. Otherwise, feel free to drop into our community chat and say hi and we can get to know you and see where you’d like to take part.