Category Archives: Uncategorized

Searching for a new site idea on Reddit!

Backstory

A bit of a different sort of post this time. I’ve been looking for a new side project for a couple of weeks after finally deciding to shelve the one I’ve been working on for the last six months or so.

I had intended to build a small scraping bot as a subscription service for recruiters but soon realised that this was a pretty typical (and bad) pattern for me. I enjoy the building phase so I tend to build apps without verifying the market. I then dread engaging an unknown market and move onto something else.

I decided I would at least try to do things properly this time. Instead of building an idea of my own I decided to find a business and ask them if they had any issues that were big enough that would pay a monthly subscription to fix.

My first point of contact was an old colleague that had hired me to do some freelance work a number of times. They were keen, but unfortunately they would be pretty tied up with another project for at least the next few months.

At this point I almost went back to the recruiting idea until thinking of an approach that was a little different and definitely outside my comfort zone…Reddit?

I searched a few entrepreneur subreddits but they didn’t seem to be quite right. I then came across https://www.reddit.com/r/smallbusiness which looked a bit more promising. I had hoped to find an Australian version so that I could work with someone a bit closer to home but there didn’t seem to be a decent equivalent. I did a bit more browsing and eventually decided that /r/smallbusiness was probably a pretty good starting point.

The Reddit Post

Posting to social media is definitely not something that I normally do. I occasionally comment, but for the most part I’m pretty passive. This is the post I ended up putting on the site:

I spent a bit of time thinking about how to approach this and decided that there were a few key things I needed for a businesses problem to be suitable.

Should be a subscription service

I have spent a lot of time building market places and platform services. Unfortunately these tend to take a long time to develop and accepting payments on behalf of another business can get complicated and potentially risky. Communicating these requirements via Reddit would be challenging at best.

A simple subscription service using stripe will significantly cut my development time. Building a product that charges a monthly subscription also gives me an easy way to evaluate how much a solution is worth to a customer. If they’re not willing to pay a subscription I immediately know that I need to look for another problem. I decided that $10/month was probably a good figure to start on. If they were willing to pay that I would consider the project, if not I’d move onto the next.

The scope should be small and easily defined

The proposed problem needs to have clear and easily defined requirements. It’s quite likely that I will only have a few short comments to get ALL of my information. I need to be able to understand it quickly and to be able to develop an MVP without any additional input from the user.

Preferably a B2B problem, not B2C

This one is more of a personal preference and definitely not firm but I find it’s easier to work with a business than a customer and there’s generally a bit less competition.

The Comments

I had half expected for my post to get removed and skim reading the very first comment definitely gave me a bit of a scare:

But luckily my post stayed up and it was only a short while later that the first business problem was posted:

I was pretty happy with this one. I have previously built a few booking systems for driving schools so I knew this was something I’d be able to do. Unfortunately, a few comments later confirmed my sneaking suspicion that this would be a fairly saturated market:

I was definitely still open to the idea, but decided to wait and see if there were any more ideas that cropped up.

It took a little while, but eventually there was another suggestion that piqued my interested:

It took a couple of comments to sort out exactly what was being requested for this one:

There were a few important bits to this one that put it at the top of my list. Firstly, the problem is well defined and there’s definitely room for an MVP with potential to extend the scope if things go well.

The problem is also something that I can see appealing to other businesses that are just chasing a bare bones asset management system. A fully fledged system is complex and requires a high price tag in order to justify the development cost. This was much smaller and definitely something that a single developer could pull off.

The third, and probably most important factor is that the seller would be elated to be able to find a solution for $25/month. The number here is important because I had only put forward a $10/month price – they were definitely keen to find a solution.

The snag

I worked on a few quick mocks and shared these with the potential customer. She seemed pretty happy and had a few suggestions around including imports/exports and a number of additional fields.

At this point I was pretty happy with things and decided to do a bit of competitor analysis. Unfortunately, this is when I came across AssetTiger:

They had literally everything that the customer was looking for and well within their budget of $25 per month. I double checked with them to confirm my suspicions and unfortunately it looked like AssetTiger was exactly what they were after:

They were were pretty appreciative and even offered to send a donation which was a really generous offer. Unfortunately, I’d now exhausted all of the project suggestions on the post.

What next?

I really liked the quick feedback on the suggestions in /r/smallbusiness and have decided that I will try this on a few more subreddits to see if the approach will work.

One thing that I would like to do a little differently is to try targeting an underserved industry specific subreddit e.g. agriculture or weddings. I think that this might help to mitigate the issue of suggestions that already exists – other redditors are likely to chip in with solutions that they use. Because everyone in the subreddit is in the same industry I think there’s also good chance that it will allow me to identify if multiple people are affected by the problem.

Anyway, if you’ve made it this far – thanks for reading! I’ll post an update on how the next reddit posts go!

Adding a Custom Domain Name – AWS SAM

Hi everyone,

It’s been a long time but I’m messing around with AWS SAM again. I’m currently converting www.testerwidgets.com into an AWS SAM application. As part of this I needed to add a custom domain. Unfortunately, the doco on how to do this isn’t great so I’m going to share what ended up working for me just in case it helps someone else.

To start, these are the resources that you’ll need in your template.yaml:

Resources:

  ApiCertificate:
    Type: AWS::CertificateManager::Certificate
    Properties:
      DomainName: !Sub api-${Stage}.YOUR_DOMAIN.com
      ValidationMethod: DNS

  ApiGatewayApi:
    Type: AWS::Serverless::Api
    Properties:
      StageName: !Ref Stage
      # Allows www.YOUR_DOMAIN.com to call these APIs
      # SAM will automatically add AllowMethods with a list of methods for this API
      Cors: "'www.YOUR_DOMAIN.com'"
      EndpointConfiguration: REGIONAL
      Domain:
        DomainName: !Sub api-${Stage}.YOUR_DOMAIN.com
        CertificateArn: !Ref ApiCertificate
        Route53:
          HostedZoneName: "YOUR_DOMAIN.com." # NOTE: The period at the end is required

You’ll also need to make sure your reference the gateway from your function:

  # This lambda function handles is used to test endpoint availability.
  getPing:
    Type: AWS::Serverless::Function
    Properties:
      Handler: src/handlers/get-ping.getPingHandler
      Runtime: nodejs14.x
      Architectures:
        - x86_64
      MemorySize: 128
      Timeout: 30
      Events:
        Api:
          Type: Api
          Properties:
            Path: /ping2 # NOTE: AWS overrides the ping command.
            Method: GET
            RestApiId:
              Ref: ApiGatewayApi # NOTE: Make sure you have this referencing correctly.
      Description: Responds with 'Pong' if successful.

Now when you run AWS deploy it will continue as usual until it gets to the stage of creating your certificate:

Here it is looking for a specific DNS entry in order to confirm that you own the domain. You’ll need to go into Route53 (or whichever other DNS provider you’re using) and add a CNAME entry with the specified details:

Note that your name and value contents should come from the output of the ApiCertificate job (highlighted in the screenshot above).

Once that’s done you’ll need to wait about sixty seconds for the DNS records to propagate within AWS. You should then be able to access your api using the new domain:

Thanks to the follow github post for the pointers in the right direction: https://github.com/aws/aws-sam-cli/issues/2290

aws sam No hosted zones named found

Note that if you get the error above when trying to deploy please ensure that you’ve added the trailing “.” to your Route53 HostedZoneName in the api-gateway in your template.yaml:

Domain:
        DomainName: !Sub api-${Stage}.yourdomain.com
        CertificateArn: !Ref ApiCertificate
        Route53:
          HostedZoneName: "your-domain.com." # NOTE: The period at the end is required

.Net 5.0 – This package is required for the Entity Framework Core Tools to work

I was trying to create a migration in a new project within a solution and received the following error:

Build started…
Build succeeded.
Your startup project ‘SubscriptionManagementGrpcService’ doesn’t reference Microsoft.EntityFrameworkCore.Design. This package is required for the Entity Framework Core Tools to work. Ensure your startup project is correct, install the package, and try again.

The error was a bit confusing because all of my migrations for the rest of the solution were still working and none of my other startup projects had Microsoft.EntityFrameworkCore.Design as a reference.

After a bit of comparing I realised that the other projects all referenced data projects that in turn referenced Microsoft.EntityFramework.Design. Adding the package reference to the subscription data library referenced by my GrpcService fixed the issue.

Docker Volumes Mounting File as Folder on Windows

Hey everyone,

I ran into a small issue today using docker-compose. I had a config file I was trying to mount as a volume however running “docker-compose up” generated a folder instead.

ERROR: for grafana Cannot start service grafana: OCI runtime create failed: container_linux.go:349: starting container process caused “process_linux.go:449: container init caused \”rootfs_linux.go:58: mounting \\\”/host_mnt/e/repos/Sample-Twitch/grafana/datasources.yml\\\” to rootfs \\\”/var/lib/docker/overlay2/f5c9553407551b68dc5d5877d748ba2bf7d2f0dd2ad12c73e39be40af185c82d/merged\\\” at \\\”/var/lib/docker/overlay2/f5c9553407551b68dc5d5877d748ba2bf7d2f0dd2ad12c73e39be40af185c82d/merged/etc/grafana/provisioning/datasources/prometheus.yaml\\\” caused \\\”not a directory\\\”\””: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ERROR: Encountered errors while bringing up the project.

The issue turned out to be an oversight on my part, I’d misspelled the config filename and docker was unable to find it. Consequently, it generated the missing file as a directory.

It took a bit of Googling to narrow this down, but eventually this stackoverflow post pointed me in the right direction: https://stackoverflow.com/a/44950494/522859

Thanks,
Chris

Useful RabbitMQ Commands

Hey everyone,

This is more for personal reference, but hopefully it’s able to help someone else as well. This post will simply be used for a list of RabbitMQ commands that I’ve found handy and may need to use again down the track.

CommandDescriptionReferenceMisc
rabbitmqctl stop_app
rabbitmqctl reset # Be sure you really want to do this! rabbitmqctl start_app
Used to completely reset rabbit mqhttps://stackoverflow.com/a/11459967/522859

Useful Docker Commands

Hey everyone,

This is more for personal reference, but hopefully it’s able to help someone else as well. This post will simply be used for a list of docker commands that I’ve found handy and may need to use again down the track.

CommandDescriptionReferenceMisc
docker build -t “twitch/warehouse” -f .\Dockerfile-warehouse .Build and tag an imageUsed while following this tutorial: https://github.com/MassTransit/Sample-Twitch
docker psList all running containers
docker exec -it <container_id> shAccess terminal of running containerhttps://stackoverflow.com/a/30173220/522859
docker stop <container_id>Stop a running containerCan then start it again using docker start <container_name>

MassTransit with Mediator – ‘IServiceCollectionBusConfigurator’ does not contain a definition for ‘AddMediator’ and the best extension method overload ‘DependencyInjectionRegistrationExtensions.AddMediator(IServiceCollection, Action)’ requires a receiver of type ‘IServiceCollection’

Hi everyone,

I’m currently learning MassTransit by following a great video series by Chris Patterson: https://www.youtube.com/watch?v=dxHNAn69x6w&list=PLx8uyNNs1ri2MBx6BjPum5j9_MMdIfM9C&index=1. Unfortunately, when trying to add mediator as instructed in the first video I hit the following error:

‘IServiceCollectionBusConfigurator’ does not contain a definition for ‘AddMediator’ and the best extension method overload ‘DependencyInjectionRegistrationExtensions.AddMediator(IServiceCollection, Action)’ requires a receiver of type ‘IServiceCollection’

After a bit of Googling I came across some upgrade documentation with the following highlight:

Container configuration has changed, and now uses the AddMediator method (instead of AddMassTransit).

The solution ended up being as follows:

services.AddMediator(x =>
{
x.AddConsumersFromNamespaceContaining();
x.AddRequestClient();
});

Thanks to this link for the info: https://masstransit-project.com/getting-started/upgrade-v6.html#version-7

Overwrite Selected Tree View Item Styles – Material UI ReactJS

Hi everyone,

Just a quick post on how to overwrite the styles of a selected tree item using material ui and ReactJS:

treeItem: {
paddingTop: theme.spacing(1),
‘&[aria-selected=”true”][aria-expanded=”true”] > div:nth-of-type(1)’: {
backgroundColor: ‘red’,
}
},

This will make the background color red for ONLY the selected item:
material-ui-tree-view

Cheers,
Chris

Failed to load the development https certificate using docker and ocelot

Hey everyone,

I randomly started encountering the following error while using docker to host my Ocelot gateway:

Failed to load the development https certificate at ‘/root/.aspnet/https/ContentGateway.pfx’.

The solution ended up being to clean out as many temp files as possible, especially the generated certs:

  • Delete the following files: Delete the C:\Users{USER}\AppData\Roaming\ASP.NET\Https folder
  • Clean the solution. Delete the bin and obj folders (I just did this for the gateway project)
  • Restart visual studio/visual code

I’ll add an update if I can narrow down what caused the initial issue but for now this seems to work.

Thanks to the following links for the info:
https://docs.microsoft.com/en-au/aspnet/core/security/enforcing-ssl?view=aspnetcore-3.1&tabs=visual-studio#trust-the-aspnet-core-https-development-certificate-on-windows-and-macos
https://stackoverflow.com/q/52457514/522859