# Development Instructions for the project to implement the Web Application: lex-opt

## Table of Contents
1. 
2. [Development Plan](#development-plan)
3. [Programming Generalities](#programming-generalities)
4. [Phase 1 Functionalities](#phase-1-functionalities)
5. [Directory Structure](#directory-structure)
6. [Creating the Pages](#creating-the-pages)
7.

---

## Development Plan

### Development Overview

The development of the `lex-opt` project is ambitious and divided into **3 phases**. Currently, only instructions for **Phase 1** have been attempted.

- Phase 1. will create the basic user interface 
- Phase 2. will create the functions for accessing external data / storage stategy / access to assets
- Phase 3. will analyze the historical data and experiences to improve the management and employment of equities and options. 


## Programming Generalities

- The project will be hosted at `lex-opt.com`.
- Development and testing will occur on a **localhost environment** using Apache2.
- Debugging will involve executing `.html` files on different browsers (initially Firefox Developer).
- After development and testing, files will be uploaded to the domain `LEX-OPT.com`.


## Development instructions

### Phase 1

1. **Initial Program Functionality**:
   - **Overview of Equities**: Tabular display of specific information from external sources for chosen NASDAQ & NYSE equities (see details in `displayPage`).
   - **Individual Equity Pages**: Pages for each equity presented in the table (see details in `equityPage`).
     - Information includes ticker symbol, equity name, historical data (stored in the `Archives` directory).
     - Option information will be stored historically to discover patterns.
     - Data will be stored in `.JSON` files (e.g., `APPL.json`).

2. **User Interface Analysis**:
   - Modifications for ease of use and data capture (to be added later based on results of initial functionality).

3. **Testing and Data Collection**:
   - Apply the application to real activities for 2-3 months (using localhost/Apache2).

4. **Analysis and Further Development**:
   - Use collected data and experience to implement additional functionalities.

---
---

## Phase 1 Functional description

### 1. `displayPage`
- **Purpose**: The landing page of the web app.
- **Features**:
  - Dynamically constructed table with rows for each equity.
  - Each row contains brief, current, and summary information.
  - Includes current open or watchlisted options information.
- **File Name**: `displayPage.html`

### 2. `equityPage`
- **Purpose**: A dynamically constructed dashboard for individual equities.
- **Features**:
  - Built and activated by selecting a ticker row in `displayPage`.
  - Includes notes, analysis, and historical/current option information.
- **File Name**: `equityPage.html`

### 3. Forms and Archiving
- **Purpose**: Accessible from both `displayPage` and `equityPage`.
- **Features**:
  - Forms for adding/deleting entries.
  - Data stored in `JSONcache` and archived after submission.
- **File Name**: No dedicated landing page.

---

## Creating the phase 1 Pages

### `displayPage`
- Use the layout instructions in `documentation/layout script for landing pages.text`.
- Follow the script in `documentation/script_displayPage.text`.

### `equityPage`
- Use the layout instructions in `documentation/layout script for landing pages.text`.
- Follow the script in `documentation/script_equityPage.text`.

### Auxiliary Functions
- No dedicated landing page.
- Forms are dynamically created and accessed via buttons on `displayPage` and `equityPage`.

---


## API documentataion

Phase 1 will not include the accessing of external data. 


## Suggestions for Further Improvement

