Git Product home page Git Product logo

codefund's Introduction

CodeFund

All Contributors Build Status code style: prettier

CodeFund is an sponsorship platform to help fund open source projects and developers. Learn more at https://codefund.io

Here are a few blog posts and podcasts that discuss CodeFund:

Table of Contents

What is this?

This is the software behind codefund.io. It's an Elixir application built on the Phoenix web framework, PostgreSQL, and many other great open source efforts.

Why is it open source?

We have built our careers on open source. We all owe a great debt to all open source developers who given so much of their free time and talents to help others. We were also inspired by The Changelog, who released their platform open source. Finally, we want to be a trusted partner to the developer community. To us, ad networks have always felt a bit shady. By being open source, we invite all to critique our code and ensure we are being honest.

Development

Using Docker

  1. Setup a complete docker and docker-compose installation
  2. Clone this repository
  3. Copy .env-sample to .env
  4. Built the phoenix app into image: docker-compose build
  5. Install dependencies: docker-compose run web mix deps.get
  6. Create the database: docker-compose run web mix ecto.create
  7. Run the migrations: docker-compose run web mix ecto.migrate
  8. Seed the db: docker-compose run web mix code_fund.seed
  9. Run the services: docker-compose up -d
  10. Visit localhost:4000 to see CodeFund running.

Without Docker (native setup)

Here are some basic steps to get CodeFund running:

git clone [email protected]:gitcoinco/codefund.git
cd codefund/
# Optionally set the following environment variables (see .env-sample)
# config postgres in config/dev.exs
# start postgres
gem install fakes3

mix deps.get
mix ecto.create
mix ecto.migrate
mix code_fund.seed
cd assets && npm install
cd ../
mix maxmind.setup
fakes3 -r /tmp/fakes3_root -p 4567
mix phx.server

Running Tests

We use fakes3 for mocking S3 uploads so you will need to have this service running prior to running tests. You can run this and tests automatically with ./bin/run_tests

What To Consider On Your Pull Requests

  1. Please run mix format prior to submitting a pull request.
  2. We're working on adding typespec to the codebase. Please consider adding them to your pull requests so we can move ahead quicker.
  3. Please make sure you've added, changed or removed tests accordingly for the code you've modified.
  4. Consider running mix credo list --ignore readability,design,refactor to make sure your code is consistent and styled well.
  5. Have fun!

Road map

We have a road map of what we are going to implement next.

CodeFund Q1 Goals

If you wish to add features that are not on the road map, you're very welcome to do so. We encourage you to create an Issue before coding, so we can all discuss the relevance to the community.

Please keep in mind that the focus is to create a great platform, so we might not implement/accept all the suggested features.

Code of Conduct

Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Attributions

This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com.

We also use BrowserStack to help us ensure that the ethical ad placements are above the fold on different browsers.

Financial Contributions

We also welcome financial contributions in full transparency on our open collective. Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.

Credits

Financial Contributors

Thank you to all the people who have already contributed to CodeFund!

Backers

Thank you to all our backers! [Become a backer]

Sponsors

Thank you to all our sponsors! (please ask your company to also support this open source project by becoming a sponsor)

Contributors


Eric Berry

πŸ’» πŸ“– πŸ“¦

Miguel Angel GordiΓ‘n

πŸ’» πŸ“– πŸš‡ πŸ“¦

Justin Bean

πŸ’» πŸ“– πŸ€” ⚠️

bakaoh

πŸ’» πŸ“–

Samuel Volin

πŸ’» πŸš‡ πŸ”§

Limon Monte

πŸ› πŸ’»

Arun Kumar

πŸ’» πŸ“–

Ivan Tivonenko

πŸ’» ⚠️

Nathan Hopkins

πŸ’» πŸ“–

Erik Campobadal

πŸ’»

codefund's People

Contributors

arku avatar bakaoh avatar coderberry avatar consoletvs avatar darkdarkdragon avatar hopsoft avatar limonte avatar nasehim7 avatar oliviertassinari avatar stareintothebeard avatar untra avatar zoek1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codefund's Issues

Edit Profile

I can edit my own profile. This includes:

  • My name, email, address, contact info
  • My payment method (PayPal or ETH)
  • Paypal address or ETH address

Set up fallback campaign to be set via ENV variable

When budgets run out on normal campaigns, the next campaign loaded should be loaded from an ENV variable.

e.g. FALLBACK_CAMPAIGN_ID=____

This would modify the logic in the ad_serve_controller#details by updating the default to be this campaign (instead of what is stubbed)

Enable distribution of ETH for payable clicks

As an administrator, I can distribute funds as crypto-currency to developers.

Tasks

  • Calculating amount owed by converting prices of USD -> ETH
  • Marking payable clicks as distributed and linked to a distribution record

Edit an existing Ad Creative

As a sponsor, I can edit an existing ad creative.

This includes:

  • Budgets (daily, monthly, max)
  • Min/Max CPC
  • Messaging
  • Colors
  • Image?

add a linter, and fix the few linting errors

credo is the prefered elixir linter. Developing an elixir project with credo is easier than without it, and it helps enforce a consistent style across a project.

There are even extensions for popular code editors to display the linting errors during development:

In addition, you can add credo linting as part of the travis CI

Subtract ad spend from budgets

When a payable click occurs, the app should:

  • Display the remaining budget for the campaign
  • Discontinue displaying the ad if the budget runs out for day/month/total
  • Switches to next advertiser if previous advertiser budget is exhausted

Enhance property form

Include:

  • Weekly Impressions
  • Weekly Unique Impressions
  • Audience Categories
  • Website Type (app, docs, etc)

List Users

As an admin, I want to be able to see a list of all the user accounts. This list should include name, email and # of properties.

Add date-range filtering to the dashboard

On the dashboard, I want to be able to filter the data by date range. The date range selector should be above all charts and graphs in order to be applied to all data on that page.

When the dates change, the charts should automatically update, reflecting the new range.

Q1 Goals

Marketing Pages

Homepage content

  • How it works
  • Testimonials
  • Ethical Advertising
  • Contact
  • Live stats (#32)
  • FAQ
  • Newsletter integration (mailchimp)
  • Add better messaging UX (for flash messages)

Login

  • Email
  • GitHub (#28)
  • GitLab (#30)
  • BitBucket (#29)

Register

  • Email (#25)
  • GitHub
  • GitLab
  • BitBucket

Manage profile

  • View (#24)
  • Edit (#23)
  • Manage payment information
  • Legal agreement
  • Add funds (#22)

Property management

  • Add new website
  • Update existing website
  • Code for adding to property location (test / live) (#31)

Dashboard

  • Impressions (#15)
  • Clicks (#14)
  • Earnings (#27)
  • Distribution History (#26)

Funding History

  • List (#21)
  • View Receipt (#20)

Creative Management

  • Create Ad (#19)
  • Update Ad (#18)

Property search

  • List all properties in paginated table (#17)
  • Select projects to sponsor (#16)

Administration

  • Ability to accept crypto as form of funding from sponsors (#13)
  • Ability to distribute funds as crypt to developers (#12)
  • Integrate Rollbar (#11)

View the embed code for properties

As a developer, I can get the embed code to put on my website. This code will have a test flag to indicate whether the impression/click counts.

Ad Creative Embed Script

API endpoints will be provided. The code needs to do the following:

  • Provide a script URL that can be placed on a website
  • When the script loads (via browser), an API call is made to the impressions endpoint with browser data
  • The html (returned in the payload) will be rendered .. ideally not in iframe, but in the actual HTML inline where the script exists
  • If the link is clicked, the user is redirected to the click endpoint (this is likely handled already in the payload)

Extra credit (tip):

  • Provide a way for developers to specify in the script (or in js) some attributes of the ad to display (for example, theme (light/dark), width, height, etc.

Add funding in the form of ETH

As a sponsor, I can fund my account by sending ETH through the platform.

Tasks:

  • Create form to enter amount and calculate gas price and current pricing
  • Hook into geth in order to capture the transfer
  • Display payment confirmation
  • Notify sponsor when transaction has completed

Move Schemas to their contexts

Enhancement

Phoenix 1.3 presents us with a powerful option (Contexts) to use when modelling our application, In lieu of separating a model of your application, we would use Contexts to arrange our code and share the functionality.
More on this see this video https://www.youtube.com/watch?v=tMO28ar0lW8

Work Proposed

Move schemas from lib/schemas to their respective contexts

Done

When we can agree on how to arrange the code

Create a new Ad Creative

As a sponsor, I can add a new ad creative.

This includes:

  • Budgets (daily, monthly, max)
  • Min/Max CPC
  • Messaging
  • Colors
  • Image?

Masquerade as user

As an admin, I can masquerade as a user. When I view the user list, I can click a button that will log me in as another user. There will be a link at the top to "Return to Admin", which will return me back to my original logged in user and place me back on the user list.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.