{"id":24200010,"url":"https://github.com/elhussin/financeflask","last_synced_at":"2026-05-15T07:02:18.400Z","repository":{"id":214180578,"uuid":"712396261","full_name":"Elhussin/financeFlask","owner":"Elhussin","description":"Finance is a web application that allows users to manage their stock portfolio. It supports login functionality, buying stocks, viewing transaction history, and fetching stock quotes. The app uses SQLite for storing user data and stock transactions.","archived":false,"fork":false,"pushed_at":"2024-12-15T13:30:35.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T20:42:22.689Z","etag":null,"topics":["api","database","finance","flask","sql","web-development","wep-application"],"latest_commit_sha":null,"homepage":"https://financeflask.onrender.com/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Elhussin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-31T11:45:57.000Z","updated_at":"2024-12-22T11:41:41.000Z","dependencies_parsed_at":"2023-12-26T13:00:45.082Z","dependency_job_id":"f04d16ef-10eb-4995-9888-9bb9dedd9c88","html_url":"https://github.com/Elhussin/financeFlask","commit_stats":null,"previous_names":["first-maker/financeflask","elhussin/financeflask"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Elhussin%2FfinanceFlask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Elhussin%2FfinanceFlask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Elhussin%2FfinanceFlask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Elhussin%2FfinanceFlask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Elhussin","download_url":"https://codeload.github.com/Elhussin/financeFlask/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241638789,"owners_count":19995264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","database","finance","flask","sql","web-development","wep-application"],"created_at":"2025-01-13T20:40:25.008Z","updated_at":"2026-05-15T07:02:13.356Z","avatar_url":"https://github.com/Elhussin.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Stock Trading Web Application\n\nThis is a Flask-based web application that allows users to manage their stock portfolio. It supports login functionality, buying stocks, viewing transaction history, and fetching stock quotes. The app uses SQLite for storing user data and stock transactions.\n\n## Features\n\n- **User Authentication**: Login and user session management.\n- **Stock Portfolio Management**: View and manage a portfolio of stocks.\n- **Password Validation**: Strong password policies are enforced.\n- **User Authentication**: Users can register, log in, and update their account information.\n- **Stock Quote Lookup**: Users can enter a stock symbol to get the latest quote for the stock.\n- **Buy and Sell Shares**: Users can buy or sell shares they own,by providing the stock symbol and the number of shares.\n- **Transaction History**: Users can view a history of their transactions.\n- **User Profile Update**: Users can update their username, email, and password.\n  \n## Pages and Routes\n\n### 1. **Home Page**\n   - Displays basic information about the application and provides links to other pages like Quote, Buy, Sell, and History.\n\n### 2. **Login Page**\n   - URL: `/login`\n   - Allows users to log in by entering their username and password.\n\n### 3. **Register Page**\n   - URL: `/register`\n   - Allows users to create an account by providing a username, password, and password confirmation.\n   \n### 4. **Quote Page**\n   - URL: `/quote`\n   - Allows users to look up stock symbols by entering a symbol (e.g., `AAPL`) and retrieving the latest stock price.\n   \n### 5. **Quoted Page**\n   - URL: `/quoted`\n   - Displays the price of the stock corresponding to the symbol entered on the Quote page.\n\n### 6. **Sell Page**\n   - URL: `/sell`\n   - Allows users to select a stock symbol and enter the number of shares to sell.\n   \n### 7. **Update Page**\n   - URL: `/update`\n   - Allows users to update their username, email, and password.\n\n\n\n## Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/Elhussin/financeFlask.git\n   cd stock-trading-app\n   ```\n\n2. Install the required Python packages:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n\n## Running the Application\n\nTo start the application, run:\n\n```bash\npython app.py\nflask run\n\n```\n\nThe application will be available at `http://127.0.0.1:5000/`.\n\n## How to Use\n\n### 1. Register and Log In\n- Go to the **Register** page (`/register`) to create an account.\n- After registration, you will be redirected to the **Login** page (`/login`). Enter your credentials to log in.\n\n### 2. Look Up Stock Quotes\n- Go to the **Quote** page (`/quote`) and enter a stock symbol (e.g., `AAPL`).\n- View the latest stock price on the **Quoted** page (`/quoted`).\n\n### 3. Buy/Sell Shares\n- On the **Sell** page (`/sell`), select a stock symbol from your owned items and enter the number of shares you want to sell.\n- The **Buy** page (`/buy`) allows you to purchase shares.\n\n### 4. Update Your Account Information\n- Go to the **Update** page (`/update`) to update your username, email, and password. Make sure to meet the password requirements.\n\n### Error Messages\n- If there is an error with form validation (e.g., empty fields, password requirements not met), the application will show an error message.\n\n\n## Key Functions\n\n### `apology(message, code=400)`\nDisplays an apology message to the user, typically used for error handling.\n\n### `login_required(f)`\nA decorator that ensures the user is logged in before accessing certain routes.\n\n### `lookup(symbol)`\nFetches the latest stock price for a given stock symbol from Yahoo Finance.\n\n### `usd(value)`\nFormats a given value as USD currency (e.g., `$1,234.56`).\n\n### `password_confiarm(password)`\nValidates that the password meets the following criteria:\n- Length between 8 and 20 characters.\n- Contains at least one digit.\n- Contains at least one uppercase letter.\n- Contains at least one lowercase letter.\n- Contains at least one special character from the set: `$ @ # % \u0026 *`.\n\n## Endpoints\n\n- **/ (Home)**: Displays the user's stock portfolio with cash balance and stock summary.\n- **/buy (Buy Stocks)**: Allows users to buy stocks by providing a symbol and the number of shares.\n- **/history (Transaction History)**: Displays a history of all the user's stock transactions.\n- **/login (Login)**: Allows users to log into their account.\n- **/logout (Logout)**: Logs out the current user.\n- **/quote (Stock Quotes)**: Allows users to look up the latest stock quote for a given symbol.\n\n## How to Use\nHow to Use\n1. Register and Log In\nGo to the Register page (/register) to create an account.\nAfter registration, you will be redirected to the Login page (/login). Enter your credentials to log in.\n2. Look Up Stock Quotes\nGo to the Quote page (/quote) and enter a stock symbol (e.g., AAPL).\nView the latest stock price on the Quoted page (/quoted).\n3. Buy/Sell Shares\nOn the Sell page (/sell), select a stock symbol from your owned items and enter the number of shares you want to sell.\nThe Buy page (/buy) allows you to purchase shares.\n4. Update Your Account Information\nGo to the Update page (/update) to update your username, email, and password. Make sure to meet the password requirements.\nError Messages\nIf there is an error with form validation (e.g., empty fields, password requirements not met), the application will show an error message.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felhussin%2Ffinanceflask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felhussin%2Ffinanceflask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felhussin%2Ffinanceflask/lists"}