What you describe does exist with AckMe and Inventek WiFi solution partners. They have modules that you can control via serial protocol from an external MCU. You most probably don't need to re-invent it
You will be able to send "commands" through serial to the module to control it.
Ackme has a solution called WiConnect here with the API: https://www.ack.me/WiConnect
Inventek API description is here: http://www.inventeksys.com/wp-content/uploads/AT_Command_Set_DOC-UM-20035-2.2.pdf
If you need further assistance to pick a module, please contact: Contact Info - Macnica Americas Inc.
Also have a look at the test console application, which is (as the name indicates) is a console application that you can use to issue commands to WICED and get network up or do scan, etc. you will find it at apps/test/console.