56 points · by SnowingXIV · 10y ago · 74 comments
I've had other posts where I'm trying to find a good CRM, and have come to the conclusion that some will get me close but ideally building a bespoke version would give me full control and be able to add whatever features I want without arbitrary limits. Additionally, since it's a larger undertaking compared to previous projects a lot of experience could come from it.
Front end: We use Ember because of its balanced focus on progress and stability. The team behind it is solid and batteries are included.
Application: Ruby/Rails, Elixir/Phoenix. Rails is great for getting up and running quickly, and your problems with #scale won't be on the application later. Elixir (really Erlang's BEAM) is great at quickly spinning up/down lightweight processes that handle raw data. So if you want to build a CRM and, say, manage emails, then it could be a good fit. Or if you want to process a 1,000,000 row CSV import, etc.
Database: Postgres. Binary JSON columns give you flexibility, plus PostGIS for all of your geospatial needs. Structure as much as possible to take advantage of the smart people who have spent countless hours building a world class database. You'll appreciate their focus on correctness.
My overarching advice: push everything as far down the stack as possible. If you can do it in Postgres, do so. Data correctness is your life; better that your DB throws a fit than your application serving bogus data.
Happy to answer any specific questions!
(And I wouldn't be a YC CEO if I didn't take the opportunity to mention that we're hiring! http://seneca.systems/careers)
@Tyre: we use React on the front end but have struggled with meeting customer's UI expectations for Master/Detail displays of tabular data... the mobile UI design paradigms on this are so rich, are there any best practices for web UI?
Thanks!
NB Mind you - I can definitely see the advantages of using JSON but a lot of developers seem to resist dynamically altering relational database structures when it can actually work pretty well.
What expectations are you having trouble with?
As for mobile, I wouldn't try to have it do everything that the desktop version does. It's just not possible, at least not well, with that size screen and type of input.
Sorry, this is heading off topic for the OP, but interesting to note the priority of your first hire -- smart choice!
Yep you're right, most of these are essentially putting a UI on a database and that part has to be right - otherwise you have much bigger problems.
Hah, well if things don't exactly work out I'll have http://seneca.systems/careers/product/front-end-engineer bookmarked.
Applications like Salesforce and MS Dynamics CRM are pretty much platforms for building applications as much as CRM applications - indeed in both cases you can license them in ways where you get the flexibility of the platform without access to the standard CRM entities.
I've gone over Angular 2, React, Vue.js, Ember, Polymer, and so many more. The one I really connected with is Vue. While I realize it's only been gaining popularity in recent months, there are some big companies who start to make use of it in big scale production sites (Alibaba, Laraval, ...), this makes me pretty confident that support will not be an issue.
For the db I would definitely choose Postgres, but I would go for plain old relational tables, and maybe use its JSON features for data which is isolated and does not relate to other data (e.g.saving spreadsheets data).
For the server I would choose NodeJS + Express + SequelizeJS, and I will probably make use of some GraphQL library up ahead too. But honestly, if you choose to make your system a SPA, then your server will not do much of the heavy lifting anyways - it will probably expose an API point and be used as an interface to the database, so I think any back-end stack would fit in. I would also consider Python + Flask + SQLAlchemy, which used to be my stack of choice few years back.
The biggest disappointment I had by not using Node is that I couldn't easily integrate all the beautiful javascript libraries by just loading a module from npm.
For example, I'm using Quilljs for text entry, and I have to write something that parses Quill's JSON output and turns it into a renderable html/markdown. If I had used Node, there is already a module for it :).
If I started from scratch, I would have designed the back-end first without using any library. (I would define my objects User, Post etc. and hid the SQL as methods (e.g create, update, delete) under the hood) That way, I could debug the app, add new features without having the need to setup a web server. I could also write sound unit tests. I seriously regret not having done that.
The problem with my CMS was, that it was easy at the beginning. My customers asked new features and I just hacked them in. Now, my code is still legible, but since I've used wrong abstractions, it's a pain to add new features.
Your mileage may vary, I was inexperienced with FLASK and SQL at the time I started the CMS. I've learned a lot during the making and wanted to share my two cents.
I've been dealing with different CRMs recently (SFDC, Netsuite, MS Dynamics, AgileCRM) and I don't think tools really matter, architecture that will allow you to customize everything is the key for CRM
As my personal choice it would be (I'm a full-time Python dev)
* Java/C# (there's nothing really dynamic in crm, entities, fields, etc with different "name" and "display_name" for each customer, IDE would allow me to manage complexity)
* PostgreSQL (no NoSQL, CRM is all about relations)
* Vue.js
* ElasticSearch (with Kafka for replication from db)
* RabbitMQ for offline jobs
Any stack will get the job done. Use the one that yields you a shippable product in the end.
My stack is ExpressJS, AngularJS, PostgreSQL, NGINX, DigitalOcean, Route53, PM2. And I fly through it.
(This year it looks like it'll go to Java though, so :P)
For our team that would be Node.js with a React frontend, with probably MongoDB as the database, but every team is different.
As a side note: APIs are very important for CRMs, but as long as you design your API well you can swap out, move around, and refactor your backend as it makes sense.
Performance wise it has always treated me well. It also provides a lot of power over updating partial documents (push this item to a sub array, remove this item from another subarray, at this item but only if it doesn't exist, etc)
If the only thing you have is NoSQL everything looks like a document?
A CRM is typically a form based app doing CRUD - to be this makes it a solid candidate for being a stateless client.
I feel like there's a whole class of applications out there now (including my own) that have gone down the stateful client route where it wasn't necessary and introduce a whole new set of problems and solution libraries / frameworks that can be forgotten about with a return to a stateless arch.
Stack is two separately hosted apps.
Frontend: react, redux, webpack as a single page app Backend: Rails for an API
Why? I wanted to learn react and redux and I like using Rails for my backend and was comfortable with that.
For our JavaScript stack we will also look into ScalaJS and/or Vue.JS, React and Ember, but at the end we probably handroll our own at this stage, since our feature set is really different from what these provide (we don't need any mobile stuff, really...), at the moment we have zero mobile clients and we looking to build an app for a small inventory service, but thats all.
It'll answer all technical questions, make it easier to hire, and make it easier to fundraise. Oh! And easier to get customers.
Then think about how people get info into your system - if its email, use Nylas (it's gonna be email to start). If it's voice, use Twilio. If it's directly, then abstract all the complexity and use the right terms for your market.
I don't work for Salesforce, I never have in the past, and I barely use it now. But choosing anything else is nuts.
And if you run a 24/7 business or for any reason can't shut down your CRM for 8+ hours ever, god help you if you ever need to do something to modify millions of records like ETL. I have about 2 weeks of concurrent sleepless nights I can blame entirely on Salesforce.
Also, I hope you have deep pockets.
If you're a profitable company with a sizeable userbase, just buy Salesforce. It's clunky, it's expensive, but you can find contractors really easily to make it do whatever it is you want. Or you can learn the Salesforce platform yourself and build your final CRM on top of that. Welcome to enterprise IT!
If you're a scrappy start-up, or non-profit, with a small number of people to serve, you can use whatever you're most comfortable with. A single database (perhaps with hot replica,) a single application server (perhaps with load balancing for good measure) and you have everything you need. Use whatever you already know. PHP and Bootstrap? Ruby and Rails? Node and Angular? Doesn't matter.
If I were in the middle area -- successful company, lots of customers, but not actually at the point where I need the Salesforce behind-covering and easy contractor access -- then I would probably use React for the front-end GUI, and Haskell with Warp for the back-end services, hosted on top of MySQL or Postgres, with Redis for data caching, plus some scripts to make creating bread-and-butter tables/indices/queries simpler and less repetitive. Like the poster above, I kind of like having an "escape column" for "annottation data" stored in JSON, although it can simply be a plain TEXT. As long as you don't need indexing, it makes adding new columns easy even if you have a table that's too big to change online.
The main parts are:
- type safety, in the hope that it speeds up development. TypeScript 2 is my main contender here.
- on demand module loading, so I can shrink the initial page loads, will go with Webpack 2, because it lets me use System.import() and automatically splits these imports into it's own files
- interaction flow control completely based on observables, because they compose nicely and with genertic types ease development quite a bit. Will go for Cycle.js (+xstream), because it's rather tiny and really everything there is an observable, data and UI, also it's written in TypeScript. Feels a bit like Angular2-lite.
- WebComponents based UI-widgets, because I think they should be independent from the rest of the application, don't know yet if I'd go for Skate.js or Polymer, maybe I'd even use custom components directly. But I like the Skate API much more than Polymer or the "native" API.
- data retrieval will be based on GraphQL with the hope that it will lower data-on-the-wire if the client has more control on that. I also hope that the GraphQL subscriptions (based on WebSockets) will integrate nicely with the observables. Apollo-Client is my fav here, it's framework independent and written in TypeScript, too. I'll probably use their GraphQL-server, too.
Every part is pretty much independent of each other (besides everything being written in TypeScript, haha) so I think I can use parts of it in future projects.
Server side rendering would be a nice to have, because it would enable the basic app functions on clients without JavaScript.
We should speak about numbers, Rails would handle any normal app without problems. I'm not a huge Rails fan but I know that its image is broken and everyone claims that's it's slow just because someone who really needed performance ( Twitter, Github etc.. ) said so.
We really should differ between 'normal apps' and huge apps.
So basically, Rails is totally fine for your project.
> Angular is a monster and that at least would give the entire MVC but seems to be on the decline and is not a friendly framework.
We are talking about angular1 ? If so, I don't think it's declining, I actually believe that lots of established companies would not start a project with angular2, simply because it just got released.
Angular1 is fine, I know quite a few people who started their projects 1-2 months ago using angular1, the only difference is now, that they try to keep it modular, for example they stay close to the recommended way of doing things, which makes upgrading to angular2 easier, they refer to the John Papa guide[0].
Because you asked which stack we would use:
I'd use the Play! Framework or Spring Boot, since there is more CRUD I'd probably use Spring boot, VueJs because I would not create a SPA but would extend functionality with some lightweight frontend framework, angular1 is too big, Vue seems right.
Postgresql, because Postgresql.
Although there are a lot of different tech stacks, I think that most of this boils down to SPA vs integrated views with some javascript. In the rails world, this generally means either Rails plus jQuery, unobtrusive javascript, coffee script, and so forth, vs rails-api and Ember (or another javascript front-end).
Right now, I lean more toward the integrated views than most of my fellow developers. Very few people would take an always/never position on single page apps, so this generally boils down more to how far people want to take them. Some are more eager to apply them in a wider range of scenarios than others.
I personally lean toward the integrated view approach, and I advice caution around SPAs - in my opinion, very much an opinion here, I think they add a lot of complexity compared to the integrated approach, and are still in a state of flux. If what you are writing really is mainly a set of forms that you'd like to enhance a bit with automatic page refreshes, drop downs, drag and drop elements, autofill and so forth, you may want to stick with a more stable stack that isn't evolving as rapidly as SPA javascript frameworks.
There are situations where you can find yourself in a real mess with an integrated view, that would be far easier to manage with Ember or another javascript framework, keeping your backend logic in a relatively simple API. Not sure if that's going to happen in a CRM - they tend to be pretty form-ish apps, but perhaps that's because up to now, difficulties with javascript have led us to think of them that way. The rapid evolution of JS frameworks may, for all I know, have opened up an opportunity for serious innovation here.
One other thing - remember that it is relatively easy to expose a rails method as an API even in the absence of rails-api. My guess is that this is true of most integrated frameworks that provide a view tier. You won't be locked into an integrated app provided you keep logic out of those views! You should be doing that anyway. Also, make sure your tests don't rely exclusively on the views to verify logic that isn't in the view (again, you shouldn't be doing this, but I've seen it a-plenty). That'll keep you flexible enough to transition away should you want to at a later date.
Good luck!
On the backend, ASP.Net core is looking good to me. Although, Go and Elixir are picking up fast. Heck, ignore the haters and use Node if you want.
Finally, don't be scared to use something "old" like Java (EE or Spring) or even Rails (personally, I believe the whole performance fiasco is not as bad as you would think)
If latter, I would probably choose vuejs/Play2/MongoDB. (Replace Play2 with RoR or Django or anything else).
2. ReactJS
3. Foundation for Rails
4. MySQL
This is literally everything you need to get it off the ground as soon as possible.
This is what has helped me build Allt.in (https://allt.in) and UnderstandBetter (https://understandbetter.co/)
Starcounter (http://starcounter.com) is an in-memory application platform, which is comprised of an in-memory database (ACID-compliant) with a built-in app server.
You can compose a complex business system out of small apps (micro apps if you will). Apps don't pull the data from the db - they run in the db. Multiple apps that run in the same db share the data in real time. Our first clients are retail, CRM and advertising tech.
From dev perspective, we like to call our approach "collapsing the stack". There is no ORM. Your code classes become the database tables. You can use our (Web Components based) approach to create thin client HTML views that bind to the data using JSON Patch. This saves you from running huge amounts of glue code, which is typical for traditional software stacks.
Right now we are on Windows/C#. Linux and macOS is coming next year. Other languages will follow.
Edit: looking at what you already considered, maybe: back end: Ruby, front end: VueJS
I'm not sure how universal it is for CRM systems to be all about who knows whom, from where and what's the nature of the relationship, but the ones I've been involved with certainly all were.
If you can can get a good IBPMS for a nice price probably you have a good solution that will be easily customized.
I've built the framework to a CRM (Python and Flask) and I wonder how it'd line up with your needs. I'm not currently using it, as it needs a bit more work, but I'd love to talk to you about your project.
Backend: KeystoneJS + React, Redux (Universal JS)