From 1cabbf22f23baca96e5e570b29777b84ae5fd964 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Tue, 7 Mar 2023 05:02:02 -0600 Subject: [PATCH] Create some initial files. --- index.tsx | 24 ++++++++++++++++++++++++ run.sh | 12 ++++++++++++ src/functions.ts | 22 ++++++++++++++++++++++ src/includes.ts | 7 +++++++ src/objects.ts | 13 +++++++++++++ 5 files changed, 78 insertions(+) create mode 100644 index.tsx create mode 100644 run.sh create mode 100644 src/functions.ts create mode 100644 src/includes.ts create mode 100644 src/objects.ts diff --git a/index.tsx b/index.tsx new file mode 100644 index 0000000..779b22b --- /dev/null +++ b/index.tsx @@ -0,0 +1,24 @@ +/* +// Date: 2023-03-07 +// Developer: Hyperling +// Purpose: Provide a UI for folks to log a food diary, providing a simple way +// to enter the data and an easy way to filter/sort what caused issues. +// Resources: Most helpful tutorials when learning Typescript and React. +// https://blog.logrocket.com/how-use-typescript-react-tutorial-examples/ +*/ + +// Attach all the needed helperss. +import "src/includes.ts"; + +/* DB Setup */ + + + +/* Test Code */ +// Just playing with the DB until learning React. + + + +/* Main, UI */ + + diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..eb7bb56 --- /dev/null +++ b/run.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# Date: 2023-03-07 +# Developer: Hyperling +# Purpose: Install all dependencies and run the project. + +if [[ -z `which npm` ]]; then + sudo apt install npm +fi + +npm install package.json + +# ??? diff --git a/src/functions.ts b/src/functions.ts new file mode 100644 index 0000000..745d5cd --- /dev/null +++ b/src/functions.ts @@ -0,0 +1,22 @@ +/* +// Date: 2023-03-07 +// Developer: Hyperling +// Purpose: Keep main file clean by holding helper functions here. +*/ + +import "objects.ts"; + +// Connect to a SQLite database. +function connect_db () { + +} + +// Retrieve data from a connected database. +function select_db () { + +} + +// Send data to a connected database. +function post_db () { + +} diff --git a/src/includes.ts b/src/includes.ts new file mode 100644 index 0000000..9bb7643 --- /dev/null +++ b/src/includes.ts @@ -0,0 +1,7 @@ +/* +// Date: 2023-03-07 +// Developer: Hyperling +// Purpose: Keep main file clean by making sure all source code is available. +*/ + +import "functions.ts"; diff --git a/src/objects.ts b/src/objects.ts new file mode 100644 index 0000000..47772ad --- /dev/null +++ b/src/objects.ts @@ -0,0 +1,13 @@ +/* +// Date: 2023-03-07 +// Developer: Hyperling +// Purpose: Keep main file clean by holding types (interfaces and vars) here. +*/ + +interface record { + user_id: number; + cal_date: string; + food: string; + caused_issue: boolean; + comments: string; +} \ No newline at end of file