Skip to content

Project's Life Cycle

ganine edited this page Apr 29, 2012 · 1 revision

The life-cycle of a project looks like this:

  1. First of all, the project owner clicks on "Submit your project", accept the guidelines, send us the project, we receive an email with its details and start a conversation with him.

  2. When the project is ready to go online, we or the project owner create the project through /projects/new. At this point, the project is not visible yet.

  3. In order to publish a project and start the campaign, we set visible = true on /projects/pending.

  4. If we don't accept the project, we mark rejected = true on /projects/pending.

  5. During the campaign, we can manage "recommended" and "home_page" on /projects/pending in order to make it appear on the recommended projects, on /explore, and on the home page.

  6. When the project reaches its deadline, it becomes "expired?" and can have one of three states: "successful?", "waiting_confirmation?", or unsuccessful (this last state does not have a method, so we know it by excluding the others).

  7. If the project's total confirmed backers >= to its goal, an expired? project is successful?.

  8. If the project is expired? and not successful?, and it is within a 3 weekdays time frame after its deadline, a project is waiting_confirmation?. The "waiting confirmation" process is more or less like this:

  9. Work with "boleto bancário", which is a payment option we have in Brazil. It's basically a document you print and go to the bank to pay. This is very common here, and necessary for us.

  10. It takes up to 3 weekdays to confirm a payment. So, if a "boleto" was generated right before the project reaches its deadline, and the project didn't reach its goal with already confirmed payments, we'll have to wait up to 3 weekdays to know if the project was successful or not.

  11. A project is past deadline and there are NO MORE "boletos" waiting confirmation (you'll know this only through MoIP's web interface and we can't automate this process right now...but if you don't use MoIP or "boletos", you wont need this): then you go to /projects/pending and click on "Can finish?". After that, the project will be selected by our daily cron to be really finished.

  12. We have a Heroku Cron Addon set to run once per day and run "rake cron". As you can see in cron.rake, "rake cron" goes through all projects that have can_finish = true and finished = false, and run project.finish! for each of them. project.finish! is the method that generate credits for the backers if the project wasn't successful, and also generate notifications for both successful and unsuccessful projects.