Various questions about Strapi

Good day !

I just learned about Strapi the other day and was wondering how and it what ways it can be useful to me. I am usually setting up backend APIs from scratch using NodeJs, Express and MongoDB (Mongoose), and having JWT Tokens for authentication. In my eyes this is as straight forward as it could be.

I have chopped down a few questions that come to my mind when thinking about using Strapi , but since they are very different from each other, I didn’t just want to drop them here in bulk, but first wanted to ask where a good place would be to ask them. Maybe here in the forum or anywhere else.

Thanks !

1 Like

Hey there! You’re definitely at the right place to ask those questions :smile:

1 Like

Great :blush:

btw, I am currently trying out the self-hosted version of Strapi

so …

  • there seems to be a default content-type “user”, I can see it in the admin panel, but I can’t delete it. On the other hand there doesn’t seem to be a route for it in the code like I would see for other content-types I create. What about it ? There should be a route for users to get their account data, like username, email, address and so on and also be able to edit it (using appropriate routes for it)

  • The users of my platform/webapp should not be able to use the admin / cms panel. The cms panel should not be of their concern. I would only use this panel myself to check the data the comes in. Is this possible ?

  • I want users of my platform/webapp to be able to login requesting an /auth route for example, the server then would return a jwt token, and then the user can use the jwt token for all subsequent requests to my api. I don’t need any code sample, just need to know this is possible. I normally use passport for this workflow.

  • I Mongoose (MongoDB Driver for Nodejs) there is something called discriminators. Discriminators are a schema inheritance mechanism. They enable you to have multiple models with overlapping schemas on top of the same underlying MongoDB collection. Again is this possible with Strapi ? I guess yes using components and dynamic zones combined … right ?

That’s all for now … I think I forgot the rest :blush:

1 Like

I’ll try to answer based on my own knowledge of strapi:

  • The user table refers to strapi’s users (User (by: users-permissions) ), so the Admin, editors, SuperAdmin etc… you cannot delete it because you cannot delete the super admin ofc, otherwise you wouldn’t be able to login into strapi.
    The endpoint should be located under USERS-PERMISSIONS > USER > me

  • Just hide strapi in a different route, or secure it with a password, IP restrictions etc…

  • The [roles & permission] (https://strapi.io/documentation/developer-docs/latest/plugins/users-permissions.html#manage-role-permissions) plugin should do just this

  • I don’t have a good knowledge of mongoDB, sorry :joy:

1 Like

Thanks @mijorus for you input !

I am not sure you are right about the first point.
Admin, Super-Admins are located under Settings > Admin. Panel > Users . But the content-type “user” I am talking about is located under Collection Types.