Introduction
The hackathon theme revolved around Agritech, with a focus on several key areas critical to the agricultural sector's growth. As I brainstormed ideas, one concept stood out: creating a Kickstarter-style investment platform for agricultural practices. Farmers seeking alternative financing for their agricultural projects could post their proposals on this platform. Users interested in supporting these projects could provide the necessary funds and expect returns, along with a share of the profits.
I decided to name this innovative platform "Nafaka," choosing a catchy Swahili word that resonates with the agricultural theme.
Planning and Database Schema
I began the project by outlining the database schema. It included essential tables such as:
Users: Implemented with Devise for user authentication.
Farmers: Containing fields for names and contact information.
Investments: Featuring details like title, description, amount, and a reference to the farmer.
Transactions: Designed to store investor details, such as name, email, phone number, and a reference to the investment.
The inclusion of the transaction table was crucial, as I envisioned investors being able to pay via Mpesa. This would involve sending an STK push to their phone numbers. Additionally, I aimed to leverage Africa's robust SMS capabilities to provide investors with regular project updates.
The Homepage
The homepage of Nafaka was designed with simplicity and credibility in mind. I decided to manually onboard farmers and verify their projects initially to maintain trust. The homepage prominently displayed already onboarded farmer's investment projects, with a "verified" tag against the farmer's names, signifying their legitimacy.
Don't mind the design layout, I am bad at design, to say the least, ๐ . I hope to improve though. ๐ช๐จ
The Investment Details Page
Clicking on a particular project, such as "Sustainable Chicken Coop Expansion," led to an extensive details page. It provided potential investors with an overview of the project, the stages involved, and comprehensive information to help them make informed investment decisions.
The Investment Process
When a user clicks the "Invest" button, a page appears, displaying the required investment amount and a button to initiate the transaction.
Upon clicking "Submit Details," a transaction form was rendered.
Submitting this form triggered two essential actions:
SMS Notification: A message was sent to the investors, welcoming them to Nafaka and thanking them for investing in a specific farmer's project. The SMS also informed them to expect regular updates via text messages.
MPESA STK Push: An Mpesa STK push was generated to process the payment. My vision was for payments to be made to the Nafaka platform, allowing us to handle disbursements to farmers based on project milestones. This approach ensured close monitoring of projects, benefiting both investors and farmers.
Conclusion
While my design skills might not be the best, the core functionality of Nafaka is robust and built to support the main goal.
Incorporating Ruby on Rails, Africa's Talking SMS API, and Safaricom's Daraja API for Mpesa payments, I brought the Nafaka platform to life. This small project turned out to be a significant success, earning me third place in the hackathon. It not only showcased my growing skills but also boosted my confidence in tackling real-world challenges.