Skip to content

Latest commit

 

History

History
74 lines (52 loc) · 2.86 KB

README.md

File metadata and controls

74 lines (52 loc) · 2.86 KB

README

🌸 Not production ready. 🌸

Screenshot 2024-12-25 at 20 12 08

Plant A Tree - https://www.planteenboom.nu

Project to sell more trees to offset CO2. Support is welcome, you can go to the site and find a way to contribute. We are migrating one service at a time.

Original project cleanup

Originally this project was a ticket selling system with a websocket reservation notifier from Sidekiq. However after discussions with PlantEnBoom and looking at their needs there are several things that had not converged thus cleaning up is needed and there are bunch of files just commented out. The discussion is different now on what is actually required.

Basically the project will add Webhooks to notify the backend of any new customers or bought trees from Shopify, from ChargeBee we get the suvscriptions, and accordingly the process is automated so that only a few steps require aminds to touch anymore. CRM is updated and trees allocated to users, then customes are emailed via CRM (also automated) and there will be a link on the email where user can go and print a certificate with unique codes of each tree owned.

Add some forms in React, and some self created analytics on how much C92 the user has offset.

Add logic

DATABASE

Using postgres, so you need to setup postgres On Mac brew install postgresql@15

Install gems

bundle install

Generate dashboards for administrate

rails generate administrate:dashboard ModelName

Run tests

bundle exec rspec spec

Sidekiq

Check that redis is running and url matches to your settings. bundle exec sidekiq

Guard

Remember to init your guard bundle exec guard init and run bundle exec guard

Reek

Check stinky code, so many opinions, I relaxed rules bundle exec reek . or to file bundle exec reek . --format html > reek_results.html

Pricing functions

Pricing functions will have precision 15 and scale 6. US tax code has for example this type 6.1235% calculations, and there are currencies that you need to multiply by one million to dollar.

Sidekiq Dash

Screenshot 2024-12-18 at 10 57 23 Sidekiq dash is at localhost:300/sidekiq

We will have many more jobs

Screenshot 2024-12-19 at 13 59 17

TODO

  • Coverage to 99% once shape is alpha ready
  • Add device
  • Add API for React front app for a map showing tree locations
  • Add CSV
  • Capybara tests
  • Check if Tailwind has errors
  • Fix administrate with session deletion
  • Add environmental variables for passwords, redis-url
  • After structure sets in write tests to cover full project