# Using discourse as one part of a larger rails app?

**URL:** <https://meta.discourse.org/t/using-discourse-as-one-part-of-a-larger-rails-app/155312>\
**Category:** Development\
**Created:** [19 juni 2020 om 05:03 UTC](https://meta.discourse.org/t/using-discourse-as-one-part-of-a-larger-rails-app/155312 "2020-06-19T05:03:28Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Chris\_Dawson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chris_dawson/32/184486_2.png) [@Chris\_Dawson](https://meta.discourse.org/u/Chris_Dawson)\
**Post date:** [19 juni 2020 om 05:03 UTC](https://meta.discourse.org/t/using-discourse-as-one-part-of-a-larger-rails-app/155312/1 "2020-06-19T05:03:28Z")

</div>

Is it possible to use discourse as one component of a bigger rails app?

My goals:

- Share the database. I would love to have my rails app use the same database as discourse uses.
- Share login: meaning, it would be great if I could use the login system for discourse, and re-use the session cookie to have users authenticated in different places in my app.
- Add a bunch of new routes to my components.
- Bonus: customize discourse view helpers that point logged in users to those extra components (maybe this is something I can do purely in settings, but I wonder if there are overridable rails helpers you can use to customize sitewide information)?

I saw the post on using HAProxy to put discourse behind a proxy and route to a path on a domain. This is not what I want because I would love to avoid duplicating the rails framework in another app (and not sure how easily I could re-use the user session in another app). Is it possible to use discourse as a component in a larger rails app?

---

_[View the full topic](https://meta.discourse.org/t/using-discourse-as-one-part-of-a-larger-rails-app/155312)._
