🌸 Not production ready. 🌸
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.
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
Using postgres, so you need to setup postgres
On Mac
brew install postgresql@15
bundle install
rails generate administrate:dashboard ModelName
bundle exec rspec spec
Check that redis is running and url matches to your settings.
bundle exec sidekiq
Remember to init your guard
bundle exec guard init
and run
bundle exec guard
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 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 is at localhost:300/sidekiqWe will have many more jobs
- 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