@@srujangurram AFAIK it's still not official, but you can use it. However they are adding new stuff all the time. So if you have production critical project maybe hold of on it for a little while.
There will be a video about deploying both next and Directus to the same Digital Ocean droplet. I have NextAuth in a backlog for some time now, maybe I will show how to use it with Directus.
@@WatchandLearnTutorials Thanks for sharing! I've tried to implement NextAuth yesterday and the main problem is social login. I created a q&a here maybe you can check and help me if you have some time :) github.com/directus/directus/discussions/7193
Do they provide an SDK to deal with the API? Or is it URL based only? I read graphQL was possible somewhere in the documentation but didn't really find how to use it. I should consider digging deeper I guess.
They provide SDK (www.npmjs.com/package/@directus/sdk and docs.directus.io/reference/sdk/) and GraphQL. To use GraphQL as far as I understand it (since I didn't try it yet) you just send GraphQL query to the /graphql endpoint, and in the docs all examples contain REST and GraphQL versions (for example: docs.directus.io/reference/api/query/#examples-2). But I will probably make a video about it at some point, because I'm also interested in that and also REST API can get a bit cumbersome with complicated queries so maybe GraphQL will handle this better.
Nice intro! Thank you very much!!! And a very beautiful website that you have there! - Would like to know how you handle things like a newsletter subscription field in Directus?. Is the route protected? How to you secure yourself from spam? Can API files be accessed the same way as in Strapi? If so, what has to be done, when such a newsletter transcription requires updating a relational field (e.g. categories)? Any chance to motivate you doing such a video?
I don't have a newsletter and also didn't know Directus has that functionality 😀. But if I were to have a newsletter I would just use Mailchimp or something similar for that. So I would probably not make video about that. Sorry 🙁
@@WatchandLearnTutorials The newsletter subscription was just an example. Could be anything else that has a relation that needs update on save or delete. E.g. based on some skills a user is assigned to a group a or b (the user cannot choose the group). So how does the user action call the group action, maybe even do some validation before that? (At least in strapi it needs the proper usage f the before... after lifecycle methods...) Simply said: more complex scenarios where scripting is needed would be most welcome. :-)
Thank you very much for your great lessons! Can you teach us how to authenticate and authorize posts with directus and next js... that would be awesome.
There will be an episode about that for sure. However, I just moved houses and haven't set up my office yet, so once I set that up I will start making videos again.
Wonderful video, very well explained. You said you are hosting both your backend and frontend on the same droplet, so can you tell me which droplet are you using or how much does it cost you per month?
It's a [slug].tsx file, that is specific to Next.js. It just means that the route is going to recieve a slug which you can read, and based on that you can filter the specific post from the API, based on the slug you get on your route. nextjs.org/docs/routing/dynamic-routes
Maybe, I'm not sure. Keep an eye on this series: ua-cam.com/play/PLUBR53Dw-Ef9ZRA0QkaSKlcpotqbzQSv0.html , if I'm gonna do it it will be done in that series.
Take a look at my current series about Directus 9 and Nextjs. ua-cam.com/play/PLUBR53Dw-Ef9ZRA0QkaSKlcpotqbzQSv0.html . You have an option when creating or editing a field in the interface tab I think, the option to setup display template, and there you would setup to show the name instead of uuid. Anyway checkout my latest series, I think I show this in the first episode and then also again in the third or something like that.
@@WatchandLearnTutorials Thanks for the response!!! I checked out your other vids: For the directus ui display editing the interface to show "first last" that works fine. However, the json returned from a url query still returns a uuid. I've tried editing both the interface and the display values in the data model, but the url query returns the uuid of a user. Am I missing something?
@@ianmcfall9519 Honestly I'm confused by your question. What does this mean: "However, the json returned from a url query still returns a uuid"? ... I mean if you are connecting to the API and getting JSON you will get API data, "Display template" is just used for the administration part of Directus, not for the actual API response. If I understand what you are asking.
@@WatchandLearnTutorials Goooot it. Yes, thanks for laying out the difference between getting JSON through API and the Directus interface. You hit the nail on the head. What I'm asking is if it is possible to get the name of an author returned(and not the uuid) in JSON when I'm connecting to the API?
@@ianmcfall9519 It is. But since the author is probably connected to your post through relationship you need to define that in your query. If you are using GraphQL that query would be something like: posts { id title whatever_else user { user_id { user_name user_last_name etc... } } } Again please watch the videos from ua-cam.com/play/PLUBR53Dw-Ef9ZRA0QkaSKlcpotqbzQSv0.html we are displaying categories that are attached to the post. The same method should be used for displaying the author.
Don't do that, use something like Digital Ocean, AWS or similar. I tried to do something similar in this video, but it didn't work very well. ua-cam.com/video/ebWJbbUT4TA/v-deo.html
Thanks for the video. Really can’t wait to watch other directus 9 videos.
They are coming 😀
Please make a tutorial series about direct us as like your October cms tutorial series
Maybe I will. Thanks for suggestion.
Finally, directus gets some love ! Cool
😀
Happy to see you on directus 9 , can't wait to follow your series on it with next.js
Glad you like it 😀
Directus 9 seems very elegant and pretty good to use. Can't wait to follow your series on it.
I like it too 😀. And there will probably be a series about it.
I'm so happy you checked Directus this is my default go to when I need an API, can't wait it to be released officially
It really is great, I'm glad I tested it, and currently using it for my site.
Wait !? It's not released ?
@@srujangurram AFAIK it's still not official, but you can use it. However they are adding new stuff all the time. So if you have production critical project maybe hold of on it for a little while.
Awesome Demo! can't wait to use in one of my projects, thanks for this excelent content.
Glad you like my content and thanks for watching 😀
Directus is amzing, thanks for video.
No problem, thanks for watching 😀
Wow, how your English has improved, it's amazing.
Ummm, ok... thanks I guess 😀
Great one! Looking forward to see a tutorial on deployment with NextJS 😇
Edit: I would love to learn nextAuth integration as well.
There will be a video about deploying both next and Directus to the same Digital Ocean droplet. I have NextAuth in a backlog for some time now, maybe I will show how to use it with Directus.
@@WatchandLearnTutorials Thanks for sharing! I've tried to implement NextAuth yesterday and the main problem is social login. I created a q&a here maybe you can check and help me if you have some time :)
github.com/directus/directus/discussions/7193
@@makrdev I probably can't help you ATM since I never tried NextAuth. Sorry.
@@WatchandLearnTutorials It's okay bro :) Please don't make us wait too much for the deployment video :) Thanks again!
@@makrdev Ok 😀
really nice to see you using directus 9 for backend for your website. Will you kindly make tutorials on directus with Next.js maybe?
Of course I will, keep an eye on the channel, there will probably be a whole series about it 😀
Looks really cool🙂 Will you be doing an in depth course on it?
Probably something like Directus 9 + Nextjs, yeah 😀
@@WatchandLearnTutorials Looking forward to it 😀 Doing the strapi one now
Спасибо
Do they provide an SDK to deal with the API? Or is it URL based only?
I read graphQL was possible somewhere in the documentation but didn't really find how to use it. I should consider digging deeper I guess.
They provide SDK (www.npmjs.com/package/@directus/sdk and docs.directus.io/reference/sdk/) and GraphQL. To use GraphQL as far as I understand it (since I didn't try it yet) you just send GraphQL query to the /graphql endpoint, and in the docs all examples contain REST and GraphQL versions (for example: docs.directus.io/reference/api/query/#examples-2). But I will probably make a video about it at some point, because I'm also interested in that and also REST API can get a bit cumbersome with complicated queries so maybe GraphQL will handle this better.
Can you show custom hooks? I wanted to see how you will update other collections using directus 9 hooks
Ok, I will add it to my to do list. Thanks for suggestion. 😀
Awesome
And how can we add fields to the junction collections created from a many to many relationship like a date for example
Nice intro! Thank you very much!!! And a very beautiful website that you have there! - Would like to know how you handle things like a newsletter subscription field in Directus?. Is the route protected? How to you secure yourself from spam? Can API files be accessed the same way as in Strapi? If so, what has to be done, when such a newsletter transcription requires updating a relational field (e.g. categories)? Any chance to motivate you doing such a video?
I don't have a newsletter and also didn't know Directus has that functionality 😀. But if I were to have a newsletter I would just use Mailchimp or something similar for that. So I would probably not make video about that. Sorry 🙁
@@WatchandLearnTutorials The newsletter subscription was just an example. Could be anything else that has a relation that needs update on save or delete. E.g. based on some skills a user is assigned to a group a or b (the user cannot choose the group). So how does the user action call the group action, maybe even do some validation before that? (At least in strapi it needs the proper usage f the before... after lifecycle methods...)
Simply said: more complex scenarios where scripting is needed would be most welcome. :-)
@@RobertWildling Ok I will try to do something like that, thanks for the idea 👍
Please make a video or if you can explain here how you run Directus and Next together for deployment
I will 😀
your videos are great, could you make an ecommerce with strapi, next, and with payment gateways like paypal or payu?
I don't think Strapi is ready to handle E-commerce. So probably not.
@@WatchandLearnTutorials What do you think of a cms ecommerce with laravel and next with payu and paypal payment methods?
@@sergiocastillo8888 I mean if you can create whole e-commerce app with Laravel, then go for it. Laravel is a great framework.
Thank you very much for your great lessons! Can you teach us how to authenticate and authorize posts with directus and next js... that would be awesome.
There will be an episode about that for sure. However, I just moved houses and haven't set up my office yet, so once I set that up I will start making videos again.
Great tutorial! I hope you do more detailed tutorials on Directus 9. Does it support graphql? If yes, could you show Directus outputs data in graphql?
I will probably mostly use GraphQL in upcoming videos since I used REST for Strapi. So, yes, it supports GraphQL 😀
Can you host it on vercel ?
Maybe with SQLite database, but I'm not sure. However if you are using MySQL, Postgres etc. then definitely not.
Wonderful video, very well explained. You said you are hosting both your backend and frontend on the same droplet, so can you tell me which droplet are you using or how much does it cost you per month?
It's Basic - Premium Intel Droplet, and it costs $12 a month.
@@WatchandLearnTutorials thank you so much for your reply
Great video, thanks :)
A question: what is the last example you're showing in the video? (slug.tpx)
An extension? A custom endpoint?
It's a [slug].tsx file, that is specific to Next.js. It just means that the route is going to recieve a slug which you can read, and based on that you can filter the specific post from the API, based on the slug you get on your route. nextjs.org/docs/routing/dynamic-routes
Thanks :)
Is GraphQL available for data extraction?
Yes
Yes 😀 you can use REST or GraphQL they both support all functionality.
Could you create an example with translations and next.js locales routing (static or ssr)? 🙂
Maybe, I'm not sure. Keep an eye on this series: ua-cam.com/play/PLUBR53Dw-Ef9ZRA0QkaSKlcpotqbzQSv0.html , if I'm gonna do it it will be done in that series.
Thanks for pressing the EASY button!
Question: how can I get user_created to return the first last name instead of a uuid? 🙏🏻
Take a look at my current series about Directus 9 and Nextjs. ua-cam.com/play/PLUBR53Dw-Ef9ZRA0QkaSKlcpotqbzQSv0.html . You have an option when creating or editing a field in the interface tab I think, the option to setup display template, and there you would setup to show the name instead of uuid. Anyway checkout my latest series, I think I show this in the first episode and then also again in the third or something like that.
@@WatchandLearnTutorials Thanks for the response!!! I checked out your other vids: For the directus ui display editing the interface to show "first last" that works fine. However, the json returned from a url query still returns a uuid. I've tried editing both the interface and the display values in the data model, but the url query returns the uuid of a user. Am I missing something?
@@ianmcfall9519 Honestly I'm confused by your question. What does this mean: "However, the json returned from a url query still returns a uuid"? ... I mean if you are connecting to the API and getting JSON you will get API data, "Display template" is just used for the administration part of Directus, not for the actual API response. If I understand what you are asking.
@@WatchandLearnTutorials Goooot it. Yes, thanks for laying out the difference between getting JSON through API and the Directus interface. You hit the nail on the head. What I'm asking is if it is possible to get the name of an author returned(and not the uuid) in JSON when I'm connecting to the API?
@@ianmcfall9519 It is. But since the author is probably connected to your post through relationship you need to define that in your query. If you are using GraphQL that query would be something like:
posts {
id
title
whatever_else
user {
user_id {
user_name
user_last_name
etc...
}
}
}
Again please watch the videos from ua-cam.com/play/PLUBR53Dw-Ef9ZRA0QkaSKlcpotqbzQSv0.html we are displaying categories that are attached to the post. The same method should be used for displaying the author.
can you please upload a full series on directus9
That series is currently ongoing, first two episodes are up: ua-cam.com/play/PLUBR53Dw-Ef9ZRA0QkaSKlcpotqbzQSv0.html
How would i upload this to my shareed hosting on Ionos and use it?
Don't do that, use something like Digital Ocean, AWS or similar. I tried to do something similar in this video, but it didn't work very well. ua-cam.com/video/ebWJbbUT4TA/v-deo.html
compared to santiy who is the best option
No idea, haven't tried Sanity yet.
Directus content multilang is not comfortable "_)
Yeah it's a bit weird, I will admit that 😀