Using JavaScript with Laravel through Inertia and Livewire

For the upcoming Icehouse Ventures investor portal we chose to build the application using Laravel, which is a php framework. Frameworks like Laravel speed up the development process by providing a lot of the scaffolding that you need for a modern web app.

Mockup of the upcoming Icehouse Ventures Investor Portal.

We started off looking at using off-the-shelf tools such as venture capital fund management software and various online angel network platforms. But we couldn’t find any tools that would allow us to provide combined reports that showed a consolidated view of both direct angel investments into a company and indirect fund investments into the same company through a fund the investor was a part of. Investors told us that this was a mission-critical feature so they could evaluate their effective exposure to particular startup companies in their portfolio.

We also evaluated a range of other low-code and no-code solutions such as Salesforce and various template-based databases and website builders. These were ok, but couldn’t handle the depth of complexity investors wanted such as calculating IRR over long time periods, exporting PDF statements and ranking portfolio performance against other investors.

Laravel uses the classic Model-View-Controller architecture.

In the end, we chose php and in particular Laravel because of the robust stability of a MySQL database and the power of the Model-View-Controller approach to the code structure. MVC is a common pattern used in enterprise architecture to build scalable and stable software systems, the key elements are:

  • Model – A data model that manages your database and represents data as objects that can have relationships with other objects. For example, we have a model for Users and a model for Companies in the investor portal.
  • Controller – Traffic controllers that manage how data moves around your application. Controllers fetch data from the Models and send it to the Views. In Laravel, the controllers do a lot of heavy lifting in the background such as security, permissions, sorting and filtering.
  • View – Templates that render html and CSS for the end-user to see what you want to show them. Laravel uses a php and html template format with no JavaScript interactivity by default.

Adding JavaScript to Laravel

As much as I love php, we wanted to provide investors with a modern app-like experience. To do this we needed a modern JavaScript framework such as React (from Facebook), Angular (from Google) or Vue (an open-source JS framework). I chose Vue because it’s popular in the Laravel community, not owned by a giant tech company and is the fastest to learn for a non JS developer like me.

There are several approaches to getting front-end JavaScript frameworks to work with back-end applications like Laravel:

ApproachAdvantagesDisadvantages
Single Page Application with API – The traditional approach has been to build the JS front-end as a single page application and feed the data through to the app using a private API.By keeping things separate, it’s easy to focus on one thing at a time. Back-end developers can work on the back-end code and front-end developers can focus on the front-end code.My experience with SPAs was that I wasted a lot of time keeping the API and the front-end talking to each other. Frustrating points included login tokens and data-table filtering. In a small in-house tech team there’s no such thing as separate back-end and front-end teams, we’re all full-stack by necessity.
Livewire – This approach allows you to use little bits of JavaScript inside your normal php templates.It’s cool to have php everywhere and JavaScript only where you most need it. Like a modern framework approach to JQuery.The disadvantage of Livewire is that it’s still mainly using php not JavaScript, so it doesn’t have the app-like feel of an SPA. It’s also not full-on best-practice JavaScript using Vue or React so you miss out on the Vue and React templates and resources.
Inertia – This is a new way to use JavaScript inside the MVC framework of a php app. The Model and Controller are in php and the View is in JavaScript.Best of both worlds. Inertia lets php do what it does best (databases, models, relationships, security, etc) and JavaScript can do what it does best (render the front-end interface and provide interactivity).Not technically an SPA. Requires some finesse to make it feel fully app-like and the progress loader is a bit clunky. Inertia puts JS right inside your php monolith so you now have a multi-language code base that might feel weird to some developers.
Livewire is a new method for using JavaScript inside a php template.

Laravel 8 was released recently and now includes both Livewire and Inertia as options for the default Laravel user interface templates (called Jetstream). This is exciting because it will expose these two new approaches to more developers. But it’s been confusing for a few developers who are used to thinking of JavaScript as a different world from php.

Inertia allowed us to use Vue JS in our Laravel app.

On balance, we opted to use Inertia for the Investor Portal because it kept our code base all in one place and allowed us to move fast and change things quickly based on user feedback. I’ve already had dozens of moments where we wanted to make a change to the way that something is displayed in the portal. It’s a true joy to be able to make a quick change to the Company model, flow it through the Direct Investments controller and have it pop up in the investor portal Vue file all in the same code-base, with easy Laravel debugging and easy feature-testing and front-end testing. By having Vue running inside Laravel I’ve upskilled quickly on JavaScript without having to go all-in on complex JS routing and data manipulation.

Notice the simple call to Inertia from the Controller. Just like a Blade template.

We also went for Tailwind CSS instead of the more established Bootstrap CSS framework. Tailwind is a utility framework approach which means that instead of single giant templates in CSS with little HTML tags you just layer lots of little HTML tags onto an element to make it look the way that you want. It seems messy at first but once you get used to it, it’s life changingly fast. Using Tailwind, Alipne JS, Livewire and Laravel is called the TALL stack and I’m calling Vue, Inertia, Tailwind and Laravel the VITL stack. (Some people prefer the name LIT for this stack but I think Vue is a vital part of what makes this approach so awesome).

Building software in-house is an unusual move for a Venture Capital fund but Icehouse Ventures has a unique approach that combines the scale of the Ice Angels network and the depth of major funds like IVX and Tuhua. Globally, the venture capital industry is being quickly re-shaped by increased investor demands for transparency & reporting and by startup founder demands for faster decision making & streamlined capital raising processes. Technology can be a force multiplier for us and having both php and a modern JavaScript framework like Vue in our toolkit means that we can move faster while still keeping things safe, stable and secure.

Equity Crowdfunding is the Ultimate Customer Loyalty Program

Alex Tynion from SeedInvest and I sat down recently to talk through some of the things that we’ve learned from helping the first few companies who have “tested the waters” under the new Reg A equity crowdfunding rules. Regulation A is an equity crowdfunding rule that allows private companies to raise money from the general public. So far, we have helped three companies on SeedInvest to reach over $10M in indicated interest from over 2,000 people each.

There are some common mindsets and practices that we’ve seen across the companies that have been most successful with equity crowdfunding.

Continue reading Equity Crowdfunding is the Ultimate Customer Loyalty Program

The Moral Hazard Created by Abundant Startup Funds

I vehemently disagree with a lot of this article, but it’s so well written that I just had to share it. Murad Ahmed from the Financial Times neatly captures the changes that are happening in the London startup scene and the increase in angel investing and venture capital in Europe.

For 4 years I lived through the heyday of this boom in UK startup funding. But my experience was that to go along with the increase in investors, there has been a corresponding increase in startups so that the two have balanced each other out. The good startups that get funded by good investors are still dedicated, hardworking and humble.

I’ve reproduced the article from the Financial Times site below because the article is so important as a record of a certain time in London’s startup scene and it would be a shame to lose it. You can see the original article, if it’s still visible on the FT site.

Enter FT journalist Murad Ahmed

Continue reading The Moral Hazard Created by Abundant Startup Funds

Traction: A startup guide to getting customers

One of my favorite marketing books to refer to for ideas is Traction: A startup guide to getting customers by Gabriel Weinberg and Justin Mares. Their first edition was also available as an audiobook on Audible. They are now in the process of publishing a 2015 second edition so I thought I’d take a moment to share some of my favorite parts of the book. Continue reading Traction: A startup guide to getting customers

Bringing Venture Capital online at SeedInvest

I recently joined the SeedInvest team in New York. SeedInvest is a leading equity crowdfunding platform that is streamlining the startup investing process so that new types of investors can invest directly in early stage companies. I’m responsible for digital marketing and helping startups promote their campaigns to investors. It’s been a big couple of months for me, so I thought I’d take a moment to update you on what I’ve been up to.

1. I’ve moved to New York

New York has always been a centre of financial innovation and the earliest venture capital investors almost all started out in New York before moving to Silicon Valley. I’ve always wanted to live in New York. In late 2014 I won the green card lottery and we have now relocated permanently to the USA. So far, we’ve been using AirBnB to experiment with different neighbourhoods and have fallen in love with Tribeca, Nolita and Brooklyn Heights.

New York has a great environment to build a startup. The city is alive 24 hours a day and there is a great mix of design, business and technical skills. I love the intense energy and the mix of cultures from all over the world.

2. I’m still working with startups

As soon as I knew that we were moving to the states, I started researching the emerging American equity crowdfunding platforms. I’ve long believed that democratising the financing of small businesses will be one of the greatest shifts in the structure of capitalism since the advent of the public stock markets. Allowing new entrepreneurs and new investors to find each other will create new companies, new jobs and new opportunities. I loved being part of investment platform Seedrs in the UK and with recent changes in US securities laws, the timing was perfect to transfer these skills to the USA.

Continue reading Bringing Venture Capital online at SeedInvest

Dave McClure on equity crowdfunding

Brant Cooper and Patrick Vlaskovits interviewed VC investor Dave McClure as part of their book the Lean Entrepreneur. The Lean Entrepreneur was published in 2013 and I picked up a copy after seeing Patrick Vlaskovits speak at the Innovation Warehouse in London.

Patrick has a really practical and grounded approach to innovation, growth hacking and the world of startups. He’s been an inspiration to me and has contributed a lot back to the community through mentoring and coaching various startups.

After reading the book last year, I got a copy of the audiobook on Audible. Some of the checklists and bullet-points don’t survive the transition to audio that well, but overall the audiobook was excellent and I recommend it alongside the Lean Startup as one of the key audiobooks for entrepreneurs and investors.

Continue reading Dave McClure on equity crowdfunding

Mark Suster and Clayton Christensen on equity crowdfunding

In 2013 Mark Suster a leading VC investor and Clayton Christensen a leading business author sat down at Startup Grind to talk about disruptive innovation and startup investment. Their conversation touched briefly on the subject of equity crowdfunding. Both Mark and Clayton are extremely cynical about equity crowdfunding. Some of their concerns are sensible questions about an emerging industry. But what they were secretly doing was arguing for the old model. I’m a big fan of Mark’s blog and Clayton’s books but they’re wrong about the disruptive potential of equity crowdfunding.

VC investor Mark Suster and business author Clayton Chistensen at Startup Grind.
VC investor Mark Suster and business author Clayton Chistensen at Startup Grind.

By betting against against equity crowdfunding, Mark Suster is betting against the internet. I believe the internet will do the same thing to early stage finance that it does to all industries. Namely, make them more competitive, connected and democratic.

Continue reading Mark Suster and Clayton Christensen on equity crowdfunding

Equity crowdfunding at Seedrs

Seedrs provides a tool that startups can use to raise capital from their friends, family, customers and the crowd. This process is often called “equity crowdfunding” because it’s like Kiva or Kickstarter, except that the investors get equity in the company instead of a product or a loan. In January 2014, I joined Seedrs as part of the marketing team.

Seedrs Team Wired Magazine
The Seedrs team have been featured in Wired, TechCrunch, the Financial Times and the Wall Street Journal.

At the end of last year, Seedrs raised 2.58 million pounds from over 900 investors using their own platform. That means that in my new marketing role, I now have over 900 bosses. I feel very accountable for the success and growth of the business. In this blog post, I want to share two main things about my new role, the expanded view of marketing that we’re taking at Seedrs, and the way that we’re incorporating lean manufacturing habits and processes into our team culture.

Continue reading Equity crowdfunding at Seedrs