rmx

module
v0.0.0-...-e676b46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2023 License: Apache-2.0

README

RMX

Jams with friends and strangers in realtime.

Description

RMX allows you to play music people around the globe in near realtime.

Installation

Usage

Web

TODO

TUI

TODO

Develop

Clone this repo and grab all the necessary dependencies.

$ git clone git@github.com:Rapidmidiex/rmx.git
$ cd rmx
$ go mod tidy
Environment Variables
POSTGRES_URL=[postgres://user:password@host:5432/rmx?sslmode=disable]

# Optional
PORT=8080 # Default
Start the Server
Shell
$ go run ./cmd/server
VS Code

Copy env.example to .env.development and fill in the variables.

$ cp env.example .env.development

Run "Start App Server" debugger configuration.

CLI

TODO

Database Setup

You can use make and docker for easy local Postgres setup. Any of the variables can be overridden by passing the variable as an argument to make.

$ make PG_PASSWORD=hotdog postgres

If any variables are changed, be sure to update your POSTGRES_URL connection string accordingly.

Commands
  1. Create Postgres 14.6 container
    $ make postgres
    
  2. Create database
    $ make createdb
    
  3. Drop database
    $ make dropdb
    
  4. Run Up migrations
    $ make migrateup
    
  5. Run Down migrations
    $ make migratedown
    
Go query/type generation

We use sqlc to generate type-safe Go code from raw SQL. The SQL queries are defined in internal/db/query. The generated Go code is output to internal/db/sqlc.

After adding up updating any SQL, regenerate the Go code using the make command:

$ make sqlc
Running the tests

We do not use database mocks and test against a real database. By default dockertest is used to create and tear down a Postgres database for testing.

If you wish to use your own database, supply the TEST_POSTGRES_URL environment variable when running the tests.

$ go test ./...

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, Slack, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
  2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
  3. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you.

Code of Conduct

Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

Our Standards

Examples of behavior that contributes to creating a positive environment include:

  • Using welcoming and inclusive language
  • Being respectful of differing viewpoints and experiences
  • Gracefully accepting constructive criticism
  • Focusing on what is best for the community
  • Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

  • The use of sexualized language or imagery and unwelcome sexual attention or advances
  • Trolling, insulting/derogatory comments, and personal or political attacks
  • Public or private harassment
  • Publishing others' private information, such as a physical or electronic address, without explicit permission
  • Other conduct which could reasonably be considered inappropriate in a professional setting
Attribution

This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4

License

For open source projects, say how it is licensed. Commonly used open-source licenses are MIT and Apache.

Directories

Path Synopsis
cmd
cli
internal
cmd
jam
msg
Package msg contains the RMX message types for communication between clients.
Package msg contains the RMX message types for communication between clients.
pkg
fp

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL