Hello Ismet,
I am one of the core developers of an open source project called CMV, the Configurable Map Viewer. CMV is built on top of the Esri JavaScript API so you can use your ArcGIS Server REST resources directly without using webmaps or portal. Services at ArcGIS Online and many other external services can be used as well.
CMV includes numerous widgets available including a very robust layerControl (TOC) widget. If you prefer to use the WAB LayerList widget, you could do that too. With the upcoming version of CMV, you can use widgets created for the WebApp Builder without changing any code - either those that are included with WAB or those that developers have put together. I have created a github repo with a number of examples using WAB widgets here: GitHub - tmcgee/cmv-wab-widgets: Examples of using widgets from the ESRI WebApp Builder in CMV Other developers have already started using these widgets in their own applications with immediate success.
The freely available source code for CMV is on GitHub: GitHub - cmv/cmv-app: A community-supported open source mapping framework built with the Esri JavaSc...
Here is a list of additional widgets contributed by the CMV community: GitHub - cmv/cmv-contrib-widgets: User contributed widgets for CMV
Along with support at Github, StackExchange and GeoNet (CMV - Configurable Map Viewer), we have a chat room for exchanging ideas and getting assistance: cmv/cmv-app - Gitter In the chat and other places, you'll find myself and other developers very willing to help you get started.
I hope this helps you.
Tim McGee