[x] modal should fire when the settings icon is clicked, next to the dropdown of available watchlists for the user
Enable Watchlist Creation and Management
[ ] Check the ticker entered against an exhaustive list of all valid tickers (will be provided, and should be stored in memory), only add the ticker to the watchlist if it is valid.
[ ] The watchlists should be saved to the supabase database and linked to the user.
Change the watchlist name
[x] When you hover over the watchlist name on the right hand side of the modal, you should be able to rename the watchlist and save the new name. This will updates in the Supabase Watchlists table (detailed below).
Notes
Watchlist Creation Permissions
Authenticated anonymous users:
Aren't able to make any watchlists.
Are limited to the set watchlist that's available.
if they click the settings icon to manage watchlists, it should prompt them to sign-up and become a permanent user.
Permanent authenticated members or basic members:
Can create 1 watchlist.
Permanent premium users:
Can create up to 5 watchlists.
Permanent power users:
Can create unlimited watchlists.
Watchlist, User, Ticker Relational DB Schema Logic
1. Users Table: This table will store information about each user.
2. Watchlists Table: This table will store information about each watchlist and will reference the Users table.
3. Tickers Table: This table will store the tickers and will reference the Watchlists table.
This logic should also include the user_role, what type of subscriber they are (basic, premium or power)
Include RLS for these tables and the user_role.
User Table:
CREATE TABLE profiles (
user_id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL UNIQUE,
password_hash VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
Watchlist Table:
CREATE TABLE watchlists (
watchlist_id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT,
name VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES Users(user_id)
);
Tickers Table:
CREATE TABLE watchlist_symbols (
symbol_id INT AUTO_INCREMENT PRIMARY KEY,
watchlist_id INT,
symbol VARCHAR(10) NOT NULL,
FOREIGN KEY (watchlist_id) REFERENCES Watchlists(watchlist_id)
);
Main Goal
Create a modal that allows users to create, name, and modify multiple watchlists of tickers. On the
The modal popup should have functionality like this, and look similar to the video.
https://github.com/humblFINANCE/humblFINANCE-frontend/assets/63276164/dba62d9a-fd70-4ef0-a149-80faa9198418
Tasks
Create a NextUI Watchlist Modal
Enable Watchlist Creation and Management
Change the watchlist name
Watchlists
table (detailed below).Notes
Watchlist Creation Permissions
Authenticated anonymous users:
settings
icon to manage watchlists, it should prompt them to sign-up and become a permanent user.Permanent authenticated members or basic members:
Permanent premium users:
Permanent power users:
Watchlist, User, Ticker Relational DB Schema Logic
This logic should also include the user_role, what type of subscriber they are (basic, premium or power) Include RLS for these tables and the user_role.
User Table:
Watchlist Table:
Tickers Table: