IntelliJ IDEA is capable of auto-detecting facets. As soon as it finds a file or a directory typical of a certain framework or technology, you get a notification looking similar to this:
By clicking Configure, you can start creating the corresponding facet or facets.
This task can also be initiated from within the Event Log tool window, which will contain a similar notification message.
Click Configure in the notification box.
Alternatively, open the Event Log tool window, find the corresponding notification message there, and click Configure within the message.
To open the Event Log tool window, click on the status bar or Event Log on the tool window bar. Both these controls are located in the lower-right corner of the main window.
In the Setup Frameworks dialog that opens, select the facets to be created and
the files to be associated with these facets.
(The facets are at the top hierarchical level in this dialog; the corresponding files are shown as facet elements, at the second level.)