• jckahn 7 hours ago

    Directus has its small-scale and short term benefits, but I can’t recommend building a production-grade app with it. My company uses Directus and we all hate it and are desperately trying to get away from it. Avoid.

    • jaros 4 hours ago

      I’m in a similar situation. At first it looked very promising and was benefiting us in bootstrapping the project fast but after a while you’re being slowed down by the “extensions” ecosystem. If you have a bunch of complex extensions then building all of them can take 2 minutes (m3 pro MacBook). Forget instant hot reloading.

      • tjwds 7 hours ago

        Out of curiosity, what don’t you like about it?

        • o_____________o 2 minutes ago

          The eternal red flag of a DB UI that tries to support wildly different backends explains a lot of the problems. Many sane and powerful Postgres features can't be used because Directus also needs to support SQLite, for example. Views not properly supported, search features inadequate, graphql DSL with arbitrary limitations, a lot of weird or dysfunctional relational patterns when something much simpler would do... it's a parallel, inferior system on top of stock pg that is very frustrating when used at some depth.

          • jckahn 6 hours ago

            Off the top of my head: It surfaces only useless GraphQL error messages to the front end, it’s very frustrating to stand up custom REST endpoints, and the Flow system is painful to develop with and debug. Others on my team have different gripes with it.

            • Davidiusdadi 5 hours ago

              Since they support so many databases the integration with specific providers is very shallow - e.g. they do not allow to make use of SQL views.

              I personally found the typescript support disappointing in general but specifically around strict null handling. Their graphql schema was also declaring far to many fields as nullable which was a deal breaker for me looking for at least one way to generate precise typescript typings.

            • golergka 6 hours ago

              How does it measure up to Hasura?

              • jckahn 2 hours ago

                No idea, I’ve never used that.

            • xvinci 6 hours ago

              Microsoft has something very similar (i did not do a full feature comparison, just speaking about apis and auth) which is mit licensed. Works also with on-prem databases despite it's name. https://github.com/Azure/data-api-builder

              • socketcluster an hour ago

                I made something kind of similar https://saasufy.com/ but currently only tied to a single database but particularly good at scaling real-time updates. I'm looking for a non-tech co-founder who can drive to a niche use case.

                As an example of its capabilities I built this from scratch without frameworks and completely server-less (basically just a .html file, .css file and a couple of .js files hosted only on GitHub): https://www.insnare.net/app/#/dashboard/company-filter/tags%...

                That entire app is less than 4K lines of code; all frontend code.

                • __jonas an hour ago

                  I’m using this as an admin UI on top of an existing database, it works pretty well for that, it’s nice that it doesn’t dictate your db schema. I don’t really see the point of their “flows”, and I’m not sure how the auto-generated APIs hold up under load, but I’d recommend it for content management if you are ok with the license (it’s not FOSS).

                  • RadiozRadioz 5 hours ago

                    Had a play around with it, I'm impressed. I was very worried and put-off when I saw the nice-looking UI and flashy transitions, but this actually plays quite nicely with my database.

                    Unfortunately it doesn't work on Firefox 115 ESR due to

                        Intl.Segmenter is not a constructor
                    
                    It's just a blank screen. So it is infected by the JS change treadmill somewhat.

                    I have a few other thoughts from my first try:

                    When using Directus on a pre-existing DB, your foreign keys need to have exactly the same type as the primary keys they are referencing for Directus to pick up on the relationship. For example, if you have `customer.id INT PRIMARY KEY`, you must reference it with `order.customer_id INT FOREIGN KEY REFERENCES customer (id)`. You cannot do `order.customer_id INT NOT NULL FOREIGN KEY REFERENCES customer (id)` , else Directus won't notice.

                    I also found it fairly slow to pick up on schema changes I made in the DB directly, and I didn't see an obvious way to force it to discover.

                    When using Directus to manage the DB schema, I found the tables it created to have a generally sane and simple schema, which is refreshing. I liked the choices here more than nocodb.

                    I can't comment on the REST/GraphQL generation. I'm mainly interested in the admin panel features.

                    The compose file they provide here works: https://docs.directus.io/self-hosted/docker-guide.html

                    Overall I think this works best if your data model is very clean. It would probably be painful to onboard a complex legacy DB. I think this is totally fine as a small-scale org data management tool. I was going to make one of these, but I don't need to now. Thanks for sharing.

                    • 4ndrewl 6 hours ago

                      This seems very similar to Hasura? What does it compete with them on?

                      • Keyframe 7 hours ago

                        seems cool, but weird non-oss license ahead warning.

                        • lol768 4 hours ago

                          It used to be actual FOSS but then they went down the route of making it nonfree.

                          I sort of get why, but not really a fan of how they went about doing it (and arbitrary "revenue-based" thresholds really don't work for businesses that operate on a commission/agent basis - you can have a massive turnover but huge cost-of-sales - it's a very blunt instrument). For that reason I've kept self-hosting the older, actual-FOSS versions and they're just sat behind auth. I've not looked at alternatives yet but would be interested in any suggestions

                          • yladiz 7 hours ago

                            It’s free for individuals and organizations that make less than $5 million in revenue. Seems fine and not weird to me?

                            • zephyreon 8 minutes ago

                              They’re subjective with how that’s enforced. We used it in a higher ed institution in a small department and they reached out to us demanding we fork over (a lot of) cash to continue use. They considered the entire institution’s budget as the deciding factor.

                              Yes, that aligns with the license, but I’ve found most companies will negotiate in good faith when the use is limited within an organization. This felt very Oracle-like.

                              • speedgoose 7 hours ago

                                If a fair offer, but it’s not open source compatible.

                                • yladiz 7 hours ago

                                  Sure, but am I missing something and it says it’s open source?

                                  • rustc 6 hours ago

                                    > From indie devs to enterprise teams, our growing community is building faster with an open source backend built from the ground-up for developers.

                                    From https://directus.io.

                                    • claytongulick 7 hours ago

                                      They used to be open source, and actively advertised themselves as such.

                                      Around two years ago they changed their license.

                                      I used to be a big champion, and used it at a Healthcare organization I was the CTO of.

                                      After the license change, I moved on to other solutions. Not because of the cost, but because I couldn't justify the risk of building systems on top of a non-open platform. I've seen too many vendor relationships sour over the years.

                                      Also, IIRC, the 5 million threshold isn't just for revenue, it includes funding (or at least it used to, not sure if it still does).

                                      • lol768 4 hours ago

                                        > I used to be a big champion, and used it at a Healthcare organization I was the CTO of.

                                        Same, it was a real shame to see it change in this way.

                                        I'm also not impressed with how they've gone about doing it; no transparency on pricing for the self-hosted solution, you have to be subjected to a sales call to even get a quote. They're clear that they use "total finances" for trying to determine how much to charge you, which has its own issues with some business models.

                                        The money also seems to be going towards lots of activities that have very little to do with actually .. building the core of the CMS. This whilst there's still fairly fundamental missing validation logic, even in the now-paid SaaS product [1]. How much of the now-$500 a month plan for 10 users goes towards the "Directus TV" (with content such as "Live scenes from our team with ambient music to help you get into the flow when you're coding") nonsense?

                                        It was enough to put me off.

                                        [1] https://github.com/directus/directus/discussions/2993

                                        • include 7 hours ago

                                          "I moved on to other solutions (...)", which ? kthx

                                    • rustc 6 hours ago

                                      And the price is "Contact our sales team" [1] for self hosting for those with > $5 million revenue. Seems like not a good idea if you think you're ever going to reach that number.

                                      They also considerably increased their cloud hosted pricing from $25/month unlimited to $500/month for 10 user + 250k rows + 1 million API requests.

                                      Old pricing: https://web.archive.org/web/20220619075129/https://directus....

                                      [1]: https://directus.io/pricing/self-hosted

                                      • luke-stanley 6 hours ago

                                        It's not a normal license. It's not worth the hassle.

                                        • pan69 31 minutes ago

                                          Just out of curiosity, what is "a normal licence"?

                                      • the_real_cher 7 hours ago

                                        I think like me you saw the cloud section and thought it was a paid product for a minute.

                                      • masonwr 4 hours ago

                                        I have had great luck with Directus building small/medium size apps. Keep up the good work!

                                        • denvrede 4 hours ago

                                          Does anybody know something like Directus (building REST APIs on top of Postgres) with the ability to hook in custom authorization logic? (E.g. to do FGA checks before returning data)

                                          • bryantgillespie 2 hours ago

                                            You can certainly add whatever logic you want / need using custom hooks in Directus.

                                            Here's the docs for custom hooks. https://directus.io/docs/guides/extensions/api-extensions/ho...

                                            But honestly, depending on the complexity of your logic you may not even need custom hooks. You can get really granular with the built-in access policies and permissions.

                                            As long as you have relationships configured with the user collection you can reference those in your permissions.

                                            Here's an example rule for accessing items within a `projects` table that hides any projects that don't belong to the current agency partner.

                                            {"_and":[{"partner":{"id":{"_eq":"$CURRENT_USER.agency_partner_id.id"}}}]}

                                            Each project a many to one relationship to agency_partners. Each user has a many to one relationship to agency_partners.

                                            You can even scope this down to allow / hide specific fields if you want.

                                            • whilenot-dev 44 minutes ago

                                              I wrote my own extension in version 9 some time ago where I used hooks to track changes and sync our Full-Text Search engine (Meilisearch). I just remembered some of the difficulties dealing with hooks, because their payload differed in structure depending on how data entries were mutated (update via Web-UI VS creation via API VS import via API /utils/import). Has that improved?

                                              • bryantgillespie 2 hours ago

                                                Almost forgot - full disclosure - Bryant here from the Directus core team.

                                              • bigjump 4 hours ago

                                                Pretty sure you can do this with hooks / flows in Directus.

                                              • aerhardt 4 hours ago

                                                I wouldn't use anything like this to build it a user-facing app, but how does it compare to something like Django admin?

                                                • pacifika 6 hours ago

                                                  If you’re dealing with pure SQL of a third party system, instead of an API, then you’re designing the API without domain knowledge. This is a problem in my experience.

                                                  • esafak 2 hours ago

                                                    Why would you dump SQL for REST??