Flipstarter provides a way for any project to engage with potential funders in a way that encourages accountability for projects and fairness for funders.
The Flipstarter team has created these tools for anyone to use. Although we have worked hard to make Flipstarter easy to deploy and reliable to operate, the tools are offered as-is with no expectation of support. If you are not confident about your ability to deploy and manage a Flipstarter-based campaign, we recommend you work with a web developer who can manage everything for you.
Corentin Mercier offers a service here.
You need NodeJS installed on your machine, then run:
npm install
npm start
# or on windows:
npm run start-no-debug
And open up localhost:3000 in your browser.
You need Docker installed on your machine, then run:
docker build -t flipstarter .
docker volume create flipstarter
docker run -v flipstarter:/app/static/campaigns -p 3000:3000 flipstarter
And open up localhost:3000 in your browser.
ENV FLIPSTARTER_IPFS_GATEWAY_URL="http://..." //defaults to "https://ipfs.io"
ENV FLIPSTARTER_IPFS_CREATE_CID="Qm..." //defaults to QmfZZXZPTLGk3e3h5oGX25qtXf4Nmdqv5RZgUyM44CaDbF"
ENV FLIPSTARTER_API_URL="https://..." //defaults to req.get('host')
ENV FLIPSTARTER_API_REDIRECT_HOME_URL="https://..." //defaults to /create
ENV FLIPSTARTER_API_AUTH="pending-contributions" //required
ENV FLIPSTARTER_TARGET_FEE_RATE=1
FLIPSTARTER_TARGET_FEE_RATE
minimum satoshi per byte to attempt assurance contract fullfillment (client is responsible for paying enough per byte)
FLIPSTARTER_API_URL
refers to the servers public address (returned to user to embed in their client side flipstarter page)
FLIPSTARTER_API_REDIRECT_HOME_URL
refers to the URL to redirect for root (/) GET requests (set this to redirect to a default campaign)
FLIPSTARTER_API_AUTH
refers to authentication scheme. Valid values include 'no-auth', 'pending-contributions', 'confirmed-contributions'
no-auth: anyone can create a flipstarter
pending-contributions: anyone who's contributed to the default campaign (refuses to store contributions if revoked)
confirmed-contributions: anyone who's contributed to a fully funded campaign
Submit pull requests at https://gitlab.com/flipstarter/backend
HTML files are located in /views/
.
These are located in /static/
, in their respective folder.
To edit the main application script, edit /source.js
and run /webpack.sh
to process it.
application.js
directly
There are multiple ways to do this.
- Use Digital Ocean Marketplace
- Use a NodeJS image and serve
server.js
on port 80 or 443. You can also use a process manager like pm2 - Deploy the docker container on port 80 or 443 using the following commands:
# download the latest version of flipstarter
docker pull flipstarter/flipstarter
# create a volume to store the database
docker volume create flipstarter
# run the container on ports 443 and 80
docker run -d --restart always --name flipstarter -v flipstarter:/app/static/campaigns -p 443:3000 -p 80:3000 flipstarter/flipstarter
You can start and stop the container with docker [start/stop] flipstarter
.
If you deployed the app via Digital Ocean Marketplace (method 1), follow the steps:
- Point your domain name (or subdomain) to the IP address of the host using an "A" record. See instructions for NameCheap, Cloudflare or GoDaddy.
- Then, access your server via SSH and run the following commands:
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx
sudo certbot --nginx -d yourdomain.com
Make sure to replace yourdomain.com
with your own domain or subdomain.
Fill in the information, and select 2
when asked if you want HTTP traffic redirected to HTTPS.
Try reloading your campaign. Your browser should automatically show that the connection to the website is secure.
If you used method 2 or 3:
- Install Nginx, Apache or similar software.
- Run the Flipstarter Docker container on an available port - for example port 3000 (
docker run -d --restart always --name flipstarter -v flipstarter:/app/static/campaigns -p 3000:3000 flipstarter/flipstarter
). - Create a reverse proxy to serve port 3000 via Nginx/Apache.
- Install certbot and run it according to your OS and web server.