Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/audiodude/rainfall

Bandcamp exodus solution, letting you create personal artist sites using Faircamp
https://github.com/audiodude/rainfall

bandcamp faircamp gui hacktoberfest

Last synced: 2 months ago
JSON representation

Bandcamp exodus solution, letting you create personal artist sites using Faircamp

Awesome Lists containing this project

README

        

# Rainfall

Free Bandcamp exodus tool, letting you publish music sites to Netlify using [Faircamp](https://codeberg.org/simonrepp/faircamp).

![GitHub build status](https://github.com/audiodude/rainfall/actions/workflows/ci.yml/badge.svg)
[![codecov](https://codecov.io/gh/audiodude/rainfall/branch/main/graph/badge.svg?token=rTPXFzOytM)](https://codecov.io/gh/audiodude/rainfall)
![GitHub License](https://img.shields.io/github/license/audiodude/rainfall)

This project does not aim to replicate the full feature set of the Bandcamp site/app. Instead, the goal is to allow artists to create individual websites where users can listen to and potentially download and pay for their tracks. These websites are created using the Faircamp static site generator, and can be hosted anywhere on the web.

Rainfall has reached version 1.0 of development!

![Screenshot of the Rainfall tool, on the song upload page](https://github.com/audiodude/rainfall/assets/57832/04e7088a-3d61-4dcd-b22a-445be161534e)

Currently, you can upload tracks and preview your Faircamp powered site. When you're ready, you can download a .ZIP file of your site, which you can then upload to any of the cloud providers mentioned on the welcome page, or anywhere else that hosts static websites:

- [Netlify](https://www.netlify.com/)
- [Google Cloud](https://cloud.google.com/storage?hl=en)
- [Amazon Web Services](https://aws.amazon.com/s3/)
- [Render](https://render.com)
- [Cloudflare Pages](https://pages.cloudflare.com/)
- And many others!

Future plans are to integrate with these providers, specifically [Netlify](https://www.netlify.com/), so that you can immediately upload your new website and host it for free under an account that you control. Even more future integrations might allow you to purchase a domain name through Netlify and go from zero -> running music site with just a few uploads.

## Development

Rainfall features a [Python](https://www.python.org/) backend, using the amazing [Flask](https://flask.readthedocs.io/) API framework and the [SQLAlchemy](https://www.sqlalchemy.org/) ORM (which is much less scary than it seems at first). The database system is [SQLite](https://www.sqlite.org/index.html). It is tested using [Pytest](https://pytest.org/).

The frontend is written in [Vue 3](https://vuejs.org/) using the Options API, with frontend styling implemented using [TailwindCSS](https://tailwindcss.com/) and some [Flowbite](https://flowbite.com/) components. It is tested using [Cypress](https://www.cypress.io/).

For development, you will need a `.env` file in the project root directory, and a `.env.development` file in the `rainfall-frontend` directory. The project directory may also contain a `.env.prod` file, but this is never loaded, it is purely for reference. Production environment variables are set using [Fly.io secrets](https://fly.io/docs/reference/secrets/).

### Running Tests

#### Backend

From the project root, run:

```bash
RAINFALL_ENV=test pipenv run pytest
```

#### Frontend

From the `rainfall-frontend` directory, run:

```bash
yarn run test:e2e:dev
```

## Deployment

Rainfall is deployed to [Fly.io](https://fly.io/) using a Docker container. Once you have installed [flyctl](https://fly.io/docs/hands-on/install-flyctl/) and authenticated, simply run the following:

```bash
fly deploy
```

The frontend also requires a `.env.production` file with the fields `GOOGLE_CLIENT_ID` and `VITE_GOOGLE_REDIRECT_URI`. This will be ignored by git, but needs to be present when `fly deploy` is run so that it is baked into the frontend production deployment.

The docker container will automatically be built remotely and deployed. The backend data for the production site (SQLite db and song/project files) lives on a Fly volume that is attached to the web worker.

### Running Database migrations

First, make sure the web app is running (not sleeping) by visiting the Rainfall homepage ([https://rainfall.dev](https://rainfall.dev)).

Then, log into the machine using fly ssh (first setting it up with a key if you need to):

```bash
fly ssh console
```

Finally run the alembic command:

```bash
pipenv run alembic upgrade head
```