I'm really curious why you picked Crystal for your startup :) Currently I'm evaluating different stacks and so far Crystal and Elixir are the ones that stand out the most. Did you evaluate other languages and frameworks before settling on Crystal? What has been your biggest pain points so far with the language / ecosystem?
Would love to hear more :)
Yeah i evaluated elixir, node.js, ruby, and ocaml.
Pain points with crystal have mostly been about one of the couple packages i depend on have a breaking change. It was common for crystal to deprecate an API which makes its way to a dependency. Its less common now in the last few months. Maybe I'm just not using the lock file correctly?
There is a little verbosity when parsing user input, like JSON or query parameters, but I've embraced writing bigger schemas or logic for validating input and its made the software better.
BUT, one thing that has been absolutely important was a static compiler. I remember using node or ruby and how many bugs i would catch later in prod after refactoring. Crystal helps big there, as would elixir since its functional but its not statically typed.
Elixir scales but I'm not a huge company yet. I want raw speed right now for the few customers i have. Elixir was a close second.
Crystal compiles slower than most languages, but (except for my website) I just use it as an API server and everything else is a Preact app so I spend most time on the Preact/Webpack stack.
We are a delivery-only cookie company. We process orders online and have lots of bakers/drivers delivering thousands of cookies a week, locally. The backend system processing orders, managing orders records and customers (ERP/CRM), and assigning to drivers is all Crystal on the backend. We started almost 2 years ago and the coronavirus really validated our business model. We don't use any 3rd party delivery services like doordash so our drivers can do 4-6 orders per hour.
No frameworks. the only external crystal dependencies are: sqlite3, awscr-s3, and jwt.
I was using just crystal template views (ECR) on the frontend but its not maintainable or advanced enough so I'm slowly transitioning everything to Preact.
That’s how I started it. I didn’t want to start a company with a complex setup. The whole service runs on a single machine so it’s very fast and simple. I just back up the SQLite file every hour to s3. Its easy to download that file from s3 to use production data in development.
If I start getting scaling problems I’d have to start using multiple servers and at that point I’d need Postgres.
But we’re at ~36 employees and 8 figures of revenue on a single server.
I can probably go another year or 2 without a big database.
I built my startup using crystal and now I write crystal full time.
I’m still only using a single dedicated server with a SQLite database.