Hi there!
Great work so far. My co-workers and I have been monitoring your project for the past couple of months, evaluating it for our needs for a project we've been working on, and so far we're hopeful that we can make this work. (The only alternatives were Discourse and Disqus, neither of which we were thrilled about.)
For our project, we've got a pretty fully-featured, standalone site that's running on a Node server and also using Express and Redis. When I first found out about NodeBB, I figured that we could integrate it into our main project as a submodule. Now that I've had more time to play around with it, I'm realizing that NodeBB seems to function better independently, running on a different port from the main app. In general, this is fine and probably makes some things better in production -- if one app happens to crash, it shouldn't affect the other, etc.
However, we have two needs which I'm not sure how to take care of with that setup:
- Shared authentication and user/session management. Both apps use Connect-Redis for sessions, and for as far as I can tell, as long as they use the same Redis store, sessions should automatically be shared. So that's about half of the problem solved. However, the other half is that if the user logs into or creates an account on the main site, they should automatically have an account on NodeBB with the same username/user details.
I'm guessing the easiest solution is: when a user accesses the NodeBB site, check the Redis session store; if their session is associated with an existing account from the main site, automatically create a new user account for them in NodeBB and log them in right away. Do you agree that's the way to go? If so, where do you think is the best place in the codebase to insert this functionality? Since it deals with high-level authentication, I'm not sure if this would work as a plugin.
- If a certain type of data gets created on the main site, a new thread should automatically be created on the NodeBB site. Basically, we need to be able to expose an API of some kind to create new threads, and possibly new categories. Can this be achieved through a plugin?
We realize that neither of these probably are the kinds of common use cases NodeBB was designed to handle, or at least not at the current stage of development, so we're perfectly fine forking the code and making our own customizations to accommodate these needs (and we'll certainly share our results with the community if anyone would find that helpful). However, any help with getting started is truly appreciated!
Thanks