Our codebase is split into multiple repos:
app. We run those 3 node.js applications separately.
app are the client applications that you can find on
To run one of the client application locally, you need to run the
Install postgres (MacOSX)
brew install postgres pg_ctl -l /usr/local/var/postgres/server.log start
Or download Postgres.app
We currently use node
5.1.0 and npm
3.3.12. Checkout nvm for versioning node.js binaries.
git clone https://github.com/OpenCollective/api.git cd api touch .env npm install npm install -g nodemon
You should be now able to run the api with
npm run dev in autoreload mode or
Run the api
npm run db:reset npm run dev
If you have a problem with this step, you might need to grant privileges to your database (see below).
Check if the api is running properly by opening
http://localhost:3060/status in your browser.
Some environment variables might be missing from your setup, you need to add them in your
.env. If you want to test image uploading, you will need to add your own AWS config.
Now, assuming the postgres database superuser is
postgres, let's create the databases.
createdb -U postgres opencollective_localhost createuser -U postgres opencollective psql -U postgres > GRANT ALL PRIVILEGES ON DATABASE opencollective_localhost TO opencollective;
Run the website
You will need to install gulp to compile the assets: https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md
git clone https://github.com/OpenCollective/website.git cd website npm install npm run dev
The website is now running. If you run the api alongside, you should be able to go on
http://localhost:3000/opencollective to see the donation page.
The default flow is with paypal, if you want to setup the flow with stripe, you will need to connect your account in the
app (instructions below)
Run the app
git clone https://github.com/OpenCollective/app.git cd app npm install npm run dev
http://localhost:3000/login in your browser and enter the following credentials
If you want to try a Stripe donation, login with
password. You will need to click on the blue
Authenticate with Stripe button and finish the flow. You will first need to add the stripe api keys in the
.env of the
STRIPE_SECRET STRIPE_KEY STRIPE_CLIENT_ID
Please refer to the Developer Wiki for more information.