When I am thinking about UI something like this is comming to my mind.
Something similar has YouTube under the video.
When user fills input and clicks enter or submit button to create list, you will send ajax request with list name and save it as a record in wp_usermeta
table with meta_key
_list_user_1
and meta_value
as list title.
To add post to this list you have to save record in wp_postmeta
table with _list_post_1
value in meta_key
field and value of umeta_id
from _list_user_1
row in field meta_value
.
wp_usermeta
+----------+---------+--------------+------------+
| umeta_id | user_id | meta_key | meta_value |
+----------+---------+--------------+------------+
| 100 | 1 | _list_user_1 | List 1 |
+----------+---------+--------------+------------+
wp_postmeta
+---------+---------+--------------+------------+
| meta_id | post_id | meta_key | meta_value |
+---------+---------+--------------+------------+
| 1 | 1 | _list_post_1 | 100 |
+---------+---------+--------------+------------+
To get all lists for user:
SELECT *
FROM `wp_usermeta`
WHERE `user_id` = 1
AND `meta_key` LIKE "_list_user_%";
To get all posts for List 1:
SELECT *
FROM `wp_posts`
INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id)
WHERE wp_postmeta.`meta_key` LIKE "_list_post_%"
AND wp_postmeta.`meta_value` = 100;